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 19th November 2002, 16:52   #21  |  Link
slk001
Registered User
 
Join Date: Apr 2002
Posts: 399
Assuming they aren't noise too .

True, so true... in fact, this is one assumption that you have to make when you are going to try to replace the noise with what you think is "good" data.

This is one approach, but it has the disadvantage that it tends not only to reduce more noise but also destroy more details.

Well, not really. If your pixel under test value is "8", and its temporal neighbors are both "5", then the probability that this pixel is noise and not detail data is quite high (remember, my vision of this filter would be to NOT FILTER if the temporal neighbors exceeded a threshold, and detail is NOT LIKELY to be only one frame long). But this technique would also almost completely remove single frame movements (like the slashing sword). That is why I believe an additional test of the pixels SPATIAL neighbors ABOVE and BELOW (although maybe not DIRECTLY) would be needed.

Unfortunately since noise is inherently random, we can't be sure of anything like that.

Again, this is so true. Unfortunately, we have to put a limit on how much we expect our filter to do. If the source is getting too noisey, then we have to direct our filter to shut down.

Just because the pixel was originally a 5 and is now an 8 doesn't make that pixel's value useless -- we just need to correct it, and that's the hard part.

When noise corrupts a signal, it tends to not just slightly modify the value, but instead tends to send the value to one of the luminance rails (16 to 235). This is where, of course, averaging is less than perfect.

You mean distributed over several horizontal pixels?

For TV, the answer is yes. This is because TV is sent out serially and noise, when it occurs, affects a "serial string" of data. This means that determining an average with a pixel's 8 spatial neighbors is likely to contain corrupted data in 3 of them. However, if this spatial averaging is done with the top 3 and bottom 3 neighbors, only 1 is likely to be corrupted.

The type of noise that I am interested in filtering, is the random (but sometimes heavy) IMPULSE noise, like from ignition noise or lightning strikes. These are perfect candidates for my replacement "theory" of filtering as opposed to simply trying to average it out.

The filter I envision would probably fail miserably against a picture with heavy picture snow (as would most noise filters). Here, the only alternative would be the averaging techique that you propose.

I can send you a clip of the type of noise that I am talking about, if you are interested.
slk001 is offline   Reply With Quote
Old 19th November 2002, 17:31   #22  |  Link
SansGrip
Noise is your friend
 
Join Date: Sep 2002
Location: Ontario, Canada
Posts: 554
This is because TV is sent out serially and noise, when it occurs, affects a "serial string" of data. This means that determining an average with a pixel's 8 spatial neighbors is likely to contain corrupted data in 3 of them. However, if this spatial averaging is done with the top 3 and bottom 3 neighbors, only 1 is likely to be corrupted.

This is interesting, I hadn't considered it that way. I'm going to let it percolate through my brain and see if I can work it into some kind of algorithm .

I can send you a clip of the type of noise that I am talking about, if you are interested.

Sure, maybe we can spot some kind of pattern that could be useful in working out a filtering technique.
__________________
Regards,
SansGrip
SansGrip is offline   Reply With Quote
Old 19th November 2002, 17:40   #23  |  Link
SansGrip
Noise is your friend
 
Join Date: Sep 2002
Location: Ontario, Canada
Posts: 554
New version 0.3

Here's 0.3 which fixes a very bad bug that significantly changed the algorithm. Since fixing this I've also been able to put the defaults back up to 7, 7. I was tempted to put them higher but I decided to wait for some feedback on that first.

It includes both a 2.0/YUY2 version and a 2.5/YUY2/YV12 version.

I also made some optimizations, and for me at least it runs fairly quickly (roughly 6-7fps faster than C3D movieHQ on 720x480 material). Though bear in mind that its performance depends on the amount of noise in the clip, and is still pure C++ with no assembler.

For very noisy sources try jacking up the thresholds. You'll be surprised how far you can go with them before you see artifacts.

I'm pretty pleased with this filter as it seems to remove a great deal of the most noticible noise with very little impact on details (depending on the threshold, of course).

