Selur's Little Message Board

Full Version: ColorMapping guide with vsDeOldify
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm writing this simple guide to help users using vsDeOldify to use the "Color Mapping"/"Chroma Adjustment" features recently introduced in the filter vsDeOldify.

COLOR MAPPING

Let's start with a simple example.

Here a frame obtained by using the vsDeoldify with the following code

Code:
clip = ddeoldify(clip=clip, ddtweak=True)

[Image: attachment.php?aid=2447]

The colored frame is quite good, but the woman's hand is almost yellow.

Using the "Color Mapping" feature it is possible to correct this defect.

The "Color Mapping" feature allows to change a given range of colors.

To be able to perform the change in necessary to specify the target range of colors using the HUE defined in HSV color space.

There are a lot of Painting programs that allows to see the HUE of a range of pixels, but the simpler approach is to use the following "DDEOLDIFY COLOR WHEEL"

 [Image: attachment.php?aid=2448]

In the HSV color space the colors are specified in degrees from 0 to 360. In this case it is possible to see the the yellow range is between 60 and 90. But to be more conservative it is better to include also the orange, so that the chroma range that we want adjust is the following: "30:90".

Now that we have select the range, to change the colors we need to define the HUE SHIFT that need to be added to arrive to our preferred range of colors. We want to arrive in the range that in the HUE WHEEL is called "red-violet"/"rose". To arrive in this range we need to add about 250 degrees (250+30=280->"violet", 250+90=340->"rose").

To perform this mapping is necessary to run this code after ddeoldify()

Code:
clip = ddeoldify_stabilizer(clip=clip, dark=True, colormap="30:90|+250,0.0")
 
Here the result

[Image: attachment.php?aid=2449]

The result is quite bad, but it is useful to see the range of colors that has been changed.

Now we need to specify the last parameter, the "weight". Using this parameter it is possible to merge the image obtained using the color mapping with the original image.
In this way it is possible to blend the color differences and obtain a more realistic effect.

Since we want to apply only a little change in color, we can try to retain the 80% of the original image.
This can be done by using the following code

Code:
clip = ddeoldify_stabilizer(clip=clip, dark=True, colormap="30:90|+250,0.8")

Here the new image

[Image: attachment.php?aid=2450]

Now the image is more realistic!

We can try to increase the HUE SHIFT to include also the RED component, this can be obtained by increasing the shift to 300 degree.

Let's try the following command

Code:
clip = ddeoldify_stabilizer(clip=clip, dark=True, colormap="30:90|+300,0.8")

Here the image obtained

[Image: attachment.php?aid=2451]

Even this image is quite good.

I created the following album to simplify the comparison: https://imgsli.com/MjYxNjY5

CHROMA ADJUSTMENT

The "Chroma Adjustment" is similar to the "Color Mapping" the difference is that instead to apply a HUE SHIFT to the selected hue range, the selected colors are de-saturated.

Suppose, for example that in some frames the "Violet/Red" component is too strong. In this case the color is correct but it is necessary to reduce its intensity, to do that is necessary to de-saturate the color.

For example with this command

Code:
clip = ddeoldify(clip=clip, ddtweak=True, ddtweak_p=[0.0, 1.0, 2.5, True, 0.3, 0.6, 0.7, 0.5, "300:360|0.5,0.1"],

the saturation of colors in the range "300:360" (that correspond to "red-violet/rose" of HUE WHEEL) will be reduced by 50% (parameter "|0.5") the final image will be blended at 10% (parameter ",0.1" after the de-saturation parameter "|0.5"). In this case the chroma adjustment will be applied only to the frames colored by DDColor.

Willing to apply the de-saturation on the final colored frame, it is possible to use the following command

Code:
clip = ddeoldify_stabilizer(clip=clip, dark=True, smooth=True, smooth_p=[0.3, 0.7, 0.9, 0.1, "300:360|0.5,0.1"])

To apply the adjustments to the frames colored by "ddeoldify()" it is necessary to apply the post-process filter "ddeoldify_stabilizer()".

I hope you have found this guide sufficiently comprehensive.

A helpful way to learn how to use these adjustments is to use the Presets. 
In Hybrid when is selected a Preset different from "custom" the filter parameters will be disabled, but their values will be updated with the setting defined by the Preset.

The Preset that control the "Color Mapping" is Color map while the presets controlling the "Chroma adjustment" are ColorFix and ColorTune.
 

Have fun!  Smile

Dan
looks very nice.  Does this also work when trying to get a less purple-ish looking video result from DDcolor only?
(06.05.2024, 23:22)zspeciman Wrote: [ -> ]looks very nice.  Does this also work when trying to get a less purple-ish looking video result from DDcolor only?

I updated the guide including also the "Chroma Adjustment" that should help you in getting less purple-ish looking videos.

Dan