Image Pixel values

后端 未结 1 636
闹比i
闹比i 2021-01-26 12:37

I want to get a decimal values of pixel of certain grayscale image but here i require say decimal values of first 20 pixel only..(1,1) to (1,20)

I know there is pixval c

相关标签:
1条回答
  • 2021-01-26 13:29

    In MATLAB, an image is just a matrix. So accessing pixels is the same as accessing matrix elements.

    For example:

    im = imread('someimage.jpg');
    
    firstrow = im(1,:);
    firstcol = im(:,1);
    first20pixels = im(1:20);
    

    I have no idea what you mean by "need adjustment of mouse over image".

    0 讨论(0)
提交回复
热议问题