I am working on an app that generates heat/ thermal map given a picture. i have been able to get what i expected using python opencv builtin function
cv2.applyColorMap(img, cv2.COLORMAP_JET). Everything works exactly as expected. But i want to understand how
applyColorMap works at the back end. I am aware how several image filters (like image, edge filters) work by convolution / cross correlation with appropriate kernals, but i can't seem to pull the same concept for color maps.
For this question lets consider a color map where we want :
Brightest ones: (RED COLORED)
MEDIUM INTENSITY ONES: (YELLOW COLORED)
LOW INTENSITY ONES: (BLUE COLORED)
What i have done:
I tried dividing the pixels into 3 categories and replaced each pixel with the either of the colors (RED, YELLOW, BLUE ) depending upon it's value from gray scale image( 0-255). This approach had a problem that there were solid 3 colors in the image with no variation in intensity of the individual color while in a good heat map there is blend of colors ( it decreases or increases ) based upon the intensity . I want to achieve that effect. I would appreciate any help or any lead to understand how heat maps work .