How to return bounding box of image with respect to the original image coordinates in FaceAligner in imutils?

448 Views Asked by At

In the file:

https://github.com/jrosebr1/imutils/blob/master/imutils/face_utils/facealigner.py

There is a function align(). This function recalculates a face box 256x256 in size, however it does not seem to have a way to get the coordinates of this new box with respect to the original image that was passed into the function.

Is there anyway to get the (x, y, x1, y1) box of this newly calculated face image?

Thanks!

1

There are 1 best solutions below

1
On

The coordinates of the new box can be found using dot multiplication, with the rotation matrix.

I just did a REPL about how to calculate the resulting coordinates

https://replit.com/@cristianpb/GlassMisguidedDataset#main.py

What are x, y, x1, y1 for you ?

Please provide more details about your question. An example or ilustration could also help to get better answers.