Upload
phamhanh
View
218
Download
0
Embed Size (px)
Citation preview
Ajou Univrsity
Contents
• Introduction to Tizen Camera API • Main Features • Camera State Changes
• Using Camera API • Initalizing the Camera • Taking a Photo
Ajou Univrsity
Main Features
• Offers basic camera features – preview and capture
• Main features of Camera API: • Preview images
• Supports various pixel formats – NV12, NV12T, NV16 … • Preview at frame rate • rotate/flip the preview
• Capture and save images • Control camera settings
• Contrast • Exposure • Brightness • Effects • ...
• Simultaneous use of multiple sensors(front/backside camera) is not allowed
Ajou Univrsity
Camera State Changes
• Changes of Camera state(Camera lifecylce)
None Created
Previewing Capturing
Captured
camera_create()
camera_destroy()
camera_start_preview()
camera_stop_preview()
camera_start_preview()
camera_capture_start()
Automatic transition
Ajou Univrsity
Initializing the Camera
• First, include the <camera.h> header file
• Create a structure for storing camera handle global data
• Example
• Create additional variables to specify if taking photos and auto-focusing are allowed
• Create a handle for the camera using the camera_create() function
Specifies the camera sensor (front/backside camera)
Ajou Univrsity
Initializing the Camera
• The camera_create() function will return negative error value if it fails
• After creating a camera handle, camera_get_state() function will notify the current state of the camera
• If the state is not camera_state_created • Reinitialize the camera
Ajou Univrsity
Initializing the Camera
• Use camera_attr_set_image_quality() to set image quality of the camera
• Set the display for showing preview images • Must be done before previewing
Supported value for quality: 1~100
Ajou Univrsity
References
• Tizen Camera Guide - https://developer.tizen.org/ko/docu
mentation/guides/native-application
• Tizen Camera Tutorial - https://developer.tizen.org/ko/doc
umentation/tutorials/native-application/multimedia/camer
a
• Tizen Native API - https://developer.tizen.org/dev-guide/2
.3.0/org.tizen.native.mobile.apireference/group__CAPI__ME
DIA__CAMERA__MODULE.html#ga3ddd0982778fdfacd369
4d643d1610ac