This project tackles image restoration and coloring for old damaged black and white images. The restoration problem tackels automatic damaged region detection which turns out to be a hard problem to automate. The successful resotrations still require some form of tweaking the Kernel parameters (dilate/erode/color threshold, etc.) in the code. The coloring portion Opencv DNN based Caffe framework to colorize black and white images. One can find the Caffe models here
Restoration is based on two methods which can be used depending on the situation. First uses simple thresholding + bilateral filter to generate the masks. This is useful in cases where images need not be context aware and the foreground/background separation is good. The second method uses thesholding followed by foreground/background segmentation which is robust in cases where background and foreground color are in close range. Both methods currently only work for whitened damaged regions but can be extended to any colored regions. One can note the difference in masks for first method and second method below:
Damage masks generated by method 1 and 2 respectively
Corresponding outputs from the damage masks. Note that method 2 performs better in this example.
Damage masks generated by method 1 and 2 respectively
Corresponding outputs from the damage masks. Note that method 1 performs better in this example.