How to convert a grayscale image to a color image (rgb)?
img=im2double(imread('37_M.jpg'));
figure(1),
imshow(img,[]),
title('original');
t=imgaussfilt3(img,0.2);
figure(2),
imshow(t,[]),
title('original filtro');
img2=rgb2gray(t);
figure(3),
imshow(img2,[]),
title('original gray');
I want a final image that is the merging of the img with the img2 after it is segmented and contoured, but since img is 3D and img2 2D I do not know how to do it.