logo Sign In

Fun with Photoshop - Denoising an LD capture

Author
Time
 (Edited)

I stumbled upon this the other day while working on another project, but it may prove to be quite useful.

Photoshop CS3 and CS4 have new features that allow you to align a number of layers and blend them together. This is the same technology used to create panoramic images from multiple photos. What you can do with it though is use it to blend a number of video frames together to remove video noise. Check this out.

I just happen to have a couple SW LD captures lying around on my hard drive, and wanted to know how well this Photoshop filter worked. So I imported a couple shots using File > Import > Video frames to layers...

I imported a shot of the binary sunset on Tatooine. Here's a screenshot of a single frame...

This is a screencap from the X0 LD capture, and there's still some noticeable video noise and a few spots around the white sun. Now, if I combine all the layers into a smart object, I can set the stack mode by going to Layer > Smart Objects > Stack Mode > Median. There are a number of options, but median seems to work best. Here's the output (with some slight curve adjustments)...

Now tell me you've ever seen a cleaner image pulled from a laserdisc. ;) The raw quality is incredible. (The only flaw here is the trail where Luke walks in this shot. You could avoid it by only using the frames where Luke doesn't appear, but the rest of the image wouldn't be as defined.)

Now, here's the cool part. Not only can you clean up a single source, but you can combine two together. Here's a frame from the exact same shot from a capture of the Japanese Special Collection LD...

...and the output...

Now if I isolate these two layers into the same Photoshop file, I can align them and blend them together with two incredibly awesome functions. Go to Edit > Auto-align layers, use Auto and uncheck the two lens correction options. This will align the two layers and warp them into place if necessary. Then go to Edit > Auto-blend layers, choose stack and check seamless tones and colors. And behold...

...a combination of both DC and SC sources.

 

Now, there are some obvious limitations here. What I've done is taken a still shot and blended together successive frames to end up with a single clean frame. This wouldn't really work for moving shots. Well, unless you figured out a way to take a high number of separate captures of the same LD and blend each frame together. That would actually be a fun project to test. The other thing I didn't try was auto-aligning all the frames together before creating the Smart Object. With how wobbly the film in these transfers is, the image could probably be even sharper with an alignment and/or video stabilization prior to import.

 

For reference, here are my screencaps from this shot:

SC:
Original frame
Clean frame

DC:
Original frame
Clean frame

Merged

And just for fun, here's a before and after of the opening shot from the SC LD:

Original

Denoised and some quick level adjustments:

For some reason, I get an error when I try to align the SC and DC versions of this shot, and I suspect it might have something to do with the starfield.

Anyway, this is such an awesome tool I thought I'd share it.

My Projects:
[Holiday Special Hybrid DVD v2]
[X0 Project]
[Backstroke of the West DVD]
[ROTS Theatrical DVD]

Author
Time
Zion said:

This wouldn't really work for moving shots. Well, unless you figured out a way to take a high number of separate captures of the same LD and blend each frame together.

Well, with a CAV disc you can use the slow-motion feature of your LD player, while still capturing at full speed, then temporalsoften(xx,255,255).selectevery(yy,1)

Oh and hi, BTW.

 

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time
Zion said:

Now, there are some obvious limitations here. What I've done is taken a still shot and blended together successive frames to end up with a single clean frame. This wouldn't really work for moving shots.

As Moth3r said this is just temporal softening, which is the same thing applied to the Laserdiscs which is why we are left with 4 eyed stormtroopers.

Well, unless you figured out a way to take a high number of separate captures of the same LD and blend each frame together. That would actually be a fun project to test.

Is that not exactly what the X0 player does? it was my understanding that it averages out the signal from 5 NTSC decoders in order to give you a less noisy output. Merging of multiple captures has been discussed a lot and is generally agreed to be a good method for obtaining a cleaner capture.

The other thing I didn't try was auto-aligning all the frames together before creating the Smart Object. With how wobbly the film in these transfers is, the image could probably be even sharper with an alignment and/or video stabilization prior to import.

It would be interesting to see if this could auto-align corresponding video frames from multiple sources accurately enough to give an improved average without any distortion artifacts, for example you could align the NTSC GOUT DVD with a PAL laserdisc capture and average them to make the most of the hortizontal resolution of the DVD and the vertical resolution of the PAL transfer.

 

Author
Time
Max_Rebo said:

As Moth3r said this is just temporal softening, which is the same thing applied to the Laserdiscs which is why we are left with 4 eyed stormtroopers.

No, we're left with 4 eyed stormtroopers because of bad IVTC on the GOUT.  The LDs themselves, if I'm not mistaken, don't suffer fromt eh "4-eyed stormtrooper" problem, just the GOUT.

