linux下USB摄像头开发问题

liaogang01 2011-05-10 01:50:47
我的摄像头在LINUX中安装应该是正常的
我用cat /dev/video0 >test.jpg& 是可以生成图片的。用lsusb查看USB设备如下
[root@lgfedora14 spcaview-20071224]# lsusb
Bus 002 Device 004: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 Webcam
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


但用spcaserv就显示报错
[root@lgfedora14 spcaview-20071224]# spcaserv -d /dev/video0
Spcaview version: 1.1.8 date: 25:12:2007 (C) mxhaard@magic.fr
video /dev/video0
Camera found: PC Camera
VIDIOCGPICT brightnes=0 hue=0 color=0 contrast=32896 whiteness=39321depth=8 palette=0
Bridge found: zc3xx
Not an Spca5xx Camera !!
wrong spca5xx device
StreamId: -1 Camera
try palette 21 depth 8
Damned second try fail
try palette 15 depth 12
Damned second try fail
try palette 4 depth 24
Damned second try fail
try palette 3 depth 16
Damned second try fail
try palette 5 depth 32
Damned second try fail
probe size in
Available Resolutions width 640 heigth 480
Available Resolutions width 384 heigth 288
Available Resolutions width 352 heigth 288
Available Resolutions width 320 heigth 240
Available Resolutions width 192 heigth 144
Available Resolutions width 176 heigth 144
Available Resolutions width 160 heigth 120
Invalid palette in check palette fatal !!
Format asked 15 check -1
VIDIOCSPICT brightnes=0 hue=0 color=0 contrast=32896 whiteness=39321depth=12 palette=15
VIDIOCGPICT brightnes=0 hue=0 color=0 contrast=32896 whiteness=39321depth=8 palette=0
could't set video palette Abort !

我的程序也是用V4L库读设备信息也有问题如下,然后用ioctl(m_fd, VIDIOCMCAPTURE, &(mmap))就失败了
[2011-05-10 12:46:41]/dev/video0: v4l_get_capability PC Camera
1 channels
0 audios
maxwidth=640,maxheight=480,minwidth=48,minheight=32

[2011-05-10 12:46:41]Channel 0: type=CAMERA name=zc3xx flags=0 norm=0 tuners=0

[2011-05-10 12:46:41]/dev/video0: v4l_get_picture
brightness=0
colour =0
contrast =32896
depth =8
hue =0
palette=0
whiteness=39321
...全文
92 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

21,595

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