MATLAB: Color array to grayscale, images image I have two jpg images that I need to store as matrices of doubles then convert their color arrays into grayscale matrices. how would I do that? *I attached the photos in a zip file Best Answer % Read the imageimg1 = imread('photo1.jpg');% Convert it to doubleimg1Double = im2double(img1);% Convert from RGB to grayscaleimg1Gray = rgb2gray(img1);% Display the resultsfigureimshowpair(img1, img1Gray, 'montage')You can do the same for 'photo2.jpg' Related SolutionsMATLAB: Overlay binary image on RGB image Is this?RGB_image=imread('image_test.jpg');subplot(311);imshow(RGB_image);bw_image=im2bw(rgb2gray(RGB_image));subplot(312);imshow(bw_image);result=imfuse(RGB_image,bw_image);subplot(313);imshow(result);Detail documentation here MATLAB: Gray2rgb conversion temp = YourGrayImage;if isfloat(temp) temp = im2uint8(temp);endColorImage = ind2rgb(temp, TheColorMapToUse); Related QuestionGrayscale, monochrome, binary image in matlabMatlab imshowSaving images in PNG format, as grayscale, without white-spaces.Saving images in JPG format, as grayscale, but i get white image in full
Best Answer