How to fix camera image independent of device position ? Objective - C

Asked

Viewed 37 times

0

I’m working on an app that through the camera, it detects people’s faces in real time and swaps the face image for some mask. (Basically the Squarecam)

But it only works with the device vertically (Portrait).

When I lay horizontal (Landscape), the mask does not form on the face.

So I’d like to mirror the image in the right position (Portrait) to whatever position the device had. How do I lock/fix camera position ?

  • 1

    You said the mask doesn’t form, but you can detect the face even with the device in Scape? If yes, you probably need to correct the position of the mask when the orientation changes.

  • Does not detect the face when it is in Landscape.

  • Have you ever tried to load your app with the device already in Landscape and go to the capture screen without changing the orientation? Sometimes in the change of orientation, missed to check if the delegate that returns you the sample buffer of the camera is working.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.