Home Colorize image
Post
Cancel

Colorize image

What is Colorize image

We can color the black-white(grayscale) image by Caffe Model.
The colorize model consists of many convolutional layers. Let’s see the structure of colorize model.





Steps of colorizing image using OpenCV



  1. Get the Caffe model by readNetFromCaffe.

  2. Load cluster centers.

  3. Populate cluster centers as 181 convolution kernel.

  4. Convert image to LAB.

  5. Get the L channel of image only.

  6. Resize the image to network input size(224,224).

  7. Subtract 50 for mean-centering.

  8. Concatenate with original image L.





Implementation

This post is licensed under CC BY 4.0 by the author.