neozhaoliang / surround-view-system-introduction

A full Python implementation for real car surround view system
MIT License
911 stars 316 forks source link

运行 calibrate 一直提示 cannot open device ,使用的是usb 摄像头 #43

Closed shadoubuhuideyy closed 1 year ago

shadoubuhuideyy commented 2 years ago

上述问题是我是在window10下运行的这个代码是否只可以在linux下运行呢? @neozhaoliang

neozhaoliang commented 2 years ago

理论上和平台没有关系。

贴出你的完整命令?有没有加指定 usb 的参数? https://github.com/neozhaoliang/surround-view-system-introduction/blob/master/run_calibrate_camera.py#L56

shadoubuhuideyy commented 2 years ago

非常感谢,昨天在实验室搬砖,没有及时回复,然后我是把parser.add_argument("-i", "--input", type=int, default=0, help="input camera device")中改为default=3(外接的摄像机是3号且能用)然后昨天我又把您标注的那行https://github.com/neozhaoliang/surround-view-system-introduction/blob/master/run_calibrate_camera.py#L56 的--no_get去掉--发现可以标定了,但是发现虽然最后输出success但是data[]里的数据都为0,标定结果如下 %YAML:1.0

resolution: !!opencv-matrix rows: 2 cols: 1 dt: i data: [ 640, 480 ] camera_matrix: !!opencv-matrix rows: 3 cols: 3 dt: d data: [ 0., 0., 0., 0., 0., 0., 0., 0., 0. ] dist_coeffs: !!opencv-matrix rows: 4 cols: 1 dt: d data: [ 0., 0., 0., 0. ] @neozhaoliang

neozhaoliang commented 2 years ago

如果程序可以运行,但是标定数据有问题,你可以试试打印下中间数据看看是哪里有问题。有可能由于 OpenCV 版本变化某些行为也改变了。

Cys6p commented 1 year ago

非常感谢,昨天在实验室搬砖,没有及时回复,然后我是把parser.add_argument("-i", "--input", type=int, default=0,

help="input camera device")中改为default=3(外接的摄像机是3号且能用)然后昨天我又把您标注的那行https://github.com/neozhaoliang/surround-view-system-introduction/blob/master/run_calibrate_camera.py#L56 的--no_get去掉--发现可以标定了,但是发现虽然最后输出success但是data[]里的数据都为0,标定结果如下 %YAML:1.0 resolution: !!opencv-matrix rows: 2 cols: 1 dt: i data: [ 640, 480 ] camera_matrix: !!opencv-matrix rows: 3 cols: 3 dt: d data: [ 0., 0., 0., 0., 0., 0., 0., 0., 0. ] dist_coeffs: !!opencv-matrix rows: 4 cols: 1 dt: d data: [ 0., 0., 0., 0. ] @neozhaoliang

您好!我也遇到了这个情况,请问您解决了吗?

LiukeyCC commented 1 year ago

解决了,是因为当时为了节省usb口,用了一个拓展坞来外接两个usb摄像头,但是视频流数据比较大,两个摄像头中的一个摄像头的数据是没有拿到的。所以一个usb口对应一个摄像头就没问题了。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年4月3日(星期一) 下午3:22 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [neozhaoliang/surround-view-system-introduction] 运行 calibrate 一直提示 cannot open device ,使用的是usb 摄像头 (Issue #43)

非常感谢,昨天在实验室搬砖,没有及时回复,然后我是把parser.add_argument("-i", "--input", type=int, default=0,

help="input camera device")中改为default=3(外接的摄像机是3号且能用)然后昨天我又把您标注的那行https://github.com/neozhaoliang/surround-view-system-introduction/blob/master/run_calibrate_camera.py#L56 的--no_get去掉--发现可以标定了,但是发现虽然最后输出success但是data[]里的数据都为0,标定结果如下 %YAML:1.0 resolution: !!opencv-matrix rows: 2 cols: 1 dt: i data: [ 640, 480 ] camera_matrix: !!opencv-matrix rows: 3 cols: 3 dt: d data: [ 0., 0., 0., 0., 0., 0., 0., 0., 0. ] dist_coeffs: !!opencv-matrix rows: 4 cols: 1 dt: d data: [ 0., 0., 0., 0. ] @neozhaoliang

您好!我也遇到了这个情况,请问您解决了吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Cys6p commented 1 year ago

解决了,是因为当时为了节省usb口,用了一个拓展坞来外接两个usb摄像头,但是视频流数据比较大,两个摄像头中的一个摄像头的数据是没有拿到的。所以一个usb口对应一个摄像头就没问题了。 ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年4月3日(星期一) 下午3:22 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [neozhaoliang/surround-view-system-introduction] 运行 calibrate 一直提示 cannot open device ,使用的是usb 摄像头 (Issue #43) 非常感谢,昨天在实验室搬砖,没有及时回复,然后我是把parser.add_argument("-i", "--input", type=int, default=0, help="input camera device")中改为default=3(外接的摄像机是3号且能用)然后昨天我又把您标注的那行https://github.com/neozhaoliang/surround-view-system-introduction/blob/master/run_calibrate_camera.py#L56 的--no_get去掉--发现可以标定了,但是发现虽然最后输出success但是data[]里的数据都为0,标定结果如下 %YAML:1.0 resolution: !!opencv-matrix rows: 2 cols: 1 dt: i data: [ 640, 480 ] camera_matrix: !!opencv-matrix rows: 3 cols: 3 dt: d data: [ 0., 0., 0., 0., 0., 0., 0., 0., 0. ] dist_coeffs: !!opencv-matrix rows: 4 cols: 1 dt: d data: [ 0., 0., 0., 0. ] @neozhaoliang 您好!我也遇到了这个情况,请问您解决了吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

感谢回复!但是我使用一个USB对应一个相机,仍然没有解决标注数据为0的问题,而且我是用pc进行开发的,不使用扩展坞的话,我的usb口无法满足四个相机。总之再次感谢!祝您工作顺利!

neozhaoliang commented 1 year ago

一个扩展带两个相机问题不大,每个相机分辨率设置为 640x480 之类的即可。

Cys6p commented 1 year ago

作者您好,方便请教一下您这个项目所使用的OpenCV版本吗?

neozhaoliang commented 1 year ago

https://github.com/neozhaoliang/surround-view-system-introduction/issues/35

liujinqing-tx commented 3 months ago

我运行run_calibrate_camera.py时一直检测不到摄像头,但是单独调用摄像头又可以

neozhaoliang commented 3 months ago

只凭一句话你让我如何回答!