我最近买了一台 XIMEA xiQ USB 3 相机。它在 Windows 中运行正常,但当我尝试在 Ubuntu 中使用它时,出现了如下错误,尽管我按照Ximea 网站上的这些说明
$ /opt/XIMEA/bin/xiCamTool
xiAPI: XIMEA Camera API V4.13.18.00
xiAPI: Adding camera context: dwID=11600851 ptr=880B4000 processID=00000BCA
xiAPI: Create handles 1 Process 00000BCA
xiAPI: Enable sensor
xiAPI: xiReadFileFFS 'SensFPNCorrections' not found
xiAPI: ScmCorrectorA::LoadAndParseConfigurationFile Warning: file SensFPNCorrections not found
xiAPI: xiReadFileFFS 'SensFPNCorrections' not found
xiAPI: ScmCorrectorA::LoadAndParseConfigurationFile Warning: file SensFPNCorrections not found
xiAPI: Frequency 114 71 xiAPI: Enabled 1 bandwidth 48000000
xiAPI: Time needed to read BPL:142ms
xiAPI: Successfully parsed BPL file, 1829 total corrected pixels
xiAPI: SetGPIO 1 set to 8 xiAPI: Frequency 50 31
xiAPI: Enabled 1 bandwidth 48000000
xiAPI: SetGPIO 1 set to 0
xiAPI: AutoSetBandwidth measurement
xiAPI: CalculateResources : Context 880B4000 ID 11600851 m_maxBytes=512 m_maxBufferSize=524288
xiAPI: Failed to change thread scheduler, check user limit for realtime priority.
xiAPI: AutoSetBandwidth measured 393Mbps. Safe margin 10% will be used.
xiAPI: Current bandwidth limit auto-set to 353 Mbps (min:80Mbps,max:393Mbps)
xiAPI: Frequency 50 31
xiAPI: Enabled 1 bandwidth 44125000
xiAPI: Frequency 46 2d
xiAPI: Enabled 1 bandwidth 44125000
xiAPI: ---- Device opened. Model:MQ013CG-E2 SN:11600851 FwF1:API:V4.13.18.00 ----
xiAPI: XIA(8150):xiGetParam (hdr) Finished with ERROR: 106 0x7ff69bebd940 ../../src/xiViewer/xiCore/xiApiWrapper.cpp L 338 : "xiApi_GetParamInt(): xiGetParamInt(hdr) returned 106"
xiAPI: XIA(8150):xiGetParam (hdr_kneepoint1:min) Finished with ERROR: 106 0x7ff69bebd940 ../../src/xiViewer/xiCore/xiApiWrapper.cpp L 338 : "xiApi_GetParamInt(): xiGetParamInt(hdr_kneepoint1:min) returned 106"
xiAPI: XIA(8150):xiGetParam (hdr_kneepoint1:max) Finished with ERROR: 106 0x7ff69bebd940 ../../src/xiViewer/xiCore/xiApiWrapper.cpp L 338 : "xiApi_GetParamInt(): xiGetParamInt(hdr_kneepoint1:max) returned 106"
答案1
这是一个老问题,但我之前确实在类似的环境中设置过。Linux 对 USB 有默认的内存缓冲区限制,必须删除这些限制才能使 Ximea 正常工作。
此命令暂时消除限制,因此请在 API 内容之前在终端中运行它:
echo 0 | sudo tee/sys/module/usbcore/parameters/usbfs_memory_mb
这是 API 在 Linux 上安装时给出的警告。