Getting pixel values from an image
古いコメントを表示
Hello, I am new to Matlab and I have a question concerning getting pixel values of an image. I have a 994x994 image and want to get every pixel value in the row 497. Could you please advise what command(s) I should use? Thank you very much.
I have loaded the image in Matlab with Imtool command and there is a pixel region window in which it shows all the pixel values I need. I am wondering if I could export them in an excel file? Thanks again.
Regards
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2016 年 7 月 22 日
You can use imread to import your image like this
Im=imread('YourImage.tif') % for example
row497=Im(497,:,:)
You can export your image to an excel file
xlswrite('file.xlsx',Im)
4 件のコメント
Gannian Zhang
2016 年 7 月 22 日
編集済み: Azzi Abdelmalek
2016 年 7 月 22 日
Azzi Abdelmalek
2016 年 7 月 22 日
What is the aim of this: Greyimage = imread(I) ? I is not a file, it's already a matrix representing an image.
Gannian Zhang
2016 年 7 月 24 日
Gannian Zhang
2016 年 7 月 24 日
カテゴリ
ヘルプ センター および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!