MATLAB Answers

0

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

Asked by OLGA Jumbo Sanchez on 16 Nov 2015
Latest activity Answered by Walter Roberson
on 16 Nov 2015
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.

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 16 Nov 2015

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

  0 Comments

Sign in to comment.