Channel Reconstructor CTL Script

I made another CTL script, “Channel Reconstructor”. As usual its purpose is restoring damaged film scanned color images. The basic idea of film restoration in this script is diversion or mixing of channel information. In general, the correlation between channel images is very high. Its correlation coefficient is around 0.95. Therefore, the images in each channel are very similar. Our color perception is based on very subtle difference in each channel images. Therefore, with just a little value level adjustment, we may be able to restore damaged images with substituting or mixing discolored or faded color channel image with less discolored and faded color channel images. So this script is essentially channel mixer with supplemental parameter settings.

The UI of this script has three parts. First part is parameter setting for channel mixing. Second part is parameter setting to adjust reconstructed (mixed or substituted) channel image. Third part is relative color filter same as my previous scripts. You can also use ART’s built-in mask.
Ch_reconstructor_menu

$ First Part: Channel Mixer

Restoring Channel: You can select restoring target channel.

Red, Green, Blue: This parameter decide channel mixing rate or substituting channel. If you assign a non-zero value to only one channel, the image of restoring target channel will be simply substituted with the image of non-zero value channel without channel mixing. The total value of the values ​​set here is always adjusted to 1, and the RGB mixing ratio is determined by the relative value of the values ​​set here.

Gamma for R, G, B: Before mixing, you can adjust value level of each mixing channel with gamma correction. There is no need to adjust this parameter unless you are mixing channels.

Mixing channel view: You can select channel view to confirm value level of each mixing channel before channel mixing. There is no need to view channel image unless you are mixing channels.

$ Second Part: Adjustment of mixed or substituted channel image

Lightness: You can allocate multiplying value to adjust lightness of restored image.

Gamma correction: You can apply gamma correction to restored image.

$ Third Part: Relative color filter

This is same as my previous scripts. Please refer to following articles.

You can download this script from following link.

5 Likes

Film image restoration editing example

As a sample, I use the image previously presented. This is original image.


[Original image]

This image contains the following channel images.


[Channel B]


[Channel G]


[Channel R]

In this image, channel B is deeply damaged and G is slightly damaged. Channel R is less damaged. Therefore, I use channel R to restore damaged channel images.

(1) Remove uneven cyan cast with “Relative Color Correction” CTL script.


[Editing target areas]


[Cyan cast correction]
Increase the value of R to correct cyan cast.

(2) Add editing instance and select “Channel Reconstructor” to restore B channel.

Fig_last-6.1

(3) Set parametric mask L to select sky.

(4) The B channel is deeply damaged, therefore substitute B channel image with R image. To do so, first in “Mixing Channel”, move Red channel slider to 1.0 and move other channel sliders to 0.0. Next, adjust Lightness and Gamma correction sliders to get appropriate image.

(5) The next step is to correct and edit G channel image. In this time we mix R image to G image, because G image is not such damaged. As above step, we add new editing instance and select “Channel Reconstructor”, and select G as restoring channel. Set parametric mask L to select sky just like previous step.

(6) After confirming G and R image with “Mixing Channel View”, mix R channel to G channel. If value level difference of two images is not negligible, you may adjust the channel level with Gamma.

(7) After channel mixing completed, adjust the white balance.

(8) Finally adjusting tone using tone equalizer and tone curve.

(9) Output the restored image.

You can download this sample file from following link.

3 Likes

Hello @yasuo, again a very specialized script and certainly useful to restore damaged images.

Only problem for me: although I have quite some scans of older photos, none of them are as damaged as your example! :wink:

1 Like

I’ve bugfixed and updated this script. Download link is same as previous version.

2 Likes

I have created internationalized version of this script. You can download it from the link below.

I have added some parameters, and rearranged UI.

Language files are here. I can’t guarantee the accuracy of the translations.
I would appreciate it if someone could proofread them for me.
https://drive.google.com/drive/folders/1yLFFn9Yci6wbyArKboFmHH9vI7nfA__b?usp=drive_link

image

You have to copy them to the ctlscrpts/languages directory in your personal settings directory for ART.

1 Like

Hello, the filter works and the translation, in Dutch, is quite accurate.

Found a typo in Nederlands, Français and Deutsch:
CTL_OPT_LIGHTEN_OL;Alleen verlichten”.
CTL_OPT_LIGHTEN_OL;Éclaircir seulement ».
CTL_OPT_LIGHTEN_OL;Nur aufhellen“

And in German, the line “CTL_AMOUNT;Betrag”, perhaps “CTL_AMOUNT;Stärke” is a better translation, but I’ll leave that to our native German speaking friends.

Thank you for your reporting!

I have made a new version of the Channel Reconstructor script named “Channel Reconstructor with sigmoid”. I used sigmoid curve in this version.

The purpose of Channel Reconstructor is to restore the damaged channel image by mixing or replacing it with not damaged or less damaged other channel images. However, if these channel images are very different from each other, the restoration effect of channel mixing will be insufficient. To avoid such a situation, it is preferable to make their histogram shape or image similar before channel mixing.

In the previous version, only gamma correction is available for histogram shaping, and it is insufficient in its function. Sigmoid curve is more powerful to shape histogram, so I have adopted it for this purpose in Channel Reconstructor.

The UI of this script is divided into seven parts.

1. Selecting the restoration channel and method

This section allows you to select the restoration channel and method.
image

2. Channel mixer

In this part you can set the channel mix ratio for the target channel correction.

3. Input Channel Shaping Parameters

In this part you can adjust input channel images with parameters before channel mixing. The parameters are basically the same as the RGB sigmoid curve scripts and gamma correction added.

However, I have changed some label names for easier understanding. I used “darkest point” and “brightest point” for minimum and maximum point. Mathematically, the names “minimum” and “maximum” are correct, but they are related to brightness and are equivalent to black point and white point in 3-channel images. And it is not appropriate to use the name “black” and “white” for single channel. Also, I changed the name “shift” to “symmetry point”. After writing RGB sigmoid curve script, I found that GHS curve and sigmoid curve are similar, so I used common name with GHS script. However, I didn’t take the name “Stretch Factor” because I think “Contrast” is easier to understand. I will also change the label names in RGB Sigmoid Curve.

4. Input Channel View

This parameter allows you to confirm the adjusted input channel images before channel mixing. It is different from any channel preview built in ART.
image

5. Mixed Image Adjustment Parameters

These are parameters to adjust the mixed channel image. They are the same as in the previous script.

6. Relative color area mask parameters

They are the same as in the previous script.

7. ART built-in masks

You can download this script from link below.

And language files.
https://drive.google.com/drive/folders/1yLFFn9Yci6wbyArKboFmHH9vI7nfA__b?usp=drive_link

6 Likes