I have a problem, when i take a photo with my tablet, i use opencv for detecting a face and recognition a face. So i would try to rotate the face in order to have for example the eyes and mounth in the same position for example all with the same horizontal angle.
Can you suggest me some OpenCv functions or some useful links for do this?
Thanks in advance.
Marco
I think the opencv remapping tutorial might help http://opencv.itseez.com/doc/tutorials/imgproc/imgtrans/remap/remap.html#remap
Full answer:
Use this to locate the eyes cascade_classifier now when you have a point for each eye - build the line equation and use simple trigonometry to find the angle. when you have the angle - use the remap to rotate or even better use this warp_affine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With