Camera
Tizen offers basic camera features, including preview and capture. It allows you to capture still images with the device's internal camera and keep images on your target device.
Figure: Camera image examples
The main features of the Camera API include:
- Preview images in real time
- Support for several pixel formats, such as NV12, NV12T, NV16, NV21, YUYV, UYVY, and YUV420P
- Preview at the frame rate
- Rotate and flip the preview
- Capture and save images
- Control the following camera settings:
- Contrast
- Exposure
- Brightness
- Effects
- ISO
- White balance
- Zoom
- Flash
- Focus
- Metering
- EXIF tag (geo, orientation, software info and description)
- Scene mode, HDR, theater
- Image quality
Depending on the camera device type, the device can support different orientations, resolutions, or preview and capture formats. You can obtain this information from the device using the camera_foreach_supported_preview_resolution(), camera_foreach_supported_preview_format(), or other camera_foreach_supported_xxx() functions.
Since devices can have multiple camera sensors with different capabilities, create a Camera with a proper camera_device_e value, determining which camera sensor is used. Usually the primary sensor is located on the back side and the secondary sensor on the front side of the device. Once the camera sensor is selected, the selected sensor starts working.
Note |
---|
Simultaneous use of multiple camera sensors is not allowed. The target device often supports more functionalities than the Emulator. The behavior of the shutter sound can differ according to the legislation of each country. |
The following figure illustrates the camera state changes in the normal mode:
Figure: Camera states in the normal mode
To display the camera preview, use the StartPreview() function.