Skip to content Skip to sidebar Skip to footer

Correct Way For Converting RGB Heatmap Image To Grayscale Heatmap

I am trying to convert a RGB heatmap image to grayscale heatmap image. First I thought It was a simple rgb to grayscale conversion. But it isn't. For example, blue color may repre

Solution 1:

You can follow these links. They have got some good notes on heatmaps and grayscale

https://docs.opencv.org/3.1.0/de/d25/imgproc_color_conversions.html https://matplotlib.org/users/colormaps.html

*UPDATE

First, you need to convert your BGR image to LUV then convert it to a grayscale image. Use opencv.

Code for converting BGR to LUV in opencv.

gray = cv2.cvtColor(img, cv2.COLOR_BGR2LUV)

I think it what you are looking for


Post a Comment for "Correct Way For Converting RGB Heatmap Image To Grayscale Heatmap"