I was trying to use impixel function described in help option of matlab. it instructed to press Return. But I can't find Return.
1 回表示 (過去 30 日間)
古いコメントを表示
the following code allowed me to choose the point of my interest to identify pixel value
I=imread('3.BMP'); vals=impixel(I);
but i can't find Return, the way it is instructed in matlab help option which is shown below:
When you are finished selecting points, press Return. impixel returns the pixel values in an n-by-3 array, where n is the number of points you selected.
0 件のコメント
採用された回答
その他の回答 (1 件)
Image Analyst
2012 年 11 月 20 日
編集済み: Image Analyst
2012 年 11 月 20 日
That's the enter key on the keyboard. Alternatively you can use ginput(1) to return a column, row and then get the value from the image itself. ginput(1) does not require the user to type the enter key, if you know in advance how many points to ask your user for (this is the input argument to ginput).
[x, y] = ginput(1) % Ask for 1 point
row = int32(y)
column = int32(x)
grayLevel = grayImage(row, column)
If you don't pass anything into ginput, then it keeps letting the user specify points until he presses the enter key.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!