PDA

View Full Version : Antialiasing "fixed webcam" footage


koopa
5th October 2008, 06:34
Hello to the fountain of knowledge that is you AVISynth folk! This time I beg of you all the speedy answer to the following:

I have got some terrible security cam footage (think webcam) that I am trying to clean up.

The files are: 24fps @ 352x288 Intel Indeo Video 3.2

In actual fact, the resolution seems to be lower than that, and the files are actually a non-predictable ~10fps with repeated frames (making temporal denoising hell), that were originally low bitrate MPEG-4s (no way to access original data).

I would love to put up a screen grab, but so far I don't have permission.

What I'm asking is this, there seems to be a LOT of aliasing going on, there are stairs on all curved borders, and 'smooth' gradients (like a lamp shining on a wall) look like a pick-a-colour-for-your-paint-sample-booklet. There is little motion, and the cameras do not move.

I've tried a few antialiasing methods (AAA, EEDI2().TurnRight().EEDI2().TurnLeft() ), but feel there is a better option out there. Any suggestions?

Also any tips on dropping frames below a certain change threshold while maintaining framerate / timing would be much appreciated!

Thanks

Blue_MiSfit
5th October 2008, 09:33
Dup()

Will likely help with the dupe frames, as it will replace very similar frames with exact duplicates (improving compression).

~MiSfit

45tripp
5th October 2008, 18:44
I would love to put up a screen grab, but so far I don't have permission.

what,
like from your mother? :p

imageshack.us

and rather/better a video sample,
mediafire.com

Comatose
5th October 2008, 18:51
Like from the company he works for, which might fire him if they find out.

45tripp
5th October 2008, 19:25
amounts to the same thing.

possibly funnier, certainly more obscure.

antialiasing came up very recently for another atrocious source:
http://forum.doom9.org/showthread.php?t=141595

thetoof
5th October 2008, 19:27
If you have AnimeIVTC.avsi in your plugins folder:
daa()
Or
c=last
dbl = merge(c.nnedi(1),c.nnedi(0))
dblD = mt_makediff(c,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain(11),U=3,V=3)
DD = shrpD.repair(dblD,13)
dbl.mt_adddiff(DD,U=3,V=3)
This might help...

Comatose
5th October 2008, 19:51
amounts to the same thing.

possibly funnier, certainly more obscure.
Not really. Getting fired (and perhaps even sued) isn't something most people would want to risk.

koopa
6th October 2008, 03:04
Yes, there's a chance this footage could be used in a criminal matter, so I really wouldn't want to risk putting it on the net without permission!

Thanks so much for the suggestions/links guys, I've hashed together this script and it works great:

TurnLeft()
o = last
AssumeTFF().SeparateFields()
dbl = mt_Average( SelectEven().EEDI2(field=1,maxd=4),
\ SelectOdd() .EEDI2(field=0,maxd=4), U=3,V=3 )
dblD = mt_MakeDiff(o,dbl,U=3,V=3)
shrpD = mt_MakeDiff(dbl,dbl.RemoveGrain(11),U=3,V=3)
DD = shrpD.Repair(dblD,13)
dbl.mt_AddDiff(DD,U=3,V=3)
TurnRight()

EEDI2().TurnRight().EEDI2().TurnLeft()
fft3dfilter(bt=3, sigma=4, plane=0, sharpen=1)


It is a travesty when it comes to efficiency though (it is a progressive video, surely the step to separate fields is completely unnecessary, but can't quite work out how to eliminate that step)

Basically Didee's script eliminates the 'big stairs', EEDI2().TurnRight().EEDI2().TurnLeft() eliminates the 'little stairs', and ff3dfilter was just the sharpening script I liked best :P (2.5fps, sigh)

Any ideas about speedups?

Thanks again!

Sagekilla
6th October 2008, 03:32
You can try FFT3DGPU instead of FFT3DFilter ;)