Convert grayscale images to RGB

I'm not quite sure if this is in the right place, so let me know ...

That is why I am completely transparent, this is part of the course work for my course at the university. To this end, please do not send an answer, but please give me tips and tricks in the right direction. I have been working on this for several days without much success.

I am tasked with converting a grayscale image to an RGB image. It has been suggested that we should segment the image and add colors to each segment using an algorithm. He also noted that we could develop algorithms for both the RGB color space and HSI to improve visualization.

My first thought was that we could segment the image using some threshold technique (based on gray brightness values), and then add colors to the segments, but I'm not sure if this is correct.

I program in Java and use the OpenCV library.

Any thoughts / ideas / hints / suggestions appreciated :)

+5
source share
1 answer

A very nice presentation describing various coloring algorithms.

http://www.cs.unc.edu/~lazebnik/research/fall08/lec06_colorization.pdf

The main idea is to compare the texture / brightness in the source and target images, and then transmit the color information. A better match with you, better be your decision. However, comparing the intensity values ​​in the laboratory space can be misleading, since many pixels in the original image may have the same brightness values ​​around them. To overcome this problem, segmenting the original image using texture information may be useful, and then you can pass the color values ​​of the matching textures instead of the brightness values.

+1
source

Source: https://habr.com/ru/post/1205562/


All Articles