How to detect face by portrait mode?
问题 I'm studying OpenCV recently. OpenCV for Android sample code(2.4.6) is tested. I have some wonder. I can detect face by sample code(OpenCV Sample - face-detection). but, can't detect face by portrait mode(vertical mode) on android device. First, I try set Front-Camera by portrait mode. //added code in onCameraFrame() method. Core.flip(mRgba, mRgba, 1); Still do not recognize face. How to detect face by portrait mode? Thank you. 回答1: you need to do transpose and then flip: int height = mGray