yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
RDK X3 Board📖
1. RDK X3 Board Introduction
  • 1.1 About RDK X3 board
  • 1.2 Write system
  • 1.3 SD expansion
  • 1.4 Hardware interface
  • 1.5 Install case antenna
2. Basic setting
  • 2.1 Network Configuration
  • 2.2 Remote Login
  • 2.3 System Update
  • 2.4 Configure srpi-config
  • 2.5 confit.txt file
  • 2.6 Thermal control-CPU frequency
  • 2.7 Auto-start at boot
  • 2.8 RDK-specific commands usage
  • 2.9 Linux command usage
  • 2.10 GPIO read write
  • 2.11 Image classification algorithm
  • 2.12 USB camera usage
  • 2.13 MIPI camera uasge
3. Basic course
C language
  • 1. Camera image display
  • 2. Save camera image
  • 3. Camera image encoding
  • 4. Video decoding display
  • 5. VPS scaling example
  • 6. Object detection algorithm-fcos
  • 7. Object detection algorithm—YOLOv5
Python
  • 1. Using GPIO
  • 2. Using PWM
  • 3. Using serial port
  • 4. Using I2C
  • 5. Using SPI
Download
  • Image_system
  • Code
  • Software_Tools
Download ZIP

Welcome to RDK X3 Board repository

3. Camera image encoding

3. Camera image encoding

3. Camera image encoding1. Preparation2.Running method3. Result

1. Preparation

This example vio2encoder example implements the MIPI camera image acquisition function, and saves the image locally after encoding.

The user can preview the image on the display.

The example flow chart is as follows.

image-capture-105e9e82cfdfa2101b0b9bd99545d0a2

  • When the development board is powered off, connect the MIPI camera to the development board (blue side facing up).
  • Connect the development board and the monitor via an HDMI cable
  • Power on the development board and log in via the command line

2.Running method

Using following command to execute the program. The sample 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/vio2encoder
sunrise@ubuntu:/app/cdev_demo/vio2encoder$ sudo make
sunrise@ubuntu:/app/cdev_demo/vio2encoder$ sudo ./vio2encoder -w 1920 -h 1080 --iwidth 1920 --iheight 1080 -o test.h264

Parameter Description.

  • -w: Encoded video width
  • -h: Encoded video height
  • --iwidth: Sensor output width
  • --iheight: Sensor output height
  • -o: Encoded output path

3. Result

After the program runs correctly, a video file named test.h264 will be generated in the current directory.

The running log is as follows。

运行

​x
sunrise@ubuntu:/tmp/nfs/sp_cdev/cdev_demo/vio2encoder$ sudo ./vio2encoder -w 1920 -h 1080 --iwidth 1920 --iheight 1080 -o test.h264
2023/03/28 02:27:32.560 !INFO [x3_cam_init_param][0099]Enable mipi host0 mclk
2023/03/28 02:27:32.561 !INFO [x3_cam_init_param][0099]Enable mipi host1 mclk
Camera: gpio_num=114, active=low, i2c_bus=3, mipi_host=0
Camera: gpio_num=114, active=low, i2c_bus=1, mipi_host=1
Camera: gpio_num=114, active=low, i2c_bus=0, mipi_host=2
Camera 0:
     enable: 1
     i2c_bus: 3
     mipi_host: 0
Camera 1:
     enable: 1
     i2c_bus: 1
     mipi_host: 1
Camera 2:
     enable: 1
     i2c_bus: 0
     mipi_host: 2
cmd=i2ctransfer -y -f 3 w2@0x10 0x0 0x0 r1 2>&1, result=0x02

Found sensor:imx219 on i2c bus 3, use mipi host 0
Setting 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;
sp_open_camera success!
sp_start_encode success!
sp_module_bind(vio -> encoder) success!

查看

Save camera image
Video decoding display

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文