Crop and rotate face from example "Face Detection and Tracking Using the KLT Algorithm"

1 回表示 (過去 30 日間)
OJ27
OJ27 2015 年 11 月 16 日
回答済み: Walter Roberson 2015 年 11 月 16 日
I want to be able to crop and rotate an area of interest from an image bounded by a rotated rectangle. The code I am using is the one posted under "Face Detection and Tracking Using the KLT Algorithm". I tried using imcrop but it only allows to use straight rectangles.

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 11 月 16 日
MATLAB can only represent rectangular numeric matrices, so it is not possible to crop a rotated rectangle to its rotated edges. You can only crop it to its bounding box. You can set everything outside the area of interest to a value that your code knows to ignore, such as 0 or (if you are using floating point) NaN

カテゴリ

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