I have two images of the same scene but of a different type: image1:Type RGB ([400 400 3]) and image2:type infrared ([400 400 1]).I am seeking an image by concatenating the image1 and image2 to get an image3 ([400 400 4]).
im1=imread('rgbimage.jpg');
im2=imread('infraredimage.jpg');
im3=cat(4,im1,im2);
I try with function cat in matlab but I get this error:
Error using cat
Dimensions of matrices being concatenated are not consistent.
if someone can help me , thank you