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. |
21st June 2013, 17:15 | #1 | Link |
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. |
23rd June 2013, 08:16 | #2 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
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 |
24th June 2013, 15:35 | #3 | Link |
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 |
28th June 2013, 01:59 | #4 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Quote:
"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!) |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|