Feedback is, as always, very much appreciated. I'd be especially interested in hearing its effect on compression, as well as suggested defaults for various kinds of sources (clean DVD, noisy DVD, cable captures, digital captures, etc. etc.).

Let me know .
__________________
Regards,
SansGrip

Last edited by SansGrip; 16th December 2002 at 21:10.
SansGrip is offline   Reply With Quote
Old 19th November 2002, 18:07   #24  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,296
Hi SansGrip, it seems that your site is not reachable..it's been like this for two days now
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 19th November 2002, 19:10   #25  |  Link
SansGrip
Noise is your friend
 
Join Date: Sep 2002
Location: Ontario, Canada
Posts: 554
Hi SansGrip, it seems that your site is not reachable..it's been like this for two days now

It seems to be a problem coming from Europe, for some reason. Would someone unable to get to my site please do a traceroute to www.jungleweb.net and PM me the result? I administer the server so I'm very interested to know why it's not working .
__________________
Regards,
SansGrip
SansGrip is offline   Reply With Quote
Old 19th November 2002, 19:23   #26  |  Link
ajp
Registered User
 
Join Date: Oct 2002
Location: Sweden
Posts: 83
DNS lookup failed, can't find the host...
ajp is offline   Reply With Quote
Old 19th November 2002, 19:26   #27  |  Link
slk001
Registered User
 
Join Date: Apr 2002
Posts: 399
The site works fine for me.
slk001 is offline   Reply With Quote
Old 19th November 2002, 19:41   #28  |  Link
slk001
Registered User
 
Join Date: Apr 2002
Posts: 399
The site works fine for me.
slk001 is offline   Reply With Quote
Old 19th November 2002, 19:45   #29  |  Link
vlad59
Vlad, the Buffy slayer
 
vlad59's Avatar
 
Join Date: Oct 2001
Location: France
Posts: 445
It works fine for me too (I'm from France)
__________________
Vlad59
Convolution3D for avisynth 2.0X : http://www.hellninjacommando.com/con3d
Convolution3D for avisynth 2.5 : http://www.hellninjacommando.com/con3d/beta
vlad59 is offline   Reply With Quote
Old 19th November 2002, 19:50   #30  |  Link
rocker60
Registered User
 
Join Date: Mar 2002
Location: Pt
Posts: 11
Not for me
I'm from Portugal-(Europe)
rocker60 is offline   Reply With Quote
Old 19th November 2002, 20:18   #31  |  Link
ajp
Registered User
 
Join Date: Oct 2002
Location: Sweden
Posts: 83
Works for me now...weird... DNS server problems probably...
ajp is offline   Reply With Quote
Old 19th November 2002, 20:20   #32  |  Link
SansGrip
Noise is your friend
 
Join Date: Sep 2002
Location: Ontario, Canada
Posts: 554
heheh thanks for the feedback. Based on a traceroute from Columbia we figured out something was wrong in the firewall (the senior administrator had been a little over-zealous fighting spammers and accidentally blocked most of the world outside North America ).

Should be accessible to everyone now, though it might take a little while for DNS caches to sort themselves out.

Thanks for the reports and my apologies for the downtime .
__________________
Regards,
SansGrip
SansGrip is offline   Reply With Quote
Old 19th November 2002, 20:27   #33  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 2,599
It works great for me (but I am not in Europe).
Asmodian is offline   Reply With Quote
Old 19th November 2002, 22:28   #34  |  Link
cult
Registered User
 
cult's Avatar
 
Join Date: Nov 2001
Location: greece
Posts: 383
works here,europe
cult is offline   Reply With Quote
Old 19th November 2002, 23:03   #35  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
slk001,

When noise corrupts a signal, it tends to not just slightly modify the value, but instead tends to send the value to one of the luminance rails (16 to 235). This is where, of course, averaging is less than perfect.

You’ve definitely got heavy “salt and pepper” interference. I see something similar on a couple of channels when a certain fluorescent light with a dimmer switch is turned on. My solution has been to turn off the light.

If you can’t find the source of the interference, it would be better to use a filter designed for getting rid of dots rather than noise. A simple temporal/vertical median should work very well for that. You might want to try Tom’s Undot, from

http://www.trbarry.com/UnDot.zip

SansGrip,

Yep, noise (not just interference) does tend to be horizontally correlated. I don’t know how many pixels you have to go before you approach independence — By eyeball, I would guess about 10 to 15 (with NTSC broadcasts and a pixel width of 720).

With respect to slk001’s problem, I think it would make sense to design the filter for use with noise or with salt and pepper interference, but not both. The two problems are different enough that it would make more sense to use separate filters for them.

About skin identification — I take it that skipping filtering on pinkish walls doesn’t look so good. Maybe the thing to do with skin color stuff is to use only slightly less filtering on it? That would reduce blurring, and might be subtle enough not to be noticed elsewhere.
__________________
9:) Lindsey Dubb

