MATLAB Answers

Using visboundaries with imagesc

11 views (last 30 days)
Hi to all,
I am trying to use the visboundaries command to plot some boundaries over an image plotted with imagesc.
subplot(2,4,1), hold on, imagesc(W_1,[min,max]), visboundaries(Vmask), hold off
The problem is that visboundaries "flips" the image upside down. How can it be solved?
Find below the results:
Best, thanks Giulio

Accepted Answer

Image Analyst
Image Analyst on 1 Sep 2017
I don't know exactly what you're doing but it doesn't flip the image. Try this demo:
grayImage = imread('coins.png');
subplot(2,2,1);
imshow(grayImage);
subplot(2,2,2);
histogram(grayImage);
grid on;
mask = grayImage > 100;
subplot(2,2,3);
imshow(mask);
subplot(2,2,4);
imshow(grayImage);
hold on;
visboundaries(mask);
Try calling hold on AFTER you've displayed something, not before.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!