在Ubuntu 16.04上,我编写了spinnaker src/Acquisition/make,我在bin/运行它时得到了“获取”,得到的错误是:检测到的摄像机数:1
运行相机0的例子..。
*设备信息*
DeviceID: 18073382 DeviceSerialNumber: 18073382 DeviceVendorName: Point Grey DeviceModelName: Grasshopper3 GS3-U3-32S4M Grasshopper3 DeviceType: U3V DeviceDisplayName: Point Grey DeviceAccessStatus: OpenReadWrite DeviceVersion: FW:v2.25.3.00 FPGA:v2.02 DeviceDriverVersion: none :0.0.0 DeviceUserID: DeviceIsUpdater: 0 DeviceInstanceId: 0113C726 DeviceLocation: DeviceCurrentSpeed: DeviceInstanceId en21#:设备:1
*图像采集*
获取模式设置为连续..。无法开始图像采集。错误中止-1010.
摄像机0例完成..。
完成了!按回车出口..。
/softwarelib/Boost/boost_1_60_0/GCC_5_3_1/linux_cpp11/release/amd64/include/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex():断言‘!Acquisition_C’失败
示例代码本身根本不使用互斥。
发布于 2020-03-04 23:28:07
此错误是由于usbfs内存分配不足造成的。有关如何将该值提高到1000的信息,请参阅spinnaker自述文件第3节如下:
===============================================================================
3. USB相关说明
在Linux系统中,USB内存在默认情况下限制在16 MB或更少。为了增加这一限制,以充分利用成像硬件的全部功能,需要对系统进行一些小的更改。
要永久修改USB内存,请执行以下操作:
1. Open the /etc/default/grub file in any text editor. Find and replace:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
with this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000"
2. Update grub with these settings:
$ sudo update-grub
3. Reboot and test a USB 3.1 camera.如果此方法未能设置内存限制,则在下次重新启动之前暂时修改USB-FS内存,运行以下命令:$ sudo sh -c 'echo 1000 >-c
要确认内存限制已成功更新,请运行以下命令:$ cat /sys/module/usbcore/parameters/usbfs_memory_mb
如果使用多个USB3摄像头,USB3的内存限制可能需要超过1000。有关这些更改的更多信息,请访问:https://www.flir.com/support-center/iis/machine-vision/application-note/understanding-usbfs-on-linux。
https://stackoverflow.com/questions/60536182
复制相似问题