Rotating an Image and Keeping the Bounding Box in Registration

2 ビュー (過去 30 日間)
Chris Williams
Chris Williams 2015 年 9 月 14 日
回答済み: Chris Williams 2015 年 9 月 14 日
I have an image, a small part of which is surrounded by a bounding box. I rotate the whole image x degrees. How can I also rotate the bounding box by the same angle, thus keeping the bounding box in registration?
I tried the following:
bbox = [10 20 50 60];
points = bbox2points(bbox);
Apply a rotation to the points using affine2d and transformPointsForward (a simple rigid rotation). However, I cannot convert the list of points back to a bounding box. Thanks for your help.

回答 (1 件)

Chris Williams
Chris Williams 2015 年 9 月 14 日
If this is too difficult, I can restrict the transformation of the image to flipud and fliplr. I just need to then apply the same flip to the bounding box.

カテゴリ

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