4.2. 多媒体VIO数据通路测试

4.2.1. 功能说明

使用python程序打开接入到旭日X3派设备上的 F37 摄像头和HDMI显示器,从F37摄像头获取图像帧数据进行AI算法推理(fcos算法,目标检测),最后把图像信息和算法结果输出显示到hdmi的显示器上。本程序可以测试X3派的多媒体数据通路功能和AI算法推理功能。

4.2.2. 硬件连接

  • F37 摄像头模组通过FPC排线接在X3派的MIPI CSI接口上

  • 显示器通过hdmi线连接在X3派的hdmi输出接口上

4.2.3. 测试方法

执行以下python脚本进行测试

cd /userdata/hobot_dnn_python/script/camera_sample
python3 camera.py 

正常输出信息:

[C][3192][04-19][16:12:12:051][configuration.cpp:51][EasyDNN]EasyDNN version: 0.3.5
[BPU_PLAT]BPU Platform Version(1.3.1)!
[HBRT] set log level as 0. version = 3.13.27
[DNN] Runtime version = 1.8.4_(3.13.27 HBRT)
[HorizonRT] The model builder version = 1.5.2
match sensor:f37
bus_num 2
bus_type 0
sensor_name f37
reg_width 8
sensor_mode 1
sensor_addr 0x40
serial_addr 0x0
resolution 1080
 start linear mode, sensor_name f37, setting_size = 3
[ 6002.930603] iar_output_stream.
[]
person is in the picture with confidence:0.8099
[[2.79627228e+01 7.03214693e+01 1.90984308e+03 1.08148106e+03
  8.09865654e-01 0.00000000e+00]]
person is in the picture with confidence:0.7831
[[2.79627228e+01 3.87227511e+01 1.90984308e+03 1.08148106e+03
  7.83070147e-01 0.00000000e+00]]
person is in the picture with confidence:0.7717
[[2.79627228e+01 4.66224146e+01 1.90984308e+03 1.08148106e+03
  7.71683693e-01 0.00000000e+00]]
person is in the picture with confidence:0.7459
[[2.67087936e+01 5.45220780e+01 1.90858910e+03 1.08938073e+03
  7.45893776e-01 0.00000000e+00]]
person is in the picture with confidence:0.7106
[[4.07526398e+01 8.61208284e+01 1.90858910e+03 1.08148106e+03
  7.10561097e-01 0.00000000e+00]]
person is in the picture with confidence:0.6627
[[2.79627228e+01 8.61208284e+01 1.90984308e+03 1.08148106e+03
  6.62650943e-01 0.00000000e+00]]
^CTraceback (most recent call last):
  File "camera.py", line 270, in <module>
    origin_image = cam.get_img(2, 1920, 1080)
KeyboardInterrupt
【INFO】: Offload model "fcos_512x512_nv12" Successfully.
[ 6004.594381] [S0]GP0(res 4, rcnt 0)