How to show an image axes in pixeles?

3 ビュー (過去 30 日間)
Erika
Erika 2017 年 1 月 30 日
コメント済み: Erika 2017 年 1 月 31 日
I want to display the axes of an image in pixels, I mean the center (0,0) must be placed in the top left corner of the image and it must be limited for 640x480 pixels. See the image below for further explanation. How can I do this? Any help is appreciated.

採用された回答

Jan
Jan 2017 年 1 月 30 日
編集済み: Jan 2017 年 1 月 30 日
FigH = figure('Position', [100, 100, 720, 560]);
AxesH = axes('Units', 'pixels', 'Position', [40, 40, 640, 480], ...,
'YDir', 'reverse', 'Parent', FigH);
image(0:639, 0:479, rand(640, 480, 3), 'Parent', AxesH);
  1 件のコメント
Erika
Erika 2017 年 1 月 31 日
Thanks Jan, this is very helpful.

サインインしてコメントする。

その他の回答 (2 件)

Image Analyst
Image Analyst 2017 年 1 月 30 日
Display the image, then call axis on
imshow(yourImage);
axis on;

John BG
John BG 2017 年 1 月 30 日
axis ij
does precisely invert the Y axis placing 0 up left.
.
if you find this answer useful would you please be so kind to mark my answer as Accepted Answer?
To any other reader, please if you find this answer of any help solving your question,
please click on the thumbs-up vote link,
thanks in advance
John BG

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by