Removing scratches from film

farss wrote on 10/28/2003, 12:08 AM
When I say scratches I'm talking about ones right into the emulsion, a wet gate isn't going to help much. It'd probably get rid of the sparkling at the edges of the scratch but it's not going to put back the missing emulsion.

I've got it into VV and there's about three minutes of it with major damage right down the middle. I could rotoscope it and use photoshops clone tool to clean it up frame by frame but that's an aweful lot of work.

I'm hoping someone knows of a tool that can do this automatically. The amount of light coming through the scratch is way over anything thing else in the frame so some smart code could easily find it and heal the damage using surrounding pixels.

To make matters a bit easier it's only B&W 16mm. Its a ten minute film we made in high school shot with a 3 lens clockwork Bolexover 30 yeasr ago. The sound has survived pretty well and apart from these tram tracks the print is in good shape. Problem is it's the only print that I know of that's still in existance even though we had at least 3 made at the time.

Anyway if any one canoffer any ideas I'd be most appreciative, if I can find some space on the web somewhere I'll post a copy once it's fixed. Might be interesting to see what a bunch of amateurs could do without electricity.

Comments

Grazie wrote on 10/28/2003, 12:18 AM
I aint no specialist in these matters. I personally don't know of such a programme, but . . . . .

Farss, could you go to a type of chroma key type thing? Have the 30 seconds on a track, copy to the next track, somehow ck the "white" bits to another, suitable colour? Think masks, think replacement colour, think cloning the areas form a good portion of the exsisting footage . . . I really don't know, but maybe there is some ideas in here for you . . . I'm very interested . . . it's really pushing my knowledge out a long way . . and that aint too far!

Grazie
Grazie wrote on 10/28/2003, 12:26 AM
This any good, from the BBC?

Grazie
farss wrote on 10/28/2003, 12:34 AM
I did find this article from a few year ago which is more like what I need to deal with:

http://neuron2.net/library/scratch2.pdf

Knwo I'm sure someone makes a hardware box worth as much as my house to do it in real time, if only I can find a software solution for a more realistic price. Actually the article does mention some ideas that they have improved on that might work well enough. Having been shot with very soft lenses a masked median filter might just do the trick.

Grazie wrote on 10/28/2003, 12:46 AM
Excellent article . . I think you are onto something here.

Detection and analysis of the "type" of destruction - horizontal or vertical appears to be prime. But there again the appear to be options too.

It comes back to creating, as it were, a very "thin" video of good area maybe adjacent to the "sprokected area" and overlaying this "good" very thin, maybe 2>5 pixels width - dunno - and then superimposing this over the bad video. Apply some fine blur to merge the edges - what do you think? - I agree it wont work in all scenarios but maybe just maybe, it will be good enough to to not be recognisabel to the uninitiated - yeah?

Grazie
Grazie wrote on 10/28/2003, 1:03 AM
Farss, here's another one to add to your KB - yeah?

Interesting possibilities . . . . think "thin" video think "masks" and blurring - yeah?

Grazie

farss wrote on 10/28/2003, 1:06 AM
Grazie,
haven't really tried to see what I can make VV do with it yet bit I've got a few good ideas to start with. I thought either SoFo or Sonic had a film restoration package but it isn't SoFo so it might be Sonic. But the same memory tells me it was around USD 500 whci is a little expensive for me.

I found another article that use infared radar to find the pyhsical scratch in the film. I saw a box that did that at IBC, after or before a shoot you load the magazine ontot his unit and a monitor would show you the scratches in either the emulsion or the base material. Again very expensive.
farss wrote on 10/28/2003, 4:22 AM
Well I've tried this and it seems like it will work without a lot of effort.

I made a thin vertical rectangle in PS with soft edges and exported as a PNG.

Used that as a mask between two copies of the video with gaussian blur applied to the masked track. Apply mainly horizontal blur so the blurred in pixels at least match the adjoining ones in the X direction. I can then use track panning to have the mask track the scratch as it wanders across the frame.