Author
Time

The 4-eyed stormies are a result of the rudimentary DVNR process, which I'm sure used some sort of temporal algorythm, but that's not really what I'm getting at here.

The Photoshop filters that I've highlighted here seem more advanced than any simple temporal softening or averaging filter applied in Avisynth. The median filter doesn't just average all frames together, but seems to intelligently take the most consistent information and eliminate the anomalies like noise, burn marks, etc. (much like the TooT process). I don't know if I've ever seen anything quite like it in a video filter. Most temporal noise filters tend to leave their own unwanted artifacts in the frame on anything with motion.

What I'd love to see is how these Photoshop filters stack up (no pun intended ;)) against similar Avisynth functions when merging 5-10 captures of the same source.

My Projects:
[Holiday Special Hybrid DVD v2]
[X0 Project]
[Backstroke of the West DVD]
[ROTS Theatrical DVD]

Author
Time
 (Edited)
Zion said:

The 4-eyed stormies are a result of the rudimentary DVNR process, which I'm sure used some sort of temporal algorythm, but that's not really what I'm getting at here.

Yeah the DVNR included a lot of temporal smoothing, the 4 eyes occur because the position of the stormtroopers black eyes and black headband lined up in subsequent frames. Temporal filters always have problems with movement in the frame and should therefore be avoided (at least in my opinion).

The Photoshop filters that I've highlighted here seem more advanced than any simple temporal softening or averaging filter applied in Avisynth. The median filter doesn't just average all frames together, but seems to intelligently take the most consistent information and eliminate the anomalies like noise, burn marks, etc. (much like the TooT process).

but even using a median filter if you use subsequent frames from the same source you will get problems with motion, the only way to avoid it would be to mask out any areas that show movement (this can be done automatically in avisynth) then average the remaining areas of subsequent frames before re compositing the moving objects, but this would probably result in a noticeable difference in quality and any advantage is lost as soon as the camera moves.

I don't know if I've ever seen anything quite like it in a video filter. Most temporal noise filters tend to leave their own unwanted artifacts in the frame on anything with motion.

and your examples show these problems, i.e. Luke's 'trail' across the frame, the only reason it's minimal is because you averaged out a lot of frames and Luke doesn't stay in the same spot very long, temporal softening is only usually applied to 1-2 frames either side if you do this then you will see obvious blurring.

Sorry for ranting on about this but I really don't like temporal softening, it's a quick and dirty way of removing noise which removes detail on movement and destroys film grain.

Now onto something I do like, averaging of multiple captures to improve the quality of an analogue source.

What I'd love to see is how these Photoshop filters stack up (no pun intended ;)) against similar Avisynth functions when merging 5-10 captures of the same source.

The problem is this will not remove scratches and burn marks as they will be the same on every capture, theoretically a mean filter would be the best for removing analogue noise as it is a completely random effect, however the median filter would be advantageous in removing dot crawl, and the effects of laser rot which may not be the same on every capture.

We discussed different averaging methods using Avisynth in the V8 thread, and it isn't very easy to do a median of multiple frames with any in-built functions as it excludes them based on the difference between whole frames not on a pixel by pixel basis. However it would be possible to program a new filter that did a median for each pixel of the frame, or an even more detailed statistical analysis (assuming a large number of captures) taking into account the standard deviation etc. to deduce the center of the distribution of values for each pixel.

I would be interested in using this filter to average captures from different sources but without any temporal softening, what does it look like if you use the filter to combine your 'before' shots from the DC and the SC?

 

Author
Time
Zion said:

The 4-eyed stormies are a result of the rudimentary DVNR process, which I'm sure used some sort of temporal algorythm, but that's not really what I'm getting at here.

Ah, I see - I was misinformed then.  My mistake.

Author
Time
 (Edited)
Max_Rebo said:

The problem is this will not remove scratches and burn marks as they will be the same on every capture, theoretically a mean filter would be the best for removing analogue noise as it is a completely random effect, however the median filter would be advantageous in removing dot crawl, and the effects of laser rot which may not be the same on every capture.

I realize it wouldn't do anything at all to scratches and burn marks, but those are really separate problems anyway. Laser rot and analog noise are certainly the main focus.

My intention here was to test how effective these Photoshop filters might be when used to combine multiple captures. My samples above were just a quick and easy method to demonstrate what might be possible.

In reality, well, the results aren't as impressive. Tonight I took my trusty LD-V8000 and made 11 captures of the binary sunset shot (from the Faces LD), cropped, IVTC'd, etc. etc., and exported the same frame from each capture into Photoshop. Here is a sample screencap of the raw capture:

