首页 > 代码库 > rt5350 捕获sn9c291 ov9712 模块jpeg图片效果

rt5350 捕获sn9c291 ov9712 模块jpeg图片效果

将sonix的sn9c291+ov9712的驱动在rt5350加载成功后,产生两个节点,video0,和video1,但是会报下面的错误,暂时未做分析

# usb 1-1.2: new high speed USB device using rt3xxx-ehci and address 4
usb 1-1.2: configuration #1 chosen from 1 choice
uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6360)
chip is 0x0
uvcvideo: Failed to query (133) UVC control 8 (unit 3) : -32 (exp. 2).



接下来运行demo程序


# ./SONiX_UVC_TestAP /dev/video0 -c -f mjpg -S
v1.0.5.2_SONiX_UVC_TestAP_Multi
optind:3  optopt:63
optind:5  optopt:63
optind:6  optopt:63
Device /dev/video0 opened: USB 2.0 Camera.
XU_Ctrl_ReadChipID ==>
   == XU_Ctrl_ReadChipID Success == 
      ASIC READ data[0] : 1f
      ASIC READ data[1] : 10
      ASIC READ data[2] : 90 (Chip ID)
      ASIC READ data[3] : 0
ChipID = 0
XU_Ctrl_ReadChipID <==
XU_Multi_Get_Enable ==>
XU_Multi_Get_Enable ==> Switch cmd : ioctl(UVCIOC_CTRL_SET) FAILED (-1)
SONiX_UVC_TestAP @main : XU_Multi_Get_Enable Failed
Video format set: width: 1280 height: 720 buffer size: 1843789
Current frame rate: 1/30
Frame rate set: 1/30
3 buffers allocated.
length: 1843789 offset:          0     --  Buffer 0 mapped at address 0x2ac2a000.
length: 1843789 offset:    1847296     --  Buffer 1 mapped at address 0x2aded000.
length: 1843789 offset:    3694592     --  Buffer 2 mapped at address 0x2afb0000.
Frame[   0] 18120 bytes 964.265081 946685765.997266  
 Frame[   1] 18089 bytes 966.001094 946685766.037230  
 Frame[   2] 18128 bytes 966.041096 946685766.077245  
 Frame[   3] 25923 bytes 966.081096 946685766.117251  
 Frame[   4] 28363 bytes 966.121095 946685766.157245  
 Frame[   5] 48119 bytes 966.161095 946685766.197278  
 Frame[   6] 48263 bytes 966.201094 946685766.237280  
 Frame[   7] 57112 bytes 966.241096 946685766.277294  
 Frame[   8] 62841 bytes 966.281094 946685766.317299  
 Frame[   9] 68272 bytes 966.321096 946685766.357306  
 Frame[  10] 68463 bytes 966.361098 946685766.397314  
 Frame[  11] 61375 bytes 966.409078 946685766.449336  
 Frame[  12] 61201 bytes 966.461095 946685766.497314  

产生了很多jpg图片文件

# ls
frame-000021.jpg   frame-000010.jpg   SONiX_UVC_TestAP   opt
frame-000020.jpg   frame-000009.jpg   public             mnt
frame-000019.jpg   frame-000008.jpg   sonix_uvcvideo.ko  media
frame-000018.jpg   frame-000007.jpg   www                lib
frame-000017.jpg   frame-000006.jpg   var                init
frame-000016.jpg   frame-000005.jpg   usr                home
frame-000015.jpg   frame-000004.jpg   tmp                etc_ro
frame-000014.jpg   frame-000003.jpg   sys                etc
frame-000013.jpg   frame-000002.jpg   sbin               dev
frame-000012.jpg   frame-000001.jpg   release            bin
frame-000011.jpg   frame-000000.jpg   proc    


  将其中一张图片上传到tftp server查看下,
# tftp -l frame-000000.jpg -r frame-0000.jpg  -p 192.168.1.112 

效果如下图,所capture时间为晚上,估计效果不太好。