How to know the original coordinates of cropped images

2 ビュー (過去 30 日間)
feng
feng 2011 年 11 月 22 日
a=imread ('a.jpg');
imshow(a)
[acrop,rect]=imcrop(a);
The question is why rect should be in decimal (rect=[98.5 88.5 87 70] in my case) if it is the coordinate vector?

採用された回答

Walter Roberson
Walter Roberson 2011 年 11 月 22 日
The coordinate system for image() (which is called by imshow()) is for the center of the pixels, so when you crop at a pixel boundary, the coordinate for that is going to be between two integers.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by