how to plot an image and a logical matrix on same plot
Show older comments
Hi,
I have an image in a matrix (uint 16) and a matrix that contain the border of a mask that i have done to the image. i want to plot the image and the mask together, so i can plot them together and see them both.
the two images are in the attached file.
when im plotting them together, i only see one of the pictures (using hold on). The problem is that the logical matrix is max 1 and the image matrix getting different values grater than 1 so i dont see it. I want it ti be like a line in different color on the image that represent real data.
edit: i added another image (this time Matlab image) that contains 4 images. I want print every two images (from the same row) together in a way that will be able to see the avarage frame and the mask bounderi that was created by my function.
thanks in advance.
2 Comments
Ameer Hamza
on 3 Apr 2020
I guess you don't need to plot the mask as an image. You can use plot() function to draw the boundary. Can you attach the image and the mask in a mat file so that it will be easy to suggest a solution?
Idan Golcmn
on 4 Apr 2020
Edited: Idan Golcmn
on 4 Apr 2020
Answers (1)
darova
on 3 Apr 2020
Try this
ind = mask > 0.8;
img(ind) = max(img(:));
imshow(img)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!