Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't detect face on iPhone when iPhone is in Landscape mode.

Dear All I am working on face detection application on iPhone. I am creating CvVideoCamera object as follows.

    self.videoCamera = [[FAACvVideoCamera alloc] initWithParentView:self.imageView];
    self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
    self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset352x288;
    self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
    self.videoCamera.defaultFPS = 30;
    self.videoCamera.grayscaleMode = NO;
    self.videoCamera.delegate = self;

Inside the - (void)processImage:(Mat&)image; delegate of CvVideoCamera i am detecting face by using method of CascadeClassifier class as follows.

detectMultiScale(frame_gray, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(100, 100));

Strangely this function is only detecting face when i holding iPhone in portrait mode. when i rotate iPhone to landscapeLeft or LandscapeRight face detection fails.

Even i tried with built in openCV class DetectionBasedTracker Here also i am getting same result i.e only detecting face when iPhone is in portrait mode.

What should i do to get face detection working on iPhone in portrait and Landscape .

Thanks in Advance

Can't detect face on iPhone when iPhone is in Landscape mode.

Dear All I am working on face detection application on iPhone. I am creating CvVideoCamera object as follows.

    self.videoCamera = [[FAACvVideoCamera alloc] initWithParentView:self.imageView];
    self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
    self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset352x288;
    self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
    self.videoCamera.defaultFPS = 30;
    self.videoCamera.grayscaleMode = NO;
    self.videoCamera.delegate = self;

Inside the - (void)processImage:(Mat&)image; delegate of CvVideoCamera i am detecting face by using method of CascadeClassifier class as follows.

detectMultiScale(frame_gray, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(100, 100));

Strangely this function is only detecting face when i holding iPhone in portrait mode. when i rotate iPhone to landscapeLeft or LandscapeRight face detection fails.

Even i tried with built in openCV class DetectionBasedTracker Here also i am getting same result i.e only detecting face when iPhone is in portrait mode.

What should i do to get face detection working on iPhone in portrait and Landscape .

Thanks in Advance

Can't detect face on iPhone when iPhone is in Landscape mode.

Dear All I am working on face detection application on iPhone. I am creating CvVideoCamera object as follows.

    self.videoCamera = [[FAACvVideoCamera alloc] initWithParentView:self.imageView];
    self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
    self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset352x288;
    self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
    self.videoCamera.defaultFPS = 30;
    self.videoCamera.grayscaleMode = NO;
    self.videoCamera.delegate = self;

Inside the - (void)processImage:(Mat&)image; delegate of CvVideoCamera i am detecting face by using method of CascadeClassifier class as follows.

detectMultiScale(frame_gray, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, cv::Size(100, 100));

Strangely this function is only detecting face when i holding iPhone in portrait mode. when i rotate iPhone to landscapeLeft or LandscapeRight face detection fails.

Even i tried with built in openCV class DetectionBasedTracker Here also i am getting same result i.e only detecting face when iPhone is in portrait mode.

What should i do to get face detection working on iPhone in portrait and Landscape .

Thanks in Advance