PDA

View Full Version : Analogical artifact removal


Oliver
6th January 2009, 22:06
Hi everyone,
I have recorded a movie on a DVD recorder but the source is taken from the analog tuner. The main artifacts are a vertical red thing on the right of the image and some kind of "horizontal noises" all across the image. See the two attached samples to show what I mean. How can I remove all that ? What kind of functions and plugins should I use ?

Video Dude
7th January 2009, 03:03
Welcome to the forum.

For the red/pink borders, a simple solution is to Crop them. You can then use AddBorders to restore the original frame size if you do not want to resize the video. You can add pixels to both left and right sides of the video so it will be centered and you won't have one large black border on the right side (for compression try to keep the borders mod8).

There are many denoisers available to clean up the video. You can try dfttest and see how it does. Other good choices are FFT3DFilter, MCTemporalDenoise, HQDN3D, etc...


http://avisynth.org/warpenterprises/

R3Z
7th January 2009, 09:10
For horizontal lines (usually frequency interference) try FQuiver or Defreq. I did a mini howto here;

http://forum.doom9.org/showthread.php?p=1227005#post1227005

Oliver
7th January 2009, 23:58
Thanks a lot guys.

@R3Z : I tried using f2quiver but it still asks for FFTw3.dll though I put it in the avisynth plugins directories as well. What's the problem ?
Also, if I understand correctly, f2quiver uses some kind of inverse fourier transform to remove artifacts. Maybe I could use it to remove the red thing on the side. Its signature might appear in the diagram. Please tell me more about this. It could be a very powerful tool.

thetoof
7th January 2009, 23:59
FFTw3.dll goes in your system32 folder

R3Z
8th January 2009, 03:41
Thanks a lot guys.

@R3Z : I tried using f2quiver but it still asks for FFTw3.dll though I put it in the avisynth plugins directories as well. What's the problem ?
Also, if I understand correctly, f2quiver uses some kind of inverse fourier transform to remove artifacts. Maybe I could use it to remove the red thing on the side. Its signature might appear in the diagram. Please tell me more about this. It could be a very powerful tool.

As The Toof suggested, you need to put it in the system32 folder.

That garbage at the borders isnt fixable, its best just to crop it out and then resize your footage or add borders. That stuff was usually overscanned anyway so on most tellies you couldnt see it.

Still, i always crop it out and resize my footage.

Oliver
14th January 2009, 16:52
I have a few problems using f2quiver. Some filters doesn't seem to work at all, especially butterworth filters like bhb or bhh. Gaussian filters seem to work. Any idea ?
Plus it is really hard to figure out how to tweak the values, how they work and what results you can expect.

R3Z
15th January 2009, 02:47
I have a few problems using f2quiver. Some filters doesn't seem to work at all, especially butterworth filters like bhb or bhh. Gaussian filters seem to work. Any idea ?
Plus it is really hard to figure out how to tweak the values, how they work and what results you can expect.

Can you post a sample of you video ? Prefferably a 10 second VOB/MPG2 that you can cut with DGindex, ProjectX or VideoRedo.

Oliver
18th January 2009, 19:06
I have DGIndex but I can't figure out how to cut 10 seconds and save it to a vob file. I've read carefully the help file of DGIndex and I couldn't find anything. Any idea ?

Comatose
18th January 2009, 19:29
Seek to to the start of the part you want to keep, press the [ button
Seek to the end of the part you want to keep, press the [ button
File -> Save Project and Demux Video -> Upload the m2v

Oliver
19th January 2009, 03:15
Thanks. I thought it had to be a vob file.
Is it possible to attach the file to a post ? I don't know how to upload it to make it available otherwise.

R3Z
19th January 2009, 03:56
Thanks. I thought it had to be a vob file.
Is it possible to attach the file to a post ? I don't know how to upload it to make it available otherwise.

Sorry i should have been more clear as to the file output :(

Anyway if you dont have upload space you can use rapidshare, megaupload or sendspace to upload files.

jeffy
19th January 2009, 05:04
or MediaFire
http://www.mediafire.com/

Oliver
19th January 2009, 15:29
Correct me if I'm wrong but I thought rapidshare and megaupload weren't free.
Anyway I used mediafire : http://www.mediafire.com/download.php?ngeyjzd1lmy

R3Z
21st January 2009, 06:08
I had little luck with Defreq or F2quiver either. It doesnt help that the source is not the actual content ie the stuff you are watching. This is mainly large undetailed blocks of color of which aggressive filtering wont lose much detail.

Anyway i suggest a motion compensated DegrainMedian with norow=true. This will not process the same row twice, good for lines.

This script got rid of 90% of the lines;

Your Source()

Bob(0,0.5) #only used to give calm base to mocomped denoise

Source=last.Crop(8, 2, -20, -2).Spline36Resize(720,576) #purely for comparison at end

prefiltered = degrainmedian(norow=true, mode=0,limity=10) #aggresive for better motion search
super = MSuper(levels=1,rfilter=4)
superfilt = MSuper(prefiltered)
backward_vectors = MAnalyse(superfilt, isb = true)
forward_vectors = MAnalyse(superfilt, isb = false)

forward_compensation = MCompensate(super, forward_vectors)
backward_compensation = MCompensate(super, backward_vectors)

interleave(forward_compensation, last, backward_compensation)
DeGrainMedian(norow=true, mode=1) #norow filters single rows, good for getting lines could be less aggressive
selectevery(3,1)

Crop(8, 2, -20, -2).Spline36Resize(720,576) #Cropping to get rid of garbage frame and resising to original size

Diff=Subtract(source,last).Levels(127, 1, 129, 0, 255) #just for comparison

Interleave(source,last.subtitle("filtered"),diff.subtitle("diff"))

It would be better if you could give us a sample with some scenes in it :) That would give us more to work with.

Oliver
22nd January 2009, 00:15
I took the first seconds because I thought that the simplicity of the image would help isolating the bad frequencies and cleaning it. If you really need a sample with a scene, tell me. Maybe the script you gave me would be enough to work with the rest of the movie. Anyway I have recorded other movies with exactly the same kind of artifacts, one of them being an anime. I hope I won't have to post a sample for every kind of image I have. Anyway, thanks a lot for taking the time to work on this script. I really appreciate that.

R3Z
22nd January 2009, 05:09
I took the first seconds because I thought that the simplicty of the image would help isolating the bad frequencies and cleaning it. If you really need a sample with a scene, tell me. Maybe the script you gave me would be enough to work with the rest of the movie. Anyway I have recorded other movies with exactly the same kind of artifacts, one of them being an anime. I hope I won't have to post a sample for every kind of image I have. Anyway, thanks a lot for taking the time to work on this script. I really appreciate that.

I wasnt trying to come across as bitchy :( My apologies if i did :). I was just thinking it may be easier to get a frequency pattern from some other footage.

I suggest giving that script a go as it will show the difference between the filtered and non filtered. The reason i suggest trying it first is that DegrainMedian is a pretty aggressive filter, but its also very fast and good at removing those lines.

If you plan on recording this stuff back to dvd, then a plain bob is fine and then simply add the lines;


SeparateFields()
SelectEvery(4,0,3)
Weave()

That will return an interlaced clip TFF as per the original. If you arent putting them back on DVD, try a better de-interlacer like SecureBob() i love this one, MVBob(), MCBob etc.

Maybe use a little limitedsharpenfaster and your set. Thats one of many possibilities anyway mate.