Log in

View Full Version : Conditional filter


Terka
21st June 2013, 17:15
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.

cretindesalpes
23rd June 2013, 08:16
Not sure if it helps but you could try this:

# 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)

Terka
24th June 2013, 15:35
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?

Didée
28th June 2013, 01:59
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.)

Guest
28th June 2013, 03:28
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.

Terka
28th June 2013, 15:12
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

Guest
28th June 2013, 16:13
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?

Terka
28th June 2013, 16:32
the ISO 6400 and 12800

Guest
28th June 2013, 16:51
And how do we download the original PNGs?

Terka
28th June 2013, 16:59
I have tried on this small sample, cropping the picture i uploaded.