Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st June 2013, 17:15   #1  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Conditional filter

Have a big grain that differs from background only a little.
Is it possible to create such condition:
if all pixels in radius are similar (differences below threshold) do averaging/blurring.
Terka is offline   Reply With Quote
Old 23rd June 2013, 08:16   #2  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Not sure if it helps but you could try this:

Code:
# Parameters: rad, thr

# if all pixels in radius are
range = Dither_build_gf3_range_mask (rad)

# similar (differences below threshold)
mask = range.mt_binarize (threshold=thr, mode="upper")

# do averaging/blurring.
bl = RemoveGrain (12).RemoveGrain (20)
mt_merge (last, bl, mask, luma=true)
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 24th June 2013, 15:35   #3  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
cretindesalpes, thank you for help.
But are you sure the Dither_build_gf3_range_mask does exactly this:
eg radius 1pixel = 3x3 area , values
100 102 105
100 103 105
100 105 105
threshold 10. Pixel should be averaged.
Could radius "cross shape" be used?
abc
def
ghi
be taken?

Last edited by Terka; 24th June 2013 at 15:48. Reason: my stupidity
Terka is offline   Reply With Quote
Old 28th June 2013, 01:59   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Quote:
Originally Posted by Terka View Post
if all pixels in radius are similar (differences below threshold) do averaging/blurring.
Do you think that ^this^ is really so blatantly different from the much more simple:
"Do averaging/blurring with all pixels within [radius] that are similar by [threshold]"

For the latter, the simple answer is DEEN.
(And has been for 10 years, to date.)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 28th June 2013, 03:28   #5  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Didée View Post
For the latter, the simple answer is DEEN.
(And has been for 10 years, to date.)
Indeed. And Smart Smoother was doing it as a VirtualDub filter for 13 years.
Guest is offline   Reply With Quote
Old 28th June 2013, 15:12   #6  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Thank you.
In fact im trying to denoise this:
http://s23.postimg.org/z1hhxf2jv/nikond800_iso.png
Or if necessary denoise, resize down and denoise, because the grain is too big - eg purple grain
Terka is offline   Reply With Quote
Old 28th June 2013, 16:13   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Terka View Post
In fact im trying to denoise this:
http://s23.postimg.org/z1hhxf2jv/nikond800_iso.png
There are 4 photos there. Which is the original you are trying to denoise?
Guest is offline   Reply With Quote
Old 28th June 2013, 16:32   #8  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
the ISO 6400 and 12800
Terka is offline   Reply With Quote
Old 28th June 2013, 16:51   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
And how do we download the original PNGs?
Guest is offline   Reply With Quote
Old 28th June 2013, 16:59   #10  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
I have tried on this small sample, cropping the picture i uploaded.
Terka is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.