Last edited by High Speed Dubb; 19th November 2002 at 23:06.
High Speed Dubb is offline   Reply With Quote
Old 19th November 2002, 23:29   #36  |  Link
SansGrip
Noise is your friend
 
Join Date: Sep 2002
Location: Ontario, Canada
Posts: 554
You’ve definitely got heavy “salt and pepper” interference. I see something similar on a couple of channels when a certain fluorescent light with a dimmer switch is turned on. My solution has been to turn off the light.

Very efficient, but does it work with YV12?

Yep, noise (not just interference) does tend to be horizontally correlated. I don’t know how many pixels you have to go before you approach independence — By eyeball, I would guess about 10 to 15 (with NTSC broadcasts and a pixel width of 720).

Interesting. You don't think it would help to take that into account in a smoother designed for captures?

About skin identification — I take it that skipping filtering on pinkish walls doesn’t look so good.

It looks pretty bad .

Maybe the thing to do with skin color stuff is to use only slightly less filtering on it? That would reduce blurring, and might be subtle enough not to be noticed elsewhere.

That might work. I'll have to play with the code and see what I can do with it.
__________________
Regards,
SansGrip
SansGrip is offline   Reply With Quote
Old 19th November 2002, 23:46   #37  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
I had a “red noise” reducer in an unreleased early version of Peach Smoother. It did help, but the same technique hasn’t worked for the more advanced versions of the filter. It’s somewhere on my list for future things to try — I think there is a way to make good use of horizontal correlation even for the current algorithm.

The general approach I’ve tried has been to use inferred noise to the left as a predictor for the current noise. In other words, if the pixel to the left has an inferred noise of 4, then you can predict before even looking at the next pixel that it will have an expected noise of 4*k. This follows from a model called a (buzzword coming...) Ornstein-Uhlenbeck process.
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 19th November 2002, 23:50   #38  |  Link
SansGrip
Noise is your friend
 
Join Date: Sep 2002
Location: Ontario, Canada
Posts: 554
This follows from a model called a (buzzword coming...) Ornstein-Uhlenbeck process.

Good Lord. Something as simple as that has a name so complex? I suppose the tricky part is deciding on a value for k...
__________________
Regards,
SansGrip
SansGrip is offline   Reply With Quote
Old 20th November 2002, 02:21   #39  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
It’s a continuous random walk model, with an extra term which causes the result to move toward the “true” value.

You can call it “red noise” instead, since that sounds less intimidating. But then people think it has something to do with color, which it doesn’t.
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 20th November 2002, 02:44   #40  |  Link
SansGrip
Noise is your friend
 
Join Date: Sep 2002
Location: Ontario, Canada
Posts: 554
You can call it “red noise” instead, since that sounds less intimidating. But then people think it has something to do with color, which it doesn’t.

I'm still fuzzy (no pun intended ) on the whole coloured noise thing. It's something else to add to my to-do list. Now I'm never going to get round to learning Esperanto...
__________________
Regards,
SansGrip
SansGrip 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 07:49.


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