|
|
high noise, 2nd or 3rd generation VHS PAL tape
For a local soccer league DVD about quot;duty of carequot;: a 2nd or 3rd generation copy VHS PAL tape captured Huffy interlaced TFF 704x576. 50 frames=20Mb download at files/16995680/cut.avi.html. Tried script
Code:
LoadPlugin(quot;C:\Program Files\AviSynth 2.5\plugins-dcw\degrainmedian.dllquot;)
LoadPlugin(quot;C:\Program Files\AviSynth 2.5\plugins-dcw\Convolution3d.dllquot;)
LoadPlugin(quot;C:\Program Files\AviSynth 2.5\plugins-dcw\despot.dllquot;)
LoadPlugin(quot;C:\Program Files\AviSynth 2.5\plugins-dcw\RemoveGrainSSE2.dllquot;)
AviSource(quot;D:\HDTV\cut.aviquot;, audio=false)
AssumeTFF()
ConvertToYUY2(interlaced=TRUE)
Crop(0, 0, -0, -12, true)
Addborders(0,6,0,6)
SeparateFields()
even = SelectEven()
odd = SelectOdd()
even=even.Convolution3D(0, 32, 128, 32, 128, 10, 0)
odd=odd.Convolution3D(0, 32, 128, 32, 128, 10, 0)
Interleave(even,odd)
Weave()
AssumeTFF()
DeGrainMedian(limitY=5,limitUV=7,mode=0, interlaced=TRUE)
Converttoyv12(INTERLACED=TRUE)
DeSpot(median=false, interlaced=TRUE, seg=0, show=0) # seg=0 means STRONGwith resulting 2mb .mpv via HC cq=3 at files/16995917/cut.mpv.html. Tried other filter combinations eg Wilbert's Reinterpolate420 instead of ConvertToYUY2, CNR2 near the start, Pixie(limit=7) instead of DGM, fft3dfilter instead of DGM, but the above seemed to produce the most useful result so far. Anyone like to suggest a script they use for these type of tape captures, or a more useful script than the above ? Even a link, by a kind soul, to a past thread...
I've written dozens of de-noising scripts for NTSC VHS, but never been very satisfied. However, the script below just blows away anything I did before. I've used Pixie, FluxSmooth, and many others. I've used VirtualDub filters, both temporal and spatial. This FFT filter, combined with motion estimation provides amazing ability to reduce noise with an order of magnitude less artifacting than other approaches. It is extraordinarily slow, although you can do many things to speed it up. One thing is to only use the plane=0 part of the filter, and then use CNR2 for the chroma filtering. You can apply CNR2 prior to the motion estimation and still get good results. However, what follows is the quot;ultimatequot; no-holds barred version (actually I am sure that for some, using the simple quot;bobquot; makes it less than ultimate, so I will point out that you might get marginally better results by using a smarter bob deinterlacer).
For VHS material, you can get much faster operation by eliminating all the motion estimation and the bobbing and weaving (sounds like boxing) and just simply use the fft filter with interlaced=true. It is still an amazing filter even when reduced down to just the fft line by itself.
BTW, the quot;sigma=7quot; setting on the the quot;plane=0quot; line is the main control. If you look at the doc for fftcd, you'll see lots of other things you can twiddle as well. Try cranking sigma way up to 20 or 30 just to see what happens. While that is way more than you'll want to use, it is truly amazing how little ghosting or other obvious artifacts are created (although you do start to lose detail). If you want higher settings without losing too much detail, read the doc and experiment with sigma2, sigma3, and sigma4.Code:
#This is the quot;ultimatequot; as of the date this was last saved. Still seems to leave noise
#around really bright objects, like date/time logos.
#Serve RGB32 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.
#For use in Virtualdub, BOTH RGB 16:235 boxes must be checked AND YUY2 Disable must be checked in MC DV codec.loadPlugin(quot;c:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dllquot;)
loadPlugin(quot;c:\Program Files\AviSynth 2.5\plugins\depan.dllquot;)
source=assumebff(AVISource(quot;D:\Documents\Dnload\UNPACK\20030425.aviquot;))
#These plugins require color space conversion
sourceYV12=converttoYV12(source,interlaced=true)
b=bob(sourceYV12)
motion=DepanEstimate(b, fftw=true)
x=DepanInterleave(b,data=motion)
YToUV(fft3dfilter(x, sigma=2, plane=1, sharpen=.25,interlaced=false).UToY,\
fft3dfilter(x, sigma=2, plane=2, sharpen=.25,interlaced=false).VToY,\
fft3dfilter(x, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false))
c=SelectEvery(3,1)
mot_est=c.assumebff().separatefields().selectevery(4,0,3).weave()
mot_estThanks, I'm trying yours as well as a couple of variations of Fizick's examples with his MVtools, and will post links to the results in a day or 3.
At 1st glance my original script produces something barely usable and not great... yours is sort-of better although I have to wind up the sigma to about 17-20 and then it washes out detail quite a lot.
Cheers
Try using all 4 sigmas, hopefully you can narrow it to one frequency band that needs to be heavily filtered (singa=highest, sigma4=lowest) and let the others be more moderate.
When doing noise reduction, remember that the process is called quot;reduction,quot; not quot;elimination.quot; Your goal is not to eliminate the noise, although that would be nice. Instead, you are trying to create a more watchable picture. If you find yourself cranking the controls up to maximum, then you are going to be disappointed with the results, no matter what filter, or group of filters you use. I have seen dozens and dozens of posts on this board and elsewhere over the years where people show the results of their work and I just cringe.
The script I posted was for a particular video that had a specific problem. No one script will work in every situation. Having said that, the script I posted should reduce the typical quot;snowquot; type noise that is commonly found in low-light video, or in over-the-air broadcasts. And of course Foxy's advice about trying each of the other Sigma controls is a good one. Try each one by itself, with the others turned down, and see if you can figure out a quot;profilequot; for the noise you are dealing with. |
|