SBC-T113S产品特性:
- 采用Allwinner公司Cortex-A7双核T113-S3/S4处理器,运行最高速度为1.2GHZ;
- 内置64-bit XuanTie C906 RISC-V协处理器(仅T113-S4支持);
- 支持JPEG/MJPEG视频编码,最大分辨率1080p@60fps;支持多格式1080P@60fps视频解码 (H.265,H.264, MPEG-1/2/4);
- 支持RGB666/LVDS/MIPI-DSI,分辨率最高1920x1080;
- 支持128-256M Bytes DDR3 SDRAM,其中T113-S3内置128MB;T113-S4内置256MB;
- 支持SPI NAND存储和启动(默认:256MB)或者EMMC启动(默认:4GB,最大32GB);
- 支持一路USB2.0 OTG(设计为TYPE-A接口);支持二路USB2.0 HOST;
- 支持七路RS232通信或者6路RS232和1路RS485(非隔离);
- 支持一路CAN BUS通信(非隔离);
- 支持一路10/100M以太网;
- 稳定的操作系统的支持,可预装LINUX 5.4(Preempt)或者OpenWRT;
- 经典尺寸主板,尺寸为120*100MM;
SBC-T113S产品功能评估图:
通过camerademo判断摄像头的属性
camerademo程序可以用来对摄像头视频进行截图,也可以用来对摄像头进行调试。当使用它进行摄像头调试的时候,务必是针对/dev/video0设备。我们先看看它的帮助说明,执行camerademo–help指令如下:
root@TinaLinux:/dev# camerademo --help
[CAMERA]**********************************************************
[CAMERA]* *
[CAMERA]* this is camera test. *
[CAMERA]* *
[CAMERA]**********************************************************
[CAMERA]******************** camerademo help *********************
[CAMERA] This program is a test camera.
[CAMERA] It will query the sensor to support the resolution, output format and test frame rate.
[CAMERA] At the same time you can modify the data to save the path and get the number of photos.
[CAMERA] When the last parameter is debug, the output will be more detailed information
[CAMERA] There are eight ways to run:
[CAMERA] 1.camerademo --- use the default parameters.
[CAMERA] 2.camerademo debug --- use the default parameters and output debug information.
[CAMERA] 3.camerademo setting --- can choose the resolution and data format.
[CAMERA] 4.camerademo setting debug --- setting and output debug information.
[CAMERA] 5.camerademo NV21 640 480 30 bmp /tmp 5 --- param input mode,can save bmp or yuv.
[CAMERA] 6.camerademo NV21 640 480 30 bmp /tmp 5 debug --- output debug information.
[CAMERA] 7.camerademo NV21 640 480 30 bmp /tmp 5 Num --- /dev/videoNumparam input mode,can save bmp or yuv.
[CAMERA] 8.camerademo NV21 640 480 30 bmp /tmp 5 Num debug --- /dev/videoNum output debug information.
[CAMERA] 8.camerademo NV21 640 480 30 bmp /tmp 5 Num 1 --- 1/2: chose memory: V4L2_MEMORY_MMAP/USERPTR
[CAMERA]**********************************************************
root@TinaLinux:/dev#
通过以上提示,可以看到该程序可以进行摄像头的配置、调试、以及截图。正常来说,截图正常就证明摄像头工作正常。
为了做TVIN摄像头的调试,我们务必先要执行指令:ln–sf /dev/video4 /dev/video0,因为camerademo程序做调试的时候,只能针对video0;
root@TinaLinux:/dev# camerademo debug
[CAMERA]**********************************************************
[CAMERA]* *
[CAMERA]* this is camera test. *
[CAMERA]* *
[CAMERA]**********************************************************
[CAMERA]**********************************************************
[CAMERA] open /dev/video0!
[CAMERA]**********************************************************
[CAMERA_DEBUG] Querey device capabilities succeed
[CAMERA_DEBUG] cap.driver=sunxi-tvd
[CAMERA_DEBUG] cap.card=sunxi-tvd
[CAMERA_DEBUG] cap.bus_info=tvd_v4l2_dev0
[CAMERA_DEBUG] cap.version=0x00010000
[CAMERA_DEBUG] cap.capabilities=0x85200001
[CAMERA]**********************************************************
[CAMERA] The path to data saving is /tmp.
[CAMERA] The number of captured photos is 5.
[CAMERA] save bmp format
[CAMERA_DEBUG]**********************************************************
[CAMERA_DEBUG] enumerate image formats
[CAMERA_DEBUG] format index = 0, name = NV12
[CAMERA_DEBUG] format index = 1, name = NV21
[CAMERA_DEBUG] format index = 2, name = NV16
[CAMERA_DEBUG] format index = 3, name = NV61
[CAMERA_DEBUG]*********************************************************
[CAMERA_DEBUG] The sensor supports the following formats :
[CAMERA_DEBUG] Index 0 : NV12.
[CAMERA_DEBUG] Index 1 : NV21.
[CAMERA_DEBUG] Index 2 : NV16.
[CAMERA_DEBUG] Index 3 : NV61.
[ 69.731859] [tvd] vidioc_s_fmt_vid_cap:1623
[ 69.731859] interface=0
[ 69.731859] system=NTSC
[ 69.731859] format=0
[ 69.731859] output_fmt=YUV420
[CAMERA_DEBUG]**********************************************************
[CAMERA_DEBUG] The NV12 supports the following resolut[ 69.750104] [tvd] vidioc_s_fmt_vid_cap:1627
[ 69.750104] row=1
[ 69.750104] column=1
[ 69.750104] ch[0]=0
[ 69.750104] ch[1]=0
[ 69.750104] ch[2]=0
[ 69.750104] ch[3]=0
ions:
[CAMERA_DEBUG] Index 0 : 720 * 480
[CAMERA_DEBUG] Index 1 : 720 * 576
[CAMERA_DEBUG]***********************************[ 69.779945] [tvd] vidioc_s_fmt_vid_cap:1629
[ 69.779945] width=720
[ 69.779945] height=480
[ 69.779945] dev->sel=0
***********************
[CAMERA_DEBUG] The NV21 supports the following resolutions:
[CAMERA_DEBUG] Index 0 : 720 * 480
[CAMER[ 69.803870] [tvd] tvd_cagc_and_3d_config:1481 tvd0 agc auto mode
A_DEBUG] Index 1 : 720 * 576
[CAMERA_DEBUG]**********************************************************
[CAMERA_DEBUG] The NV16 [ 69.821636] [tvd] tvd_cagc_and_3d_config:1490 tvd0 CAGC enable:0x1
supports the following resolutions:
[CAMERA_DEBUG] Index 0 : 720 * 480
[CAMERA_DEBUG] Index 1 : 720 * 576
[CAMERA_DEBUG]*****[ 69.843758] [tvd] tvd_cagc_and_3d_config:1517 tvd0 3d enable :0x4f900000
*****************************************************
[CAMERA_DEBUG] The NV61 supports the following resolutions:
[CAMERA_DEBU[ 69.860018] [tvd] vidioc_streamon:1712 Out vidioc_streamon:0
G] Index 0 : 720 * 480
[CAMERA_DEBUG] Index 1 : 720 * 576
[CAMERA]**********************************************************
[CAMERA] Using format parameters NV21.
[CAMERA_ERR] sensor not support 640 * 480
[CAMERA] use support for the first resolution
[CAMERA] camera pixelformat: NV21
[CAMERA] Resolution size : 720 * 480
[CAMERA] The photo save path is /tmp.
[CAMERA] The number of photos taken is 5.
beginion_alloc_open
pid: 1543, g_alloc_context = 0xc97158
[CAMERA] Camera captur[ 69.914962] [tvd] tvd_isr:810 In tvd_isr
eframerate is 0/0
[CAMERA] VIDIOC_S_FMT succeed
[CAMERA] fmt.type = 1
[CAMERA] fmt.fmt.pix.width = 720
[CAMERA] fmt.fmt.pix.height = 480
[CAMERA] fmt.fmt.pix.pixelformat = NV21
[CAMERA] fmt.fmt.pix.field = 1
[CAMERA_DEBUG] reqbuf number is 3
[CAMERA_DEBUG] map buffer index: 0, mem: 0xb6d27000, len: 7e900, offset: 0
[CAMERA_DEBUG] map buffer index: 1, mem: 0xb6ca8000, len: 7e900, offset: 7f000
[CAMERA_DEBUG] map buffer index: 2, mem: 0xb6c29000, len: 7e900, offset: fe000
[CAMERA] stream on succeed
[CAMERA] camera0 capture num is [0]
[CAMERA_DEBUG]*****DQBUF[0] FINISH*****
[CAMERA_PROMPT] the time interval from the start to the first frame is 73 ms
[CAMERA_DEBUG] the interval of two frames is 0 ms
[CAMERA_DEBUG]************QBUF[0] FINISH**************
[CAMERA] camera0 capture num is [1]
[CAMERA_DEBUG]*****DQBUF[1] FINISH*****
[CAMERA_DEBUG] the interval of two frames is 161 ms
[CAMERA_DEBUG]************QBUF[1] FINISH**************
[CAMERA] camera0 capture num is [2]
[CAMERA_DEBUG]*****DQBUF[2] FINISH*****
[CAMERA_DEBUG] the interval of two frames is 161 ms
[CAMERA_DEBUG]************QBUF[2] FINISH**************
[CAMERA] camera0 capture num is [3]
[CAMERA_DEBUG]*****DQBUF[0] FINISH*****
[CAMERA_DEBUG] the interval of two frames is 162 ms
[CAMERA_DEBUG]************QBUF[0] FINISH**************
[CAMERA] camera0 capture num is [4]
[CAMERA_DEBUG]*****DQBUF[1] FINISH*****
[CAMERA_DEBUG] the interval of two frames is 161 ms
[CAMERA_DEBUG]************QBUF[1] FINISH**************
[CAMERA] Capture thread finish
[CAMERA_DEBUG]***************************************************************
[CAMERA_DEBUG] Query the actual frame rate.
[CAMERA_DEBUG] camera fps = 31.2.
[ 72.853618] [tvd] vidioc_s_fmt_vid_cap:1623
[ 72.853618] interface=0
[ 72.853618] system=NTSC
[ 72.853618] format=0
[ 72.853618] output_fmt=YUV420
[CAMERA_DEBUG]***************************************************************
[CAMERA] close /dev/video0
ion_alloc_close
pid[ 72.870400] [tvd] vidioc_s_fmt_vid_cap:1627
[ 72.870400] row=1
[ 72.870400] column=1
[ 72.870400] ch[0]=0
[ 72.870400] ch[1]=0
[ 72.870400] ch[2]=0
[ 72.870400] ch[3]=0
: 1543, release g_alloc_context = 0xc97158
[CAMERA_DEBUG]***************************************************************
[CAM[ 72.900202] [tvd] vidioc_s_fmt_vid_cap:1629
[ 72.900202] width=720
[ 72.900202] height=480
[ 72.900202] dev->sel=0
ERA_DEBUG] Performance Testing---format:NV21 size:720 * 480
[ 72.924121] [tvd] tvd_cagc_and_3d_config:1481 tvd0 agc auto mode
[ 72.936083] [tvd] tvd_cagc_and_3d_config:1490 tvd0 CAGC enable:0x1
[ 72.945822] [tvd] tvd_cagc_and_3d_config:1517 tvd0 3d enable :0x4f900000
[ 72.954767] [tvd] vidioc_streamon:1712 Out vidioc_streamon:0
[CAMERA_DEBUG] The interval from open to streaming is 148 ms.
[CAMERA_DEBUG]***************************************************************
root@TinaLinux:/dev#
通过该信息分析,该摄像头是NTSC制式,分辨率是720x480,另外,它输出的格式是YUV420,这个信息为我们配置trecorderdemo提供的重点技术支撑。
camerademo也可以进行摄像头的视频截图,对于TVIN来说,指令如下:
camerademo NV21 720 480 30 bmp /tmp 5 4
最后一个数字4表示使用/dev/video4。截图后图片正常表示硬件和驱动正常。