4

如何通过在图像上移动鼠标指针在matlab中查看图像的像素强度?

我用了:

imshow(imread('image.jpg'));

但是没有选项可以查看图像中每个像素的像素强度。

例如,

      In MS-paint, while moving the mouse pointer 
      over the image we can see the location of 
      the pixel such as (20, 117) at the status bar. 

但我需要查看像素强度。

有没有其他选项可以查看。还是我需要编码才能查看?

4

3 回答 3

2

另一种更具交互性的选择是

   imtool(imread('image.jpg')); % For GrayScale Image

   imtool(rgb2gray(imread('image.jpg')));  % For RGB Image
于 2013-07-10T06:31:29.823 回答
1

如果要创建强度图,可以使用 MATLAB 的rgb2gray. 这会将您从中获得imread的 n×m×3 RGB 数组转换为包含像素强度的 n×m 矩阵。

然后,您可以将交互式数据光标指向当前鼠标坐标的强度矩阵。

于 2013-07-10T05:55:29.913 回答
0

你有impixelinfo并且impixelinfoval用于显示交互式信息。

于 2013-07-10T06:07:50.347 回答