Doom9's Forum

Doom9's Forum (https://forum.doom9.org/index.php)
-   Avisynth Usage (https://forum.doom9.org/forumdisplay.php?f=33)
-   -   Black and white frame + black dots noise (https://forum.doom9.org/showthread.php?t=162576)

Mounir 18th September 2011 20:14

Black and white frame + black dots noise
 
I'm struggling to get rid off this noise at the moment:
http://imageshack.us/photo/my-images/405/noisy01.jpg/

This noise is present throughout the video (reception problem i guess). I've made tests with neat but if i want to remove all of these black dots it get blurry real quick (i can't even get a 60% profile quality by the way). Suggestions welcomed

jmac698 18th September 2011 21:14

It's called Pepper noise you need something like http://avisynth.org/vcmohan/DeSaltPe...altPepper.html
Only problem, your noise is more than 1 pixel, so maybe if you invert the video you can use descratch.

Mounir 18th September 2011 23:47

This filter seem to do the job, thank you for the info
I use this:
assumetff()
separeatefields()
DeSaltPepper(opt = "pepper",UV = true, tol = 0, avg = true, feedback = 10 )
weave()

There are a few visible 'peppers' , a big improvement nonetheless

jmac698 19th September 2011 01:30

Glad it worked, didn't know there was a need for separate fields. Also just try temporalsoften(1,255,255)

Mounir 19th September 2011 02:50

I'm not sure if it's the feedback parameter that's at fault but if i don't use grayscale() after this script the images have a greenish tint

jmac698 19th September 2011 05:19

Lucky you're dealing with greyscale, must be a bug. If you need color, it can be worked around with mergechroma or else, we can try a different filter.
I'm sure there's some other ways but I'll let someone else make a suggestion.

Ghitulescu 19th September 2011 12:37

I don't think it's "pepper noise", I never met this defect myself, but I remember reading here, in doom9's forum, that some graphic cards exhibit this noise under particular conditions (bus congestion IIRC).

Mounir 8th April 2014 16:35

this filter is fantastic i think, i just did new tweaks

First you must not use separatefields+weave for this filter (for an interlaced source), strange but it's like that
Second, the tolerance parameter seems to be critical, i've found -1 to be just fine for my video so that gives:
DeSaltPepper(opt = "pepper",UV = true, tol = -1, avg = true, feedback = 3 )

Third and last, use this filter with RemoveSpotsMC()after and you shall feel the force :D

desaltpepper will turn your black dots/lines (must be small lines) into white and removespots will happilly digest that stew with little artifacts (if any)
edit:
actually, ive found blending artifacts on fast motion so it's better to deinterlace before applying the filters


bxyhxyh 10th April 2014 07:20

I'm sorry if i'm being off here.

Have you tried something like this?
Code:

#source()
AssumeTFF()
SeparateFields()
noisy  = last
nonoise = FFT3DFilter(sigma=13,bt=1) # Your favourite denoiser
diff    = 10                        # Difference between denoised and noisy clips
m      = mt_lutxy(noisy,nonoise,"y x - "+string(diff)+" - 255 *")
mt_merge(noisy,nonoise,m)
weave()

EDIT: LOL, I didn't notice this was 3 years old thread.

Mounir 10th April 2014 11:06

yeah old thread but i'm still working on the same video since all that time

Your script rock the skies man with little artifacts i like it !

StainlessS 10th April 2014 11:24

bxyhxyh,
Not sure that FFT3DFilter would best be used that way, FFT3DFilter is spacio/temporal and SeparateFields is not good
in such circumstance (spacial displacment between even/odd fields), use the FFT3DFilter Interlaced=true arg instead, then
perhaps SeparateiFields afterwards if the rest of script requires it (Have not tried it but looks wrong as it is to me).

EDIT: Maybe Add Interlaced=True, remove both Separatefields and Weave, leave rest as is.

Mounir 10th April 2014 12:04

works fine for me stainless
before:
http://img15.hostingpics.net/pics/9715841201.jpg
after:
http://img15.hostingpics.net/pics/2625187702.jpg

The only thing is that it introduce some kind of white fog (best i can describe it) along the edges.It's faint ,but it's there.
Perhaps a median filter would be best instead of fft3d ?

best results i get so far are with removedirtmc+ fft3d like this:

nonoise = RemoveDirtMC.fft3dfilter(sigma=7.0,sigma2=7.0,sigma3=7.0,sigma4=7.0, bt=1, bw=32, bh=32, ow=16, oh=16,plane=0, sharpen=0.0,interlaced=false,dehalo=0.0)

bxyhxyh 10th April 2014 12:36

Quote:

Originally Posted by StainlessS (Post 1677123)
bxyhxyh,
Not sure that FFT3DFilter would best be used that way, FFT3DFilter is spacio/temporal and SeparateFields is not good
in such circumstance (spacial displacment between even/odd fields)

EDIT: Maybe remove both Separatefields and Weave, leave rest as is.

You're right
My first version of this post was not included SeparateFields and Weave.
But I thought OP needs to remove noise before deinterlace.
It is safer to use after deinterlace.

StainlessS 10th April 2014 13:07

One option to keep interlacing while spatio/temporal processing is to process even/odd as two separate chains
(using SeparateFields, SelectEven, SelectOdd) before temporal processing on each chain, then interleave even/odd
and then weave to get back full clip.
An alternative is to use StickBoy functions in a script called something like JDL_Interleave.avs, find stickboy
stuff on Wiki (use the 'flip' option, or whatever its called).

EDIT: that was easy to find, here tis: http://www.avisynth.nl/users/stickboy/

JDL_FoldFieldsVertical and JDL_UnfoldFieldsVertical

bxyhxyh 10th April 2014 13:44

Quote:

Originally Posted by StainlessS (Post 1677128)
One option to keep interlacing while temporal processing is to process even/odd as two separate chains
(using SeparateFields, SelectEven, SelectOdd) before temporal processing on each chain, then interleave even/odd
and then weave to get back full clip.
An alternative is to use StickBoy functions in a script called something like JDL_Interleave.avs, find stickboy
stuff on Wiki (use the 'flip' option, or whatever its called).

EDIT: that was easy to find, here tis: http://www.avisynth.nl/users/stickboy/

JDL_FoldFieldsVertical and JDL_UnfoldFieldsVertical

Yes, It is helpful for temporal denoisers.

But bt=1 means pure spatial, so no need to use this. It is exactly same as not using interleave(even,odd).

@Mounir
"White fog" is caused by spatial denoisers. But I won't recommend temporal denoisers on this noise. Because very strong setting is needed. It can be lead to ghosting. Then ghosts can be masked here.

Still you can try MDegrain(truemotion=false).

StainlessS 10th April 2014 13:53

Yes thank you bxyhxyh (catchy name you got :) ), forgot that FFT3DFilter has a 2D mode (I normally just use default bt=3,
I thought default was 1).

EDIT: I kinda like VagueDenoise() for basic 2D filtering (has an Interlaced arg too I think).

EDIT: Still, Using FFT3DFilter Interlaced=True, should remove necessity for SeparateFields, I think,


All times are GMT +1. The time now is 18:05.

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