Create an account :: Forgotten your password?
Methods for colour matching/colour grading
Moth3r's avatar Avatar background shadow
Methods for colour matching/colour grading
I want to replace the shots that are worst affected by DVNR smearing with captures from the pre-THX laserdisc. The trouble is, the old laserdisc versions appear very "green". For example:

http://img.photobucket.com/albums/v670/Moth3r/grading/2.jpg

My aim is to use the newer THX colouring (on the DC/Face LD and GOUT DVD) as a reference to automatically correct the pre-THX colours. Here is the same shot from the GOUT DVD:

http://img.photobucket.com/albums/v670/Moth3r/grading/1.jpg

Previous threads discussing colour matching:
Here Laserman posted a scientific paper describing a method of automatic colur grading using N-dimensional probability density function transfer. As far as I know this has not been implemented into anything useful yet, and the mathematics behind the method is a little over my head.
Here superrune described a method of correcting the 2004 DVD version by combining the luma information from the 2004 DVD with the chroma information from the GOUT DVD. The drawback with this method that the two sources need to be lined up in every shot, which involves quite a lot of manual work.

Near the end of the second thread, someone mentioned the AviSynth filter ColourLike. This is effectively a 1D PDF transfer, as described in the paper linked in the first thread, carried out separately on each channel. (I confirmed this by following that method, and obtained results almost identical to ColourLike). The results look like this:

http://img.photobucket.com/albums/v670/Moth3r/grading/3.jpg

A bit grainy and washed out, although apparently better results can be achieved using RGB colourspace instead of YUV (would prefer to stick with YUV, though).

Here's my attempt using a similar "semi-automatic" method, but approximating the lookup values to a smooth curve to reduce the graininess of the image. The colours aren't as accurate, though:

http://img.photobucket.com/albums/v670/Moth3r/grading/4.jpg

Anyone know of any other methods that could be implemented into AviSynth?

Max_Rebo's avatar Avatar background shadow
RE: Methods for colour matching/colour grading
This is something I've been looking at for my '97 SE project, I found the same problems with colourlike i.e. the grainy result, and like you realised I would need to approximate values for a smooth curve.

