Bug when zooming imagesc?

조회 수: 4 (최근 30일)
craq
craq 2018년 8월 2일
I am plotting an image and overlaying it with a semi-transparent mask. The mask labels various objects in the image and will be used for image segmentation. I plot both the image and the mask with imagesc. When I zoom, the alignment of mask and image shifts. I can't think of any reason why that should happen, so my suspicion is that there is a bug somewhere in the zooming of image objects, or in imagesc.
I noticed that the shifting only happens when one of the image dimensions gets large (over about 1000 pixels width or height).
Here's an example so you can verify for yourself:
N=5;
z = zeros(20,1200);
x = z;
x([N,end-N+1],:) = 1;
x(:,[N,end-N+1]) = 1;
y(:,:,3)=x;
% x(:,:,3) = z;
figure
imagesc(y)
hold all
% keyboard
ih1 = imagesc(x);
set(gca, 'colormap', [1 1 1; 1 0 0]);
set(gca, 'clim', [0 1]);
ih1.AlphaData = 0.25;

답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by