It is noticable if you know what to look for, I'll try different mask widths and edge bleeding. What I'm seeing is pretty much what one of the articles decribed as being the drawback of this technique. They had a much more sophisticated algorithm for healing the damaged area.

I did find that Cintel have a product called Oliver that it seems can shine light at an angle underneath scratches and dirt to recover more of the image, DaVinci also have some smart tricks for cleaning up film but I don't expect to see stuff from either of them on a PC near me any time soon.
Grazie wrote on 10/28/2003, 5:16 AM
Wow! Seems like you have a Vegas solution after all! Well done . . . really.

The other thing I was thinking of was actually "creating" a 2>5 pixel wide "copy" [ ie PnP this area, render, yes you'll get balck but we could then CK it to tranni after ] of a GOOD piece of video next to the BAD strip and running this - all the other part set to transparent - and overlaying this phony piece of video on top of the BAD video and see what happens. Do you catch my drift here? If the thin strip of video must be moved across the screen then use Track Motion and set k/fs to move it laterally in synch with the "sproket marks" - yeah? But actual static masks, if they do the trick so be it . . . again well done!

Grazie
farss wrote on 10/28/2003, 7:44 AM
Grazie,
I'll have to actually KF the mask to gt it to track the wandering scratches but thats not too hard. Your idea is worth a go too, hadn't though of that. I'm assuming what your talking about is duplicating a few pixels into the missing area.

Actually I just had a brain wave, might be hard to do. Hmm really tricky but hey I'm game. If I can work at the field level the I can have one field shifted left and the other right. This would make the patched in edges have less of a vertical edge and therefore less apparent.

The other way that I've never tried but should work is to upscale to HD, manipulate that and then downscale. This shoud have the effect of forcing a kind of sub pixel resolution, again reduce noticable edges.
Grazie wrote on 10/28/2003, 7:58 AM
farss! That is tooo kooollll ! ! ! I love the idea of working at the field level . . very interesting indeed.

. . and yes, duplicating the pixels as a separate rolling video that you could "offset" over the scratched areas.

I also like the HD option - great stuff!

Tell me how you get on . . .

Grazie
johnmeyer wrote on 10/28/2003, 1:56 PM
farss,

If you are comfortable with VirtualDub, there is a free filter designed to do what you want. Here's the first paragraph in the description for the filter:

The main purpose of this filter is to remove spots and scratches, which are always present in the movies made from old films. As long as the movies are shot on the films, you always have these annoying little blots.

Unfortunately, the filter does not work with Satish PluginPac, so you cannot use it inside of Vegas (actually, it crashes PluginPac).

Here's the link:

SpotRemover

I have used its smoothing algorithms for some video work, but have not tried the film portion (I disabled it for the job I was doing). I suspect that it will work very well for dust flecks. I am less certain as to how well it will handle scratches.

One other thing, you need to remove the pulldown (if any) so that the filter can work on each frame of film.
musicvid10 wrote on 10/28/2003, 11:17 PM
You might advertise on these boards for someone who is a real whiz with Icarus, I bet it could be done.
farss wrote on 10/28/2003, 11:30 PM
John,
I've been meaning o get into VD for quite some time. Looks like now I've run out of excuses for putting it off. I've downloaded a lot of VD stuff including the deflicker filter as I do a lot of work with 8mm film.

I'll grab the one you gave me the link to and try it out. Damn problem is a paying client has dropped a whole heap of work on me. Have to make up a showreel for her. Would you believe she's got a mixture of UMatic, VHS, SHVS, D8, R8mm and S8mm. I've put her off too long already and now the 'no real hurry' has become urgent so I'll have to put my film restoration efforts on the backburner for a while.

I'd better be nice to her, just about convinced her to switch from FCP2 to VV!
PAW wrote on 10/29/2003, 12:54 AM
Farss

In RED 3GL there is a BCC Dust & Scatches filter, never tried it but you could download the demo and see if it does the trick.

PAW