• Apr 19, 2026 least squar matching matlab code t to grayscale if necessary if size(fixed_image,3) == 3 fixed_image = rgb2gray(fixed_image); end if size(moving_image,3) == 3 moving_image = rgb2gray(moving_image); end % Convert images to double for processing fixed_i By Andreane Corwin