xHiveAI-A311D:MIPI Camera的使用

A311D ISP模块简介

A311D芯片包含一个ISP(Image Signal Processor)模块,提供4-lane MIPI-CSI接口,其features如下:

  • Support up to 2 cameras, up to 8M pixel sensors, up to 60 fps 
  • 1x8Mpixx60fps,or1x8Mpixx30fpsx2exp
  • 2 x 4Mpix x 60fps, or 2x 8Mpix x 30fps

逻辑框图如下: 

xHiveAI开发板Camera接口 

xHiveAI-A311D开发板的MIPI-CSI接口为2-lane,只能连接一个符合Raspberry接口定义规范的MIPI CSI Camera Sensor。

目前板子支持最主流的Raspberry Camera Sensor:

  1. ov5647
  2. imx219
  3. imx307 

运行Camera

连接好Camera sensor后,板子上电进入系统后,输入命令查看哪一个Camera sensor被侦测到:

dmesg | grep Detected
example output:
    sensor_detect_ov5647@OV5647_drv.c:791 GENERIC(CRIT) :sensor_detect_ov5647: Detected!

接着查看在/dev目录下是否生成设备:/dev/video0

最后执行如下命令在HDMI显示器上显示camera的视频:

isp_v4l2_player  -c 1 -p 0 -F 0 -f 0 -D 0 -R 1 -r 2 -d 2 -n 800 -w 0 -e 1 -v /dev/video0

该命令的详细说明如下:

usage:

 example   : ./isp_v4l2_player  -c 1 -p 0 -F 0 -f 0 -D 0 -R 1 -r 2 -d 2 -n 800 -w 0 -e 1 -v /dev/video0 

    c : command           : default 1, 7: set_manual_exposure(just enable manual exposure)

    p : sensor_preset     : default 0 

    F : fr_out_fmt        : 0: rgb24  1:nv12 2: raw16 

    f : ds1_out_fmt       : 0: rgb24  1:nv12 

    D : ds2_out_fmt       : 0: rgb24  1:nv12 

    R : fr_out_resolution : 0  : 4k   1: 1080p  2: 720p  3. 480p

    r : ds1_out_resolution: 0  : 4k   1: 1080p  2: 720p  3. 480p

    d : ds2_out_resolution: 0  : 4k   1: 1080p  2: 720p  3. 480p

    w : wdr mode          : 0: linear 1: native 2: fs lin

    e : exposure value    : min 1, max 4, default is 1

    v : videodev          : default: /dev/video0

    N : fr frame count    : default: endless display 

    n : ds1 & ds2 frame count 

    t : run the port count, default is 1

    x : fps print port. default: -1, no print. 0:  fr, 1: meta, 2: ds1, 3: ds2

    g : enable or disable gdc module: 0: disable, 1: enable

    I : set sensor ir cut state, 0: close, 1: open

    W : FR crop width

    H : FR crop height

    Y : DS1 crop width

    Z : DS1 crop height

    a : FR zone weight ctrl

    M : manual exposure

    L : integration timet

    A : sensor analog gain

    G : sensor digital gain

    S : isp digital gain

    K : stop sensor update, 0: enable sensor update, 1: stop sensor update

调整ISP的参数 

1) 请参考文章:开发环境准备 

2)在开发板上运行isp tool

在开发PC端,执行如下命令:

cd <git dir>/mipi_camera
scp -r isp_tools/ root@<ip address of the board>:/root

在xHiveAI开发板侧,执行如下命令:

cd /root/isp_tools/bin
./act-server --preset=chardev-sw.set
Control Tool 3.5.1 of 2018-01-10 15:58:59 +0000 (built: Jun 29 2018 15:00:13)
(C) COPYRIGHT 2013 - 2018 ARM Limited or its affiliates.
08:54:19.906   INFO > CommandManager: file ApicalControl.xml must be loaded via front-end
08:54:19.907   INFO > HTTPServer: please open http://10.0.1.47:8000/ in firefox or chrome

3)在开发PC上启动isp tool

启动firefox或者chrome浏览器,输入:

http://<the ip of the board>:8000

选择isp_tools/control_tool_files/IV009-SW-Control.xml

在菜单上选择“API”,再选择文件:isp_tools/control_tool_files/command.json

最后界面如下:

你可以一边调整参数,一边查看camera的显示图像的变化。

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值