How to add a fake thermal effect to images
After experimenting with a couple of libraries, my code finally worked with OpenCV. Code and Output can be seen below.
Code
#this code uses color maps which works as thermal camera filter on the input image

import sys
import numpy as np
import cv2
import matplotlib as mpl
import matplotlib.cm as mtpltcm


def main(argv):

    while (True):
        # read the file
        input_img = cv2.imread('path_to_the_file')

        # convert image into grayscale
        gray = cv2.cvtColor(input_img, cv2.COLOR_BGR2GRAY)
        
        #initialize the colormap 
        colormap = mpl.cm.jet

        #add a normalization
        cNorm = mpl.colors.Normalize(vmin=0, vmax=255)

        #init the mapping
        scalarMap = mtpltcm.ScalarMappable(norm=cNorm, cmap=colormap)
    
        
        colors = scalarMap.to_rgba(gray)
        
        #to display the image
        cv2.imshow(&quot;_animal_name&quot;,colors)
            
        if cv2.waitKey(1) &amp; 0xFF == ord('q'):
            break

    cv2.destroyAllWindows()

if __name__ == '__main__':
    sys.exit(main(sys.argv))

Expected Output