PDA

View Full Version : Google fail ... help on multiple captures


Paazabel
17th October 2009, 17:52
I captured a VHS tape. There was random horizontal drop-out-like noise. I captured a second time to see if the lines were in the same places. They were NOT. I had an idea to get rid of the noise using a "median" filter. I captured the tape a third time and began searching for such a method while it captured.

I know that the ultimate source of this noise is somewhere in the electronics of my capture system. I have tried several things to get rid of it, but have had no real luck. If you have ideas on this, please send me a private message - that is not really the topic of this thread.

I have used a few filters (like deVCR, degrain, etc.) to try and get rid of these lines ... but that has also failed.

I have seen this thread (http://www.doom9.org/index.html?/capture/postprocessing_avisynth.html) about 10 times already, this morning. This is not what I want to do, though it may be a last resort.

Here is what I am looking for:
The noise that appears in these frames should not be "averaged" because I know they are not good pixels. By using a "median" function, the bad pixels could simply be discarded. This should not soften the video or do many other tricks that may help, and I am okay with that because most of this video is pretty clear. The JVC has been able to deliver great color and quality with the exception of this noise.

Below, see 3 "frames." Each has noise in a different spot (represented here by 0's). I want to be able to combine these frames in a way that the median value for each pixel in the three frames is the chosen value.

.Cap 1...Cap 2...Cap 3...Final
|5 5 5| |5 6 0| |6 5 6| |5 5 5|
|4 0 0|&|4 5 5|&|4 4 5|=|4 4 5|
|3 4 3| |3 3 4| |0 0 3| |3 3 3|

The zero's drop off the final frame.

I can't believe that such a filter does not exist, already or that some settings that escape me might not be able to do this with something like Convolution3D ... but the settings escape me. I'm looking for video love in all the wrong places. I have spent several hours Googling for all the wrong answers to this seemingly simple question.

Can someone please point me to the right filter or something in the script language that might do this?

Example frames:
http://www.sgt.cc/pix/d/48127-1/BlueTape1.jpg
http://www.sgt.cc/pix/d/48129-1/BlueTape2.jpg
http://www.sgt.cc/pix/d/48131-1/BlueTape3.jpg

Paazabel
17th October 2009, 17:55
Strange ... that 3rd capture is way softer. With the first two, the cover of the VCR was off ... the third, I had put it back on. Wonder if I have a grounding issue ...

Didée
17th October 2009, 18:51
http://avisynth.org/warpenterprises/#medianblur

Interleave( cap01, cap02, cap03 )
MedianBlurT(0,0,0,1)
SelectEvery(3,1)
This isn't waterproof for several reasons (sync issues due to framedrops, par ex.) ... just your idea made working.

Paazabel
17th October 2009, 19:11
Funny, I was in the middle of setting up your 3-way average. Thanks for the response.

When you say "sync issues," you mean if the captures are otherwise damaged? They all have the same number of frames and are otherwise clean, so when you say "waterproof," is that what you mean? I am only looking to pinpoint the random line defect, and this *should* do so.

Popping it into Notepad, now.

Didée
17th October 2009, 19:30
"... setting up your 3-way average." - It's the median, not the mean.

It's an absolute must that all caps are frame-identical in time. All three caps having the same number of frames is an indicator, but not a guarantee. Imagine cap1 has dropped frame 199, cap02 has dropped frame 12345, cap3 has dropped frame 54321. All three caps have the same number of frames, but the result of median-filtering will be bad.

I'm just pointing out a possible issue. If your captures are free of dropped frames, and therefore fully in synch with each other, then everyting is fine.

Paazabel
17th October 2009, 19:41
There are still a few random hits where the lines must appear in 2 of the 3 captures. However, this is SIGNIFICANTLY better (possibly the difference between "watchable" and not).

The first is the filter as posted. The second is putting the "soft" capture as the middle of the interleave (clp1, clp3, clp2) and then using a temporal radius of 2 (prev-clp2, cur-clp1, cur-clp3, cur-clp2, next-clp1).

http://www.sgt.cc/pix/d/48187-1/TemporalMedianRadius1.jpg
http://www.sgt.cc/pix/d/48185-1/TemporalMedianRadius2.jpg

Paazabel
17th October 2009, 19:44
"... setting up your 3-way average." - It's the median, not the mean.
I meant the one posted in the original thread where you do a "temporal soften" to average them.

Didée
17th October 2009, 21:11
Well, that thread is about general noise reduction, for which plain averaging is a good way.
Point is you are wrongly referring to "me" here ... your reference dates 7 years back, and it seems you've mixed up "dividee" and "Didée", which are two different users. Oh, and back then, I was an avisynth greenhorn. ;)

Paazabel
17th October 2009, 21:16
So it is. If I can't master details like that, what's a little horizontal noise? ;)