View Full Version : Horizontal artifacting problem, any filters that can help?
yeedog
20th January 2006, 07:42
I'm getting this horizontal distortion on one of my videos that was captured from an old VHS tape. I don't really know what to call the error so i've had a hard time searching for an answer. Maybe somebody here can point me to some filters that could help resolve with my problem?
Here is a small video that shows what is happening.
http://yee.is-useless.org/test.avi
Thanks for any help that is offered.
--Brian
Mug Funky
20th January 2006, 08:07
kill it with fire!
umm, try adjust the tracking on your VCR (and remember you've done it, because it's likely it'll then be thrown off for any other tapes you want to cap).
if that doesn't work, see if you can find a device with a timebase corrector (TBC). a lot of DV cams have them, which is handy, though their effectiveness varies.
if that doesn't work, it may be this tape was dubbed off a source with crappy sync, in which case you're SOL.
there's no avisynth filters that will correctly do TBC, because they can't work on all the video info (including sync pulses). i believe clouded (aka mg262) has had a bit of luck making one, but i doubt it can handle the likes of that sample.
mg262
20th January 2006, 12:54
I didn't post the script because none of its many variations had no effect on the one (vicious) example I was sent when I asked for this kind of material some time back. You can judge this one for yourself:
http://people.pwf.cam.ac.uk/mg262/posts/tbc1.png
Mug Funky
20th January 2006, 14:16
that actually works pretty well.
if one were to average several captures and use this on each one, it could be really useful.
mg262
20th January 2006, 15:12
You're more than welcome to it if you want... but the current iteration is a little < 1 FPS. I wanted to test the idea quickly so I used a trick from the guy who sent me the TBC clip (Wull -- not sure of your nick here, but the credit's yours): I split each NTSC frame into 480 frames, one per line, used my Cel stabilisation, and merged the frames back, like this:
original.SplitLines()
Stabilise()
MergeLines()
Actually, that's not the whole story... syncing each line to the previous one didn't work so well -- getting one pair of lines wrong meant the rest of the picture was shifted as well. So instead of syncing each line to the previous one, I synced it to the same line in a reference picture made by massive vertical blurring. Should be clear from the picture:
http://people.pwf.cam.ac.uk/mg262/posts/tbc blur.png
You can probably improve on it by fiddling with the script (e.g. with a temporal blur). I should probably turn the thing into a sensible plug-in and let you play with it...
Other thought: For this kind of clip, where the left-hand edge is black and the rest of the picture is bright, you could obviously do a lot better by trying to line up that left-hand edge... but that won't work for darker pictures.
Mug Funky
20th January 2006, 15:29
i must say, that's quite ingenious. i would never have thought about doing it that way. i'm gonna knock up something similar just to wrap my head around it :)
rfmmars
20th January 2006, 15:35
Would go into detail on the whole process? This is of great interest to me.
THX
Richard
photorecall.net
Fizick
20th January 2006, 18:36
We call it line jitter.
There is filter VHSRest for VirtualDub by my Russian friend midimaker.:)
http://midimaker.narod.ru/filters/vhsrest.html
I also tried create (fft) filter Dejitter, but it is in alpha stage (not finished).
Osmiridium
21st January 2006, 02:18
mg262 wrote:
...I used a trick from the guy who sent me the TBC clip (Wull -- not sure of your nick here, but the credit's yours)
Cheers.. that'd be me then. :) I must admit I never got too far with the idea - last thing I did was try to combine it with a lining-up-the-lefthand-side approach, but without much luck either (some frames looked good - others were ruined). But I really like your blurring twist on things. I think/hope this could turn into something very usable. :D
yeedog
21st January 2006, 06:25
Thanks for the replies everybody :)
This taped is a dub from another tape that i recieved probably 5 years ago. The person who gave me the tape is unknown and i don't remember if It was like this when i got the tape or not.
I tried playing with the tracking on my VCR but the problem didn't get any better. So my gut feeling is that the problem was in the orginal tape and it was just dubbed over to my copy.
To reply to some posts directly...
Other thought: For this kind of clip, where the left-hand edge is black and the rest of the picture is bright, you could obviously do a lot better by trying to line up that left-hand edge... but that won't work for darker pictures.
How exactly whould I do this? I'm still fairly new to these kinds of things. If you can point me to a filter that will do this i'm sure i could figure out how to use it from the read me.
What you did so far in the right pic looks pretty good from what was the orgianl tho. Maybe some tweeking and using the above method you talk about could give me something usable.
We call it line jitter.
There is filter VHSRest for VirtualDub by my Russian friend midimaker.:)
http://midimaker.narod.ru/filters/vhsrest.html
I also tried create (fft) filter Dejitter, but it is in alpha stage (not finished).
Thanks I'll check VHSRest out and see what i can do.
Thanks again to all that replied.
mg262
31st January 2006, 12:10
Sorry, this thread slipped my mind...
Osmiridium,
Thanks again for the sample! The vertical blur was totally useless on your mining clip (which is why I binned the method at the time), so it's never going to make a real TBC...
rfmmars,
there isn't that much to say... essentially, you have
a) the source image
b) a reference image (constructed by e.g. massive vertical blurring)
and you independently move each line of a) left or right to try and find a position in which it best matches the corresponding line of b). [Using SAD of the pixels or SSD of the pixels or Fourier methods or whatever you like.]
It should be pretty fast because two scanlines will load into cache very nicely... I'd be surprised if you couldn't get this working in real-time. At the moment I'm tied up trying to speed up that Foreground filter (well actually, at this exact moment I've ripped my compiler off my machine in an unsuccessful attempt to fix .NET crashing every five minutes...) but if I have some spare time in future I'll rig up a filter AlignLines(clip source, clip reference).
Osmiridium
1st February 2006, 14:25
mg262 wrote:
Thanks again for the sample! The vertical blur was totally useless on your mining clip (which is why I binned the method at the time), so it's never going to make a real TBC...
Ooops... sorry that nasty clip of mine put you off development. :o I'm pleased though that yeedog's clip has sparked interest in this subject again.
I'd definitely be interested in seeing an AlignLines filter. I have other footage which isn't *quite* as bad as the mining clip, and anything that could be done to improve it in any way would be most welcome!
zilog jones
6th February 2006, 23:40
I'd be interested in seeing this filter too! I have some old camcorder stuff (sample here (http://www.skynet.ie/~zilog/a1.avi)) that could certainly do with less of the wobbles ^_^
Osmiridium
13th February 2006, 11:51
We call it line jitter.
I also tried create (fft) filter Dejitter, but it is in alpha stage (not finished).
I was able to combine your DePan filter with mg262's drastically-smoothed reference-clip idea. And all to good effect with my horrible mining clip. Very slow because of how I had to script things, but I'm sure a dedicated filter would be a bit speedier. If I had half a clue about FFT I'd maybe have a go myself. :o
Less jitter (http://www.ircnet-scotland.org.uk/pictures/tbc.png)
vcmohan
15th March 2006, 13:27
I have tried two methods to correct. 1. A new plugin I have developed Dejitter Simple detection of start of row by some amplitude in a window. The result is
http://img96.imageshack.us/img96/5488/dejittered02ti.th.jpg (http://img96.imageshack.us/my.php?image=dejittered02ti.jpg)
2. By cross correlation in a window. Done in one dimensional freq domain. Averaged rows prior to correlating with central row. The correlation maximum which determines shift required is the length of the pink in image below. Its disappointing, possibly should have expected as cross correlation would be averaging image lineaments which can be in any direction. Also image frequencies are so low, that the maximum can be any where over a broad plateau.
http://img96.imageshack.us/img96/3592/xcor01ju.th.jpg (http://img96.imageshack.us/my.php?image=xcor01ju.jpg)
Simplest is the best. In some rows dejitter does not do a good job but overall it is ok, I feel.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.