See the Example:
data_bw=imbinarize(imread('eight.png'));
[r,c]=size(data_bw);
data_rgb=imresize(imread('B.jpeg'),[r,c]);
result=imoverlay(data_rgb,data_bw)
imshow(result);
Issues (May be)
- Are you getting any coding error?
- "an error Back Image has 3 dimensions", what does it means?
- Please ensure "Mask image, specified 2-D binary matrix of the same size as the first two dimensions of image first"
The overlay result image also have 3 dimension map as RGB.