Filters to smooth grainy gain noise?

NickHope wrote on 1/30/2007, 5:56 AM
We've got some nice clips of manta rays from the VX2000 but taken early in the morning and because it was dark there is a lot of grainy noise from the excessive gain.

Are there any filters for Vegas, VirtualDub etc. that can smooth out some of this grain? A lot of it is over fairly flat fields of colour, mostly just blue water.

Comments

farss wrote on 1/30/2007, 6:23 AM
lookup Mike Crash's site, his dynamic noise reduction plug works a treat.

Here it is
NickHope wrote on 1/30/2007, 11:30 PM
Thanks very much guys.

Mike Crash's filter doesn't seem to improve this particular noise very much. His smart smoother helps more but takes away detail.

Will give the FFT Denoise method a go but I've never used AVIsynth scripts before so it looks quite involved. Off on the boat for 8 nights tomorrow so I'll try it after that.

cheers
Grazie wrote on 1/31/2007, 1:54 AM
There's a trick you can do by placing a copy of one track the other, using a "filter" and adjusting the levels. You get more control. You could try that.
NickHope wrote on 1/31/2007, 4:27 AM
Grazie, you mean one above the other and adjusting the opacity of the top one?
johnmeyer wrote on 1/31/2007, 7:19 AM
The FFT filter is very easy (although very slow) to use, once you get AVISythn installed. It is truly amazing, and FAR better than any temporal denoiser (such as the one Mike Crash adapted from VirtualDub). I used it on a friends wedding reception video that was filmed with a Sony HC-3 camera with no lights. You couldn't see anyone's faces. If you've used the HC-3, if you use Color Curves to create your own post production gamma curve, you can bring up the shadows, but the noise is some of he worst I've seen. The FFT nailed it, but without those horrible ghosts and screen-door effects you get with a temporal filter. If I'd had more time, I would have used my motion estimated version of the filter, which totally nails the problems associated with moving objects, but on my computer that only works at about 1 fps.
RichMacDonald wrote on 1/31/2007, 10:45 AM
If you have all the time in the world, I cannot recommend highly enough the free open-source filter from greycstoration. Earlier thread here.

Basically, you have to batch-export every frame as a png, then run this filter on every single frame (batch tool; I use cygwin), then import the results.

I've used this tool on a 60 min project for subtle noise-reduction and it worked out great (as well as requiring 40 days computer time). I've also used this tool on some moonlight time-lapse scenes that were practically unwatchable noise after I bumped the brightness. Again, amazing results
Grazie wrote on 1/31/2007, 11:02 AM
RMD?!??? How the devil are you - old boy?
mikkie wrote on 1/31/2007, 9:52 PM
There are more avisynth filters and scripts than my (challenged) brain can keep up with, plus always new work being done. Suggestion -- unless of course you've got it licked -- would be to put some stills up, then post with links into the avisynth forums for suggestions.
johnmeyer wrote on 2/1/2007, 9:00 AM
Suggestion -- unless of course you've got it licked -- would be to put some stills up, then post with links into the avisynth forums for suggestions.

Not a bad idea, but if you do that, you'll get dozens of different suggestions: Use Pixiedust, Fairiedust, degrain, depan, despot, dust, fft, fluxsmooth, nomosmooth, peachsmoother, and vaguedenoiser (there are more -- those just happen to be the ones I've personally tried). You can then wade through all the discussions about how to motion compensate your clips prior to denoising in order to reduce the artifacts (from temporal denoisers) that result from what happens when they mistake motion of small actual objects in the video and mistake them for noise and try to eliminate them. Depan and MVTools are often used for this.

Or, you can go to those links I gave and take advantage of several hundred hours over the past four years of denoising tests and use the FFT denoiser. While, as I've often said, there is no one script that is right for every denoising situation, the one's I linked to come pretty close.

However, if you really want to dive into this yourself, here's the link to the AVISynth usage forums:

AVISynth Usage Forum

fldave wrote on 2/2/2007, 10:55 AM
Rich, thanks for the link for greycstoration! A sample pic i did turned out very nice. I am now working on a batch script to automate the GIMP process. I plan on trying this on a section of 1950's 8mm footage that is already captured. Actually, I'm taking it one step further to use VirtualDub to "unfold side by side" the interlaced footage, then feed that thru greycstoration, then put it back.