...and here is the output of all 11 aligned and median stacked:

Not much difference, unfortunately. If I can figure out an easier way than importing the frames into Photoshop, applying the filter, then saving as a new file, I may try to do a few seconds of video to see if there's a more noticeable difference in motion.

My Projects:
[Holiday Special Hybrid DVD v2]
[X0 Project]
[Backstroke of the West DVD]
[ROTS Theatrical DVD]

Author
Time

Something is not quite right there, as the second shot is darker.

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time

Yeah, I noticed that too. I applied the exact same level and gamma adjustments to both images (after the filtering of course). For some reason the color doesn't come out exactly right.

I did notice though that using the Auto-blend filter usually nets better quality than the mean or median stack. I'll try to post a screenshot later for comparisson.

My Projects:
[Holiday Special Hybrid DVD v2]
[X0 Project]
[Backstroke of the West DVD]
[ROTS Theatrical DVD]

Author
Time

Damn that's interesting.

Are there any updates to this or any new discoveries that you can share please Zion?

If television is chewing gum for the mind, then the prequels are the worlds first visual laxative.

Author
Time

So is this just DNR then? What about the film grain for some of the Laserdisc releases/extras which aren't onto DVD/HDDVD/Blu-ray?

If I had the X0, I wouldn't use any denoise filter. Just a straight port of the Laserdisc. That's just me.

Author
Time

I bet the same process might work in After Effects. Seeing as it is a basically the same as photoshop only more video shop LOL.

"The other versions will disappear. Even the 35 million tapes of Star Wars out there won’t last more than 30 or 40 years. A hundred years from now, the only version of the movie that anyone will remember will be the DVD version [of the Special Edition], and you’ll be able to project it on a 20’ by 40’ screen with perfect quality. I think it’s the director’s prerogative, not the studio’s to go back and reinvent a movie." - George Lucas

<span> </span>

Author
Time
DarkGryphon2048 said:

So is this just DNR then? What about the film grain for some of the Laserdisc releases/extras which aren't onto DVD/HDDVD/Blu-ray?

If I had the X0, I wouldn't use any denoise filter. Just a straight port of the Laserdisc. That's just me.

 

 I don't think you can actually see filmgrain on a ld capture.

Fez: I am so excited about Star Whores.
Hyde: Fezzy, man, it's Star Wars.
Author
Time
Arnie.d said:
DarkGryphon2048 said:

So is this just DNR then? What about the film grain for some of the Laserdisc releases/extras which aren't onto DVD/HDDVD/Blu-ray?

If I had the X0, I wouldn't use any denoise filter. Just a straight port of the Laserdisc. That's just me.

 

 I don't think you can actually see filmgrain on a ld capture.

I also read it depends on what sort of LD player you have when doing the capturing. The higher quality players result in of course high quality results. I'd like to do some LD preservation but have nary the space to house the LD player nor the budget to do so.

If I did I'd have honestly great top-notch work.

Author
Time
 (Edited)

Impressive laserdisc screen captures and enhancement. I own CAV THX and several regular editions NTSC and one rare PAL edition.

I assume your keeping the grain structure of that is inherent on 35mm to video as many have moaned about too soft and that film has grain and grittiness.

 

Only the originals from the 70mm six-track Dolby stereo Dolby format 42 will sound better on DVD/Bluray.

Author
Time

Orinoco_Womble said:

Damn that's interesting.

Are there any updates to this or any new discoveries that you can share please Zion?

I never got much farther with this, seeing as my experiment with the multiple captures returned less than stellar results.

I'd still really like to figure out a way to use Photoshop filters in After Effects though. That could open up some very nice possibilities I think.

If nothing else, the process I've outlined here could be great for creating high quality still frames from analog captures.

My Projects:
[Holiday Special Hybrid DVD v2]
[X0 Project]
[Backstroke of the West DVD]
[ROTS Theatrical DVD]

Author
Time
 (Edited)

If you still have these captures laying around your hard drive, I'd recommend using the AviSynth filter MDegrain.  It's the best temporal smoother/denoiser that I'm aware of.  It does a great job of cleaning analog video noise while producing a minimum of unwanted artifacts.  You'll get results similar to, if not better, than your first experiment.  http://avisynth.org.ru/mvtools/mvtools2.html  Even using the example scripts produce great results with analog video.

Author
Time

 

Super-resolution

http://en.wikipedia.org/wiki/Super-resolution

What if you combined all the LD captures faces LD , definitive LD the Japan LD NTSE and PAL LD’s but do it in B &W so the color differences are not a problem.

Than take the best LD for color and apply it to the B&W.