another way to improve the results (you may already be doing this but I know some people don't) is making sure your two sample histograms are taken from exactly the same frames from each source.

I tried to implement the method from the paper Laserman mentioned by rotating the colourspace in avisynth and using repeated iterations of colourlike, but this resulted in further problems because the rotations had to be normalized to 255 which lead to further graininess when it was rotated back. (am I making any sense?)

In the end I decided the only way I would get suitable results was to write a new Avisynth pluggin based on the paper Laserman mentioned and using a method similar to colourlike but smoothing out the target histogram and including several random colour-space rotations within the pluggin. Basically you'll never get a really good result without considering multiple colour-spaces as there is a problem with crosstalk between the colour channels (which is something the author of colourlike was willing to admit)

Therefore I am currently learning C++ (I have previous programming experience but not in anything C based) hopefully I'll have something useful in a couple of weeks.

However, considering the limitations of colourlike your results are already quite good.
Last edited on June 10, 2008 at 1:13 PM by Max_Rebo
Moth3r's avatar Avatar background shadow
RE: Methods for colour matching/colour grading
Yes the last image is not too bad, but I'd like to see a bluer sky and a more vibrantly red speeder, similar to the X0 project's results inthis thread.

Eagerly awaiting your AviSynth plugin...

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading

Sorry but can anybody give me a link to the colourlike filter ?

The link in the doom9 thread does not work :(

Moth3r's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading
Moth3r's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

Anyone tried PureImage?

I'm wondering if its "advanced matching and optimizing algorithm" is an implementation of the n-dimensional pdf transfer method.

Also, if it has a batch mode that could be used on a still image sequence created fro a piece of video.

http://www.mediachance.com/pureimage/colormatch2big.jpg

Last edited on September 15, 2008 at 7:21 AM by Moth3r

Sluggo's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

It would be interesting to plug the lost scenes of Luke and Biggs into that program.

http://i10.photobucket.com/albums/a117/Sluggomatic2000/slugworks.jpg 

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading
Sluggo said:

It would be interesting to plug the lost scenes of Luke and Biggs into that program.

 

Yeah that should definitely be done!

ThrowgnCpr's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

wow, thats pretty cool!! it would make for a great plug-in to a video editor.

bkev's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

So, anyone gonna plug that into Luke & Biggs' scene?

  C3PX said:

The Star Wars you see today is not the Star Wars I grew up with, and I am fine with that, it is just a memory now, something that glimpses of can be seen by peering into boxes stored away in my basement, and that recollections of can be shared with people who grew up with it in a similar was to myself, like many of the people on this board. What more could I ask for?

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading

ok, got the pureimage program, lots of fun to play with, and very quick..

but you still need to tweak parameters...but it does a lot of work for you..

doing one image at a time, could work, if you use the same reference images

per scene.... not sure if you could automate it though..

http://img402.imageshack.us/img402/8155/pure001testskh8.jpg

later

-1

[no GOUT in HD?->gout stabilize  ->color correction ->upscaling to HD ->GOUT IN HD !] <no i still don't like newsgroups, just not as badly!>

Orinoco_Womble's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

I was just having a look at the autodesk combustion page and they mentioned that one of the things they say it can do is quote: "Precise and automatic color matching of footage from different sources".  This might be the sort of thing that you're after Moth3r.  Has anyone looked into this s/w or used it before and can comment?

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

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading

 

I decided to try out the demo for the PureImage program and I must say I am very impressed with the results. It's pretty accurate. Not sure how it could be applied for video, I tried a couple ideas but it didn't work out.

It would be great if this could be used somehow. I know color correcting manually on my project continually makes me want to pull my hair out.

Anyone have any suggestions on what source in terms of color would be best to test out besides the GOUT?

 

Here's a couple random frames using the GOUT as reference (Top is SE, Middle is GOUT, Bottom is Adjusted):

And here's a short clip by recoloring and saving each frame then converting the sequence to avi (which is very time consuming).

http://www.sendspace.com/file/fj56gu

 

Last edited on November 17, 2008 at 10:47 AM by Thundercracker
Moth3r's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

The PureImage screenshots and clip look pretty good to me  (although clip is too fast at 29.97fps!) It would be useful to have the original from the GOUT disc to compare.

I know that MeBeJedi used Combustion for some of the X0 Project cleanup work; it sounds like it might be worth taking a look at it's colour matching capabilities.

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading

Okay, edited in the GOUT images to previous post. Middle image is the GOUT. Although I didn't do it for the images above, a levels adustment also helps the color matched images since they can be a bit washed out.

Sorry about the framerate on the clip.


Moth3r's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

Thanks for that. I'm liking the results; the horrible blue tint is gone but the better detail is retained (for example, look at the tuft of Taun-taun hair in the centre of the first frame, compare the GOUT with the corrected 2004 DVD.)

The corrected version of the second frame has a slight hint of yellow at the base entrance which probably shouldn't be there, but this is only a minor quibble.

Agree with you on the levels adjustment; the GOUT video is generally washed-out and desaturated.

I wonder how an application of this method to a HD source would compare with the manual correction that Ady did for his AVCHD version?

And it's a shame there's no batch mode that could be applied to an image sequence.

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading

I found a somewhat faster way of applying this to a sequence of images so I've been experimenting with this quite a bit. Here's a couple more clips:

Han-Rebel Base

http://www.sendspace.com/file/781nbm

Luke/Taun-Taun

http://www.sendspace.com/file/jie7is

I don't think it's perfect but it's definitely the closest color matcher I've seen so far. Not all the shots I've tried so far have come out great but I think's that due more to the gout quality. For example, spaces scenes don't come out well at all and the snow scenes aren't that great either or are inconsistent.

Last edited on November 19, 2008 at 3:09 AM by Thundercracker
Orinoco_Womble's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

It would be interesting to see this process applied to the very first pic that Moth3r posted of the pre-THX LD.

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

This user has no avatar. Avatar background shadow
RE: Methods for colour matching/colour grading

Has anyone tried this avisynth plugin: http://avisynth.org/vcmohan/HistogramAdjust/HistogramAdjust.html before?

Adjusts the histogram of a frame by either equalizing it or by matching with histogram of another image, or with given histogram table of values.

 

Orinoco_Womble, I did try the PureImage program on the shots Moth3r posted but they didn't come out well at all.

Last edited on December 9, 2008 at 11:54 PM by Thundercracker
Orinoco_Womble's avatar Avatar background shadow
RE: Methods for colour matching/colour grading

Yeah, I had a go on Moth3rs shots as well and I totally agree with you.  Didn't work unfortunately :(

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

Moth3r's avatar Avatar background shadow
RE: Methods for colour matching/colour grading
Thundercracker said:

Has anyone tried this avisynth plugin: http://avisynth.org/vcmohan/HistogramAdjust/HistogramAdjust.html before?

Think I looked at that once; am I right in thinking it only works on the luma channel?

 

Methods for colour matching/colour grading