MATLAB: Part color part black and white

grayscale color images

I have a grayscale image. I want to change some pixels to colored pixels. How do I do that? thanks

Best Answer

You need to convert the grayscale to equivalent (gray-toned) RGB image, after which you can add color to the image.
newRGBimage = YourGrayImage(:,:,[1 1 1]); %a fast way of copying the image to three color planes
newRGBimage(:,[1 end], 1) = 255; %draw a red left and right border
Related Question