In many computer vision applications, the output of your algorithm is a grayscale image. However, human eyes are not good at observing changes in grayscale images. They are more sensitive when appreciating changes in color images, therefore a common approach is to transform (recolor) the grayscale images into a pseudocolor equivalent image.
Color maps
Color maps in OpenCV
In order to perform this transformation, OpenCV has several color maps to enhance visualization. The cv2.applyColorMap() function applies a color map on the given image. The color_map_example.py script loads a grayscale image and applies the cv2.COLORMAP_HSV color map, as shown in the following code:
img_COLORMAP_HSV = cv2.applyColorMap(gray_img, cv2.COLORMAP_HSV...