EasyAR camera control
This article explains how to control cameras in EasyAR.
Before you start
- Learn about the camera model, parameters, and usage considerations for physical cameras through Camera and Input Extension.
Camera type and camera flip
When using the front camera, EasyAR performs horizontal image flipping by default. Depending on application needs, manual horizontal flipping of the camera image can also be enabled or disabled.
For example, when developing an image recognition-based application for tablets with an external mirror, you need to set camera image flipping.
Note
If installed on a front camera but not recognized as such by the system, horizontal image flipping won't occur by default and must be enabled manually.
Focus
Phones typically use fixed-focus cameras, meaning the focal length cannot be adjusted. Some phones use multiple fixed-focus cameras with different focal lengths, allowing switching between them.
When an object is at infinity, its image forms precisely on the focal plane. As the object moves closer, its image shifts away from the optical center. If the camera's sensor plane is fixed at the focal plane, only objects at infinity will appear sharp. For closer objects, because their image forms behind the sensor plane, a blurred image with a circle of confusion appears on the sensor.
Typically, phone cameras have autofocus functionality, which adjusts the focal distance by moving the sensor plane or optical center. This minimizes the circle of confusion for most points on the object. Note that since real objects are 3D, their images through the camera are also 3D, while the sensor is a 2D plane. Thus, some areas in a photo will always be sharp while others are blurred.
Noting that at a specific focal distance, the focal length only affects the size of the circle of confusion, it's clear that camera parameters relate to the focal distance (or field of view). Generally, trackers prefer static camera parameters to maintain accuracy. However, fixing the focal distance might result in a blurry image. Therefore, most AR applications still enable autofocus.
Resolution and frame rate
Phone cameras usually support multiple resolution and frame rate formats. Higher resolutions and frame rates demand more processing power and generate more heat, requiring selection based on actual conditions.
Flash
In low-light conditions, constant flash illumination might be needed. However, this may degrade or prevent tracker functionality.