Welcome to RDK X3 Board repository
2. Save camera image
Save camera image
1. Preparation
This example vio_capture implements the MIPI camera image acquisition and local storage of images in two formats: RAW and YUV.
The example flow chart is as follows.

- When the development board is powered off, connect the MIPI camera to the development board (with the blue side facing up).
- Connect the development board and monitor via HDMI cable
- Power on the development board and log in to the system
2. Running method
The example code is provided in source code form and needs to be compiled and run using the 'make' command. The steps are as follows:
sunrise@ubuntu:~$ cd /app/cdev_demo/vio_capture/sunrise@ubuntu:/app/cdev_demo/vio_capture$ sudo makesunrise@ubuntu:/app/cdev_demo/vio_capture$ sudo ./capture -b 12 -c 10 -h 1080 -w 1920Parameter description.
- -b: RAW image bit count, IMX477:12,others:10
- -c: Number of saved images
- -w: Save the width of the image
- -h: Save the height of the image
3. Result
After the program runs correctly, the current directory saves the specified number of image files.

The RAW format is named as raw_ *. raw , while the YUV format is named as yuvv *. yuv.
The running log is as follows.
xxxxxxxxxxsunrise@ubuntu:/app/cdev_demo/vio_capture$ sudo ./capture -b 12 -c 10 -h 1080 -w 1920Setting VPS channel-2: src_w:1920, src_h:1080; dst_w:1920, dst_h:1080;Setting VPS channel-1: src_w:1920, src_h:1080; dst_w:1920, dst_h:1080;jiale:start streaming...capture time :0capture time :1capture time :2capture time :3capture time :4capture time :5capture time :6capture time :7capture time :8capture time :9sensor_name imx477, setting_size = 1[ 701.213210]hb_isp_algo_stop@main_user.c:389 GENERIC(ERR) :g_mutex destroy.