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
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!