MATLAB Answers

0

Why does the IMPIXEL command in the Image Processing Toolbox 3.2 (R13SP1) fail to work after I have zoomed into my image?

MathWorks Support Team さんによって質問されました 2009 年 6 月 27 日
I use the following code to display an image:
figure;
imshow('rice.png');
I then zoom in the image by clicking on the "Zoom In" button on the figure toolbar. After zooming in, I use the IMPIXEL function to obtain the pixel RGB values, using the following syntax:
val = impixel;
However, the cursor does not change into the expected crosshair shape, and I cannot select any pixels on the image. I have to use Ctrl+C to exit the IMPIXEL environment.

製品


リリース

R13SP1

1 件の回答

回答者: MathWorks Support Team 2009 年 6 月 27 日
 採用された回答

In Image Processing Toolbox 3.2 (R13SP1), the IMPIXEL command does not work when preceded by interactively zooming into the image.
As a workaround, you can use the ZOOM command to zoom in noninteractively. For example,
figure
imshow(imread('rice.png'))
zoom(2)
val = impixel;
Alternately, call the ZOOM function before performing the interactive zooming and then call the ZOOM function again after you are finishing zooming to exit the zooming environment. You can then call IMPIXEL. For example,
figure
imshow(imread('rice.png'))
zoom on
%Do some zooming things here
zoom off
val = impixel;

  0 件のコメント

サインイン to comment.



Translated by