MATLAB: 256×256 medical image gives me 256x256x3

image fusionmedical imagewavelet

I need a 256×256 pixels image to use it in my project. I downloaded images from the internet, but when I read the image, it stored in a 256x256x3 variable (color image format PET images). the NSCT fusion algorthms gives me errors (dimension of matrices)
What is the reason for this and what can I do? here is the code to read the image
img1=imread('pet.jpg');
img2=imread('ct.jpg');

Best Answer

You can convert it into gray image using rgb2gray.
I1 = rgb2gray(I) ; % where I is RGB image
Related Question