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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 20 de Nov. de 2012
Editada: Image Analyst
el 20 de Nov. de 2012
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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!