The Camera example application shows you how to work with the Camera library API. The source code for this application is available.
The Camera example that allows you to configure and use cameras connected to your board. You can run the Camera example using a configuration that has cameras that are specified. This application is useful to test whether cameras connected to your system work, understand camera settings, and understand how to use the various features for your cameras.
Figure 1. Inverted luma.The following describes how to run the Camera example application (camera_example) that's available on the reference image.
# camera_example
The following examples show how to accomplish certain tasks.
# camera_example
Select which example you want to run:
1) Camera viewfinder
2) Record video to a file
3) Camera stream
4) Multiple camera video
5) EGL viewfinder
6) Event example
x) Exit the example
4
Select which of the following 4 cameras you want to use:
1) CAMERA_UNIT_1
1
Select which of the following VF modes you want to use:
2) CAMERA_VFMODE_VIDEO
2
Do you want to modify the viewfinder configuration (y/n)?
n
Do you want to modify image attributes (y/n)?
n
Choose from the following options:
i) Modify image attributes
l) Lock 3A
v) Modify viewfinder configuration
w) Modify whitebalance
x) Exit the example
x
# camera_example
Select which example you want to run:
1) Camera viewfinder
2) Record video to a file
3) Camera stream
4) Multiple camera video
5) EGL viewfinder
6) Event example
x) Exit the example
4
How many cameras do you want to run (1-2)?
2
Configuration for camera #1:
Select which of the following 2 cameras you want to use:
1) CAMERA_UNIT_1
2) CAMERA_UNIT_2
1
Do you want to modify the viewfinder configuration (y/n)?
n
Configuration for camera #2:
Select which of the following 4 cameras you want to use:
1) CAMERA_UNIT_1
2) CAMERA_UNIT_2
2
Do you want to modify the viewfinder configuration (y/n)?
n
# camera_example
Select which example you want to run:
1) Camera viewfinder
2) Record video to a file
3) Camera stream
4) Multiple camera video
5) EGL viewfinder
6) Event example
x) Exit the example
1
Select which of the following 4 cameras you want to use:
1) CAMERA_UNIT_1
2) CAMERA_UNIT_2
3) CAMERA_UNIT_3
4) CAMERA_UNIT_4
1
Select which of the following VF modes you want to use:
2) CAMERA_VFMODE_VIDEO
2
Do you want to modify the viewfinder configuration (y/n)?
n
Do you want to modify image attributes (y/n)?
n
Choose from the following options:
i) Modify image attributes
l) Lock 3A
v) Modify viewfinder configuration
w) Modify whitebalance
x) Exit the example
w
Select the desired WB mode:
1) Default
2) Auto
3) Manual (RB Gain)
3
Current value of WB red gain is 128. Do you want to change it (y/n)?
y
Select the desired WB red value within range of 1 to 1023
1023
Current value of WB blue gain is 128. Do you want to change it (y/n)?
y
Select the desired WB blue value within range of 1 to 1023
1
Choose from the following options:
i) Modify image attributes
l) Lock 3A
v) Modify viewfinder configuration
w) Modify whitebalance
x) Exit the example
x
Select which example you want to run:
1) Camera viewfinder
2) Record video to a file
3) Camera stream
4) Multiple camera video
5) EGL viewfinder
6) Event example
x) Exit the example
x
On your host computer, the source code is provided for the Camera example application as part of a ZIP file. You can build the source and deploy the binary on to your target.