Capture video using front or rear camera
Simulink Support Package for Android Devices / Audio & Video
Capture video from the front or rear camera on the Android™ device.
The Camera block has three output ports:
B. Each port outputs a
2–dimensional matrix of
uint8 values. Together, these matrices
make up the color image from the camera. The Resolution
parameter determines the matrix dimensions.
During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation.
Select the camera location on the device and the size of image.
Frontuses the camera on the same side as the display.
Backuses the camera on the opposite side from the display.
To get a list of device specific Resolution, connect your configured device and press the Refresh button. To configure your device, follow the instructions provided during the Hardware Setup process.
Image size significantly affects the rate at which the camera produces data. For example, capturing video at
1920x1080produces almost six times more data than capturing video at
- Sample time
Specify how often the block reads the sensor.
Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.
Introduced in R2014a