how to get the coordinate information of the left bottom corner of an image in the figure window.
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
binbin cui
il 27 Lug 2016
Commentato: binbin cui
il 28 Lug 2016
The coordinate of the encircled corner.
3 Commenti
Risposta accettata
Image Analyst
il 27 Lug 2016
Unfortunately the annotation() function to draw arrows works only for figures, not axes. So you can use this: http://blogs.mathworks.com/pick/2009/05/29/arrows-of-all-kinds/?s_tid=srchtitle
Più risposte (1)
Image Analyst
il 27 Lug 2016
Whatever image you displayed (let's call it yourImage), the "coordinate information" of the left bottom of the image can be determined by the numbner of rows in the image:
[rows, columns, numberOfColorChannels] = size(yourImage);
fprintf('The bottom left coordinate of the image is at row %d, column 1.\n', rows);
fprintf('The gray level at the bottom left coordinate of the gray scale image is %d.\n', grayImage(end, 1)); % For a grayscale image
fprintf('The RGB image value at the bottom left coordinate of the color image is (%d, %d, %d).\n', rgbImage(end, 1), rgbImage(end, 2), rgbImage(end, 3)); % For a COLOR image
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!