I use UIImagePickerControllerSourceTypeCamera in iOS. My purpose before using the camera is to guide the user to position the camera precisely in front of the image objects. I have a known target image (TI), a playing card, more specifically a 7 of Diamonds, and I need the 7 on the TI to be in the correct position in front of the camera. Is there a way to either superimpose on top of the screen the TI when the user is taking the picture, or to mask part of the screen so that only the place where the 7 appears will show the picture to be taken.
Once the camera is positioned correctly, I will ask the user to keep the camera still and position unknown cards in front of the camera without looking at the card.
The UIImagePickerController has an
cameraOverlayViewproperty to which you can assign an instance of a custom class. This class can draw the target area graphic that you need and it will appear on top of the camera image.If you need to check that the card is actually within that area, then you are in a computer vision zone and things become much more complicated. OpenCV is a typical starting point for making sense of what a camera is displaying.