天嵌 ARM开发社区

 找回密码
 注册
查看: 1478|回复: 1

天嵌自带的usb摄像头程序TQCamera_210显示不了,只有乱点

[复制链接]
fengfengzhi 发表于 2013-10-25 22:12:25 | 显示全部楼层 |阅读模式
摄像头的驱动已经添加进内核了,插入usb摄像头的时候提示
[root@EmbedSky /]# usb 1-1.4: USB disconnect, address 3
usb 1-1.4: new high speed USB device using s5p-ehci and address 4
uvcvideo: Found UVC 1.00 device USB2.0 Camera (1e4e:0102)
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
input: USB2.0 Camera as /devices/platform/s5p-ehci/usb1/1-1/1-1.4/1-1.4:1.0/input/input7
这就证明了摄像头的驱动是行的。

可是启动usb摄像头的时候就不能正常显示,只有乱点。
我的摄像头的帧格式为:pixelformat=V4L2_PIX_FMT_YUYV的YUYV格式。

是不是在解码的时候不正确所导致的呢??

哪位的摄像头是YUYV格式的,求指导!
 楼主| fengfengzhi 发表于 2013-10-28 11:48:09 | 显示全部楼层
找到问题所在了,只要把tqcamera.cpp的312行的
format = QImage::Format_RGB16;
修改为
format = QImage::Format_RGB888;


修改后如下:
#ifdef TQ210
                        if (g_strDevName.contains("video", Qt::CaseInsensitive))
#else
                        if (g_strDevName.contains("camera",
                                                        Qt::CaseInsensitive))
#endif
                        {
                                format = QImage::Format_RGB888;
                                
                        }
                        else
                        {

                            format = QImage::Format_RGB888;
                           
                        }

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-5-14 19:09 , Processed in 1.046882 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表