MATLAB: Image conversion image How to convert a binary matrix into RGB image? Best Answer rgbImage = uint8(cat(3, binaryImage, binaryImage, binaryImage)); Related SolutionsMATLAB: How to change color in overlapping image You can use cat(3, r, g, b) to combine images into any color channels you want. MATLAB: How to display pair image (One RGB and other binary) Try this:rgbImage = imread('02_dr.jpg');grayImage = rgb2gray(rgbImage);binaryImage = uint8(im2bw(grayImage));result=[rgbImage, cat(3, binaryImage, binaryImage, binaryImage)];imshow(result);And see section 20.5 here in Vision Bib for much better algorithms that you're using. Related QuestionSetting pixel to maximum color values in grayscale image.How to find the distance between two random selected blobs in an Image
Best Answer