Going to compare it to the results of the AVISynth scripts that John Meyer has so generously provided to us all to see which I like best. This 8mm footage is very, very bad to start with!

By the way, nice to have you back on the boards, John M.
johnmeyer wrote on 2/2/2007, 11:16 AM
By the way, nice to have you back on the boards, John M

Thanks, it's probably temporary.

If you want to upload 5-10 seconds of your raw footage to some ftp site, I'd be happy to run it through one of my FFT scripts, so you can see if it's worth spending the time coming up to speed with AVISynth and the FFT filter. I can do it in virtually zero time (the computer has to crunch for awhile, but I don't have to do anything).
fldave wrote on 2/2/2007, 12:57 PM
Thanks for the offer, John.

This is much more than grain noise. This is full blown restoration I'm playing with. I've spent many days tweaking some of the settings from your scripts for various AVISynth plugins.

So have fun, I'd be interested to know what you can do with it! Others are welcome to try, also.

25MB 7sec AVI is here ==> Old 8mm Tripoli, Libya Footage
fldave wrote on 2/2/2007, 1:14 PM
By the way, that footage is already the result of the "capture twice/merge both into one" process. Source was video tape from 1990. No idea how the footage was transferred back then, looks like they shot the projected image with a VHS camcorder.
johnmeyer wrote on 2/2/2007, 2:26 PM
OOOkay ... I'm looking at the footage now, first in Vegas and then in Virtualdub. When you said 8mm, I didn't realize you meant 8mm film. As you know, I own a Workprinter and do 8mm, Super8 and 16mm transfers.

First let's talk about the capture. It looks like it was captured by pointing the camera at the screen (or through a rear-projection transfer box, which is the same thing). This is easy to see because 2 out of every three frames, a dust spec will appear in both fields, and then in the next frame will appear in only the odd or even field. I then counted how many frames until I saw one "clean" frame without a blend of two frames, and it looks like that happens every 2-3 frames. Thus, it looks like the projector was running at around 16 fps, which is the correct rate (which is good).

I should point out that restoring this is going to have some limitations because of this method of capture. The ideal way to capture is with something like the Workprinter, where every frame of video has exactly one frame of film. You then control the playback speed of the video either by putting a 16 or 18 fps header in the video (for WMV, for example) or through using a 16 or 18 fps pulldown (which is not a standard pattern and which a DVD player cannot do, so it has to be encoded that way). The advantage of this approach is that video is progressive, which makes it very easy to work with. Second, artifacts, such as dust spots, only exist for one frame, rather than being spread out across fields of different frames, as they are in your footage. Thus, you can use something like "despot" to remove these spots, something that cannot be done here. That filter is quite different than the usual temporal noise filter because dust spots are extremely strong (contrasty) and transient (one frame and they are gone), compared to low-light gain noise.

The second problem with the capture is that it looks like it was done using the auto exposure control on the camera. The highlights are totally blown in the short clip. Can't see a darn thing on the airplane fuselage or tail when it turns sideways to the camera. Perhaps that is only on this section. Hopefully that is the case. If you -- or whomever transferred this film -- ever does some more, it really helps to have a camera with zebra patterns. Ride the exposure until the zebras totally disappear, even if the result is too dark. Be prepared, when the scene changes to increase exposure. It is, unfortunately, pretty labor intensive. You then adjust the exposure in post, using Vegas' levels control (or Color Curves, for even better control) to, in essence, create your own gamma curve. I have an FX1, but I think the more pro version, the Z1, has a gamma curve that might be able to do some of this in-camera, if you have access to that.

OK, enough bitching.

The capture has a surprising amount of rainbowing. Since it is B&W, this is easy to see. That will be easy to fix. You could, or course, kill it by simply desaturating to pure B&W, but the noise would remain as B&W noise, even after you kill the color. A better approach is to use a filter like CNR.

Next, I separated the video into individual fields by turning fields into frames, but not replacing them (thus doubling the length, but halving the vertical resolution). I did this to see if I might be able to recover discreet frames, the way I do in my rather unusual 16mm transfer rig that I have described on previous occasions. Unfortunately, it just can't be done given the way it was transferred. Also, I was able to get a better handle on the projector speed. It is almost exactly three video fields per frame of film which means the projector speed was closer to 18-20 fps, which may be a little fast.

Here's the first attempt at just using CNR and FFT. I added a little sharpening in the FFT filter. Put this in Vegas on a track below the original. Set up a loop and then A/B. Also, stop on a few frames and then A/B back and forth. I think you will see detail in sections of the tail and elsewhere that isn't easily visible before.

CNR FFT noise reduced

This link is good for seven days.

I'll post another link here in a bit if I am successful doing anything useful with despot or descratch.
johnmeyer wrote on 2/2/2007, 3:17 PM
Well, I spent quite a bit of time trying to get the Descratch filter to work on all those nasty scratches. I just couldn't get it to work. Since they are stable over a large number of frames, the lack of frame accurate capture doesn't matter. However, the descratch filter for AVISynth just isn't good enough. I also briefly tried the Despot filter, which is touchy even when everything is progressive, but it had no clue what to do when the dust spots fade in and out over a series of fields.

Sorry I couldn't do more, but unless you can re-capture using better equipment, you will be limited in what you can get. If you have a reel you'd like me to capture, let me know.

Here's a short snippet from an amazing home movie that I recently transferred. Those are the 1929 Chicago Cubs warming up for the first game of the 1929 World Series at Wrigley Field. That same amazing reel of film also has footage of the 1929 Chicago Cardinals football team, possibly of the very famous game where Ernie Nevers scored all 40 of the team's points. It also had footage of a 1929 Chicago Blackhawks game. I've posted it all on YouTube (with the owner's permission) and have had an unbelievable response.

1929 Cubs World Series

The above link is good for one week.

fldave wrote on 2/2/2007, 4:14 PM
John, I appreciate you taking a stab at it, thanks for your help. I told you it was a mess! A friend of mine handed me a VHS tape and said "can you do anything with this?" I thought it would be an interesting challenge, and a great learning experience. It has been both, as well as frustrating. I doubt that he can even find the original reels, they were converted to VHS 17 years ago. I'll see how serious he is about restoring it.

I just downloaded and will compare the footage tonight. Thanks for your time!
johnmeyer wrote on 2/2/2007, 5:12 PM
they were converted to VHS 17 years ago

Yeah, you did say 1990 in your earlier post ... I missed that.

If it had been transferred with a Rank Telecine or similar device, and then pulldown applied, I could remove the pulldown and recover the original progressive frames. I do that all the time. I could almost do that with your footage, but the blending actually occurs within each frame.

If your friend/client is serious, it would take you about 1/10 the time to get the capture done right and then go from there. Most places charge from $0.12 to $0.20 per foot. A 3-inch reel is 50 feet; 5-inch is 200 feet; and 7-inch is 400 feet. Thus, for about $50-90 for a big can of film, you could end up with a good capture and not have to do much at all.

Just a thought ...
fldave wrote on 2/2/2007, 5:21 PM
One more thought on this: since the best footage I have available is VHS tape, would it be worth it to try to convert it back to 352x240, then try some of these cleanup tools?

It sure would be nice to have an AVISynth plugin for Vegas. There are a ton of people using AVISynth and it's hundreds of plugins.
mikkie wrote on 2/2/2007, 10:07 PM
Last I heard, talked to the avisynth folk, use in Vegas similar to Prem Pro wasn't on the charts, but who knows... Prob is Vegas is RGB & that would be a step backwards in some opinions. You can however frameserve to Vegas, but it's not pretty setting up.

johnmeyer wrote on 2/3/2007, 12:07 AM
would it be worth it to try to convert it back to 352x240, then try some of these cleanup tools?

I'm not sure whether decreasing resolution will help anything. I guess it will speed processing and you'll be able to encode a lot of video onto each DVD. But, the quality may suffer a little.

As to using AVISynth in Vegas, I had a "V-8 moment" (i.e.,. ah-ha!!) a few weeks back. The few times I had tried to frameserve into Vegas from an AVISynth script, I had used the Wax plugin on a blank event. It works, but is very limited.

Then I discovered the "trick" of using DGIndex coupled with VFAPI to read VOB files on the Vegas timeline without any performance penalty. It is amazing how responsive Vegas can be (even V7 is still sluggish with "regular" MPEG, even though it is very good with m2t).

The it hit me: VFAPI can read AVS files and serve them into Vegas. Very nice.