Krashtan T. Colorization of marked images with the residual markers removal // International scientific journal "Internauka". - 2017. - №18.
Technical Sciences
UDC 004.925.6
Krashtan Tamila
Student of the
National Technical University of Ukraine
"Igor Sikorsky Kyiv Polytechnic Institute"
COLORIZATION OF MARKED IMAGES WITH THE RESIDUAL MARKERS REMOVAL
Summary. Solutions for the problems associated with semi-automatic image colorisation. The comparative analysis of proposed approaches to get rid of residual markers based on computations complexity and final image quality.
Key words: colorization, image processing, computer graphics.
There is a wide range of approaches to colorize images. One of the easiest among them is the colorization method, which uses pre-applied markers [1]. Its output depends on the quality of the input images.
Three types of images were used to study this effect: images with clear object boundaries and two types of noisy images: grainy and blurred. The samples of results are provided on figures 1-3. They show that the noisiness does not create problems for colorization.
Fig. 1. Colorization of the image with clear boundaries
Fig. 2. Grained images’ colorization
Fig. 3. Blurred images’ colorization
As a result there are two problems of this approach for image colorization: blurred color at the boundaries of the object and the background and the markers which remain visible on the resulting colorized image. Solutions to the first problem are demonstrated widely in the field of object recognition using computer vision [2].
Techniques like over-exposure correction could be used to solve the second problem [3]. However, none of these methods uses already available information about markers placement, therefore the problem needs further research on whether emergence of markers depends on their thickness or brightness. Figure 4 illustrates this study on an example of three images.
Fig. 4(a) Noisless image with thin dim markers
Fig. 4(b) Noisless image with thin bright markers
Fig. 4(c) Noisless image with thick bright markers
Fig. 4(d) Grained image with thin dim markers
Fig. 4(e) Grained image with thin bright markers
Fig. 4(f) Grained image with thick bright markers
Fig. 4(g) Blurred image with thin dim markers
Fig. 4(h) Blurred image with thin bright markers
Fig. 4(i) Blurred image with thick bright markers
It is clear from the given images that the brighter markers remain on colorized images and the thickening of markers doesn’t aid in getting rid of the markers.
The original algorithm needs to be modified to remove the markers. For this reason two algorithms will be considered. One of them is based on approximation of the marker color and the color of the pixels around it. The second applies the repeated colorization on the pixels of the marker.
Approximation algorithm. The algorithm requires a bitmap colored image and information about the position of the markers on the original image. The image is presented in YUV color model. The coordinates of markers’ pixels are stored in an array.
The algorithm approximates the pixel color with the color of the pixels in the window of given size around it. 3x3 is the smallest sufficient size of suah window around the pixel for effective work of the algorithm. In current realization the image is handled using the window of the minimal size, since it gives a chance to work with simpler functions and process the image with higher speed.
The 3x3 window is moved along the border of the pixel so that at least 3 of 8 pixels in the window (the central one is not counted) do not belong to the marker zone, while the central pixel is at the marker area (figure 5).
Fig. 5. The window around the pixel. Pixels of the marker are gray
Values of U and V channels are set to f0, f1, f21, f22 according to the formulas:
As can be seen from figure 6, the approximated function is linear. The block diagram of this part of the algorithm is shown in figure 7.
Fig. 6. Linear approximation function in case of 3x3 window.
Fig. 7. Block diagran of f3 approximation
The processed pixel is removed from the array and henceforth is considered not belonging to marker.
Colorization with markers removal using this algorithm may be shown with figure 8. On this diagram original markes the original black-and-white image, marked - black-and-white image with markers, colorized - colorized image, markers approximated - result image after markers removal.
The results of using this method are shown at figure 9.
Fig. 8. Approximation algorithm diagram
Repeated colorization algorithm. This algorithm requires colorized bitmap image and the original black-and-white image without markers. It is divided into two parts. In the first one the ordinary colorization of black-and-white image is used: the colored markers are placed on it, the unmarked part of the image is approximated. This part results in the colorized image with the resided markers’ traces as well as the coordinates of the markers.
In the second part of the algorithm the colors from the original black-and-white image are placed on the area of the markers on the colorized image. This time the markers’ area is colorized.
The diagram of this process is showed on figure 10.
а) b) c)
Fig. 9. Comparison of colored images before and after approximation of residual markers. a) black and white images with markers; b) colored images with residual markers; c) the same image after markers smoothing.
Fig. 10. The repeated colorization algorithm diagram
The results of using this algorithm are shown at figure 11.
а) b) c)
Fig. 11. Comparison of images during the repeated colorization algorithm execution. a) black and white images with markers; b) colored images after the first iteration; c) the same image after the second iteration.
Summary. Colorization of marked images is popular due to its simplicity and high speed. Hovewer, there are some problems associated with this algorithm, one of those is the residual markers on the resulting images. Two approaches were used to remove them. None of them requires additional computing power. The first algorithm involves the processing of the marker area after image colorization. The color of the marker area is approximated with the colors of the closest pixels around. The second approach involves the repeated image colorization with the marker being an area to be colorized.
Compared to the second algorithm the first one allows to process the whole image, but only its marked part, so the processing time is reduced, while the quality of the resulting image is worse. The application of one of the algorithms can significantly improve the quality of colorized images.
References