One way to match thermal imagery to RGB imagery in MATLAB is to use the imfuse
function. imfuse
performs an image fusion operation on two images. The function aligns the two specified input images, specifies how to blend the images, and then displays the fused image.
Here's an example function that takes in a thermal image and an RGB image and matches them:
main.m486 chars12 lines
This example function converts the thermal image to grayscale using the mat2gray
function, resizes the grayscale image to match the size of the RGB image using imresize
, fuses the two images using the imfuse
function with the 'falsecolor' blending method and the red and green channels from the RGB image, and then displays the fused image using imshow
. You can adjust these settings to match your specific needs.
gistlibby LogSnag