View Full Version : removal of scratches
cheops
2nd December 2004, 15:35
Hi,
This is my first post so don't be too hard on me.
I have read through quite a few posts on these forums regarding denoising and cleaning vhs videos and tried various denoisers, but cannot get anwhere near the quality i was expecting to get especially as this is captured on a top svhs player through the svideo port on the back of my top panasonic with built in tbc.
I have white lines appearing across the picture which i need to get rid of and also it needs degraining and probably brightening in some parts look below
http://members.lycos.co.uk/cheops1206/test.jpg
I am pretty scared to decide on which is the best way to clean this up as it is part of a wedding video and want to retain as much quality as possible as its pretty old.
I have provided a link to segment of video captured on my ASUS AGP AX800 pro TIVO at 720x576 PAL HuffyUV through the SVIDEO from a panasonic NVSV121EBS.
will be up in an hour still uploading
----------
Video Clip (http://members.lycos.co.uk/cheops1206/test2.rar)
----------
I would like to see other peoples thoughts on this if anyone could help it would be much appreciated.
Thanks in advance
Cheops
nicco
2nd December 2004, 16:56
I would suggest to use these filters if you want to clean this movie:
Removedirt
convolution3d
I like tem
and of course deinterlace it if your target is PC.
I don't know about white lines
:)
tsp
2nd December 2004, 17:04
DeGrainMedian would be a good choise to remove the white lines
trolltuning
2nd December 2004, 18:35
I had some footage with white lines that were similar to these but worse. It was shot with an analog vhs camcorder. I assumed that the camera lens was misaligned and didn't use the tape in the project. Does any one know if this is what causes these lines or if its something else. (Sorry if slightly off-topic but I needed the screen shots to refer to).
cheops
3rd December 2004, 14:34
Thanks for your help
I have tried the DeGrainMedian but unfortunately that doesnt get rid of the lines, or I can't get it to work.
Is there anything else anyone can recommend?
Thanks
Wilbert
3rd December 2004, 14:54
try descratch
http://www.doom9.org/index.html?/capture/descratch.html
If you go to capture forum -> capture guide, get v4.1, because it contains an updated version wrt this topic.
ps, I changed your title a bit.
Didée
3rd December 2004, 15:07
There were some more or less experimental filters for such dropout problems, but actually I can't remember them ...
However, you could try *wether* the following little script is able to catch most of the white lines:
AviSource("YourSource.avi") # or whatever
div = 8
mul = 208
# sharpen(0,1) # perhaps it gets better with this
ML=string(mul)
in=last
tmp=in.separatefields()
e1 = tmp.DEdgeMask(0,255,0,255,"-8 -16 -8 8 16 8 0 0 0", divisor=div)
e2 = tmp.DEdgeMask(0,255,0,255,"0 0 0 8 16 8 -8 -16 -8", divisor=div)
e = yv12lutxy(e1,e2,yexpr="x y * "+ML+" /").weave().greyscale()
#interleave(in,e)
stackvertical(e,in)
return last
Play around with "div" and "mul" to see if it gets good enough. If yes, it could be used as a mask to copy a strong-cleaned clip over those dropouts.
(You need the famous MaskTools (http://manao4.free.fr/MaskTools-v1.5.5.dll) for the script to work.)
cheops
3rd December 2004, 15:46
Thanks.
I'll give it a go and update you with the results.
p.s i hate choosing titles ;-)
tsp
3rd December 2004, 15:57
try
DeGrainMedian(limitY=255,limitUV=255,mode=0)
this is a strong filtering try lovering limitY if this causes to many artifact.
Or if you don't care about blurring try Medianblur with this code:
medianblurt(2,-1,-1,1,true,true)
just remember to download
MVTools (http://manao4.free.fr/MVTools-v0.9.8.1.zip) first.
cheops
3rd December 2004, 17:00
Didée thanks :D
that worked brilliantly to get a mask of the scratches D :D
Only it seems to have problems with scratches that are over 2 interlaced lines high?
you say "If yes, it could be used as a mask to copy a strong-cleaned clip over those dropouts."
how would i go about doing this????
once again thanks for all your help everyone.
tsp
3rd December 2004, 21:46
hmm seems as if DegrainMedian can't do it but Medianblurt(0,-1,-1,1,true) does. You can increase the 0 to 2 if you want to remove all the white lines.
Mug Funky
4th December 2004, 15:13
here's something that appears to work. it uses:
- kassandro's "repair.dll". i think it comes with removegrain
- MVtools
- MaskTools
function MCremovespot (clip c)
{
vfw = c.mvanalyse(pel=1, isb=false, blksize=8)
vbw = c.mvanalyse(pel=1, isb=true, blksize=8)
clensed=interleave(c.mvcompensate(vfw, thSCD1=1000),c,c.mvcompensate(vbw, thSCD1=1000)).clense().selectevery(3,1)
spotmask=yv12lutxy(c,clensed,yexpr="x y - abs 24 > 255 0 ?",Y=3,U=-128,V=-128).expand()
overlay(c,clensed,mask=spotmask)
}
AVISource("C:\Ack\test2.avi")
assumetff()
converttoyv12(interlaced=true)
odd=last.separatefields().selectodd().mcremovespot()
even=last.separatefields().selecteven().mcremovespot()
interleave(odd,even).weave()
assumetff()
it's a little slow, and it ONLY removes the white lines - the video still needs denoising, but i'd prefer not to do that, as i suspect there'd be no actual video left once the noise is gone...
basically it recreates the current frame by motion-compensating the previous and next frames, and assumes any big enough differences between them are transient spots to be removed. the motion compensation allows this threshold to be lowered (which is good on noisy sources).
once it has a map of the spots/scratches/etc, it replaces them with the temporal median of the motion-compensated frames.
on the short clip you provided, it seems to work very well.
[edit - made code block smaller font]
Fizick
4th December 2004, 20:39
Do you know about good old Despot plugin? :)
cheops
6th December 2004, 10:28
Mug Funky thanks this seems to do the trick it removes 80% of the scratches on the whole hour long video thanks for your help.
Fizick I had a go with the DeSpot plugin but couldn't get it to remove any of the scratches.:confused:
Thanks for your help
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.