故障排除#
问题:未检测到相机#
Solution:
- Verify the USB Type-C cable is properly connected to the camera.
- Try a different USB port (preferably USB 3.0) and a different USB cable.
- Check Device Manager for the camera device. If there's an unknown device, install the latest pylon SDK drivers.
- Ensure the pylon SDK is properly installed.
- Try unplugging and reconnecting the camera.
Solution:
- Verify the USB Type-C cable is properly connected to the camera.
- Try a different USB port (preferably USB 3.0) and a different USB cable.
- Verify the camera is detected:
lsusb | grep Basler - Ensure the pylon SDK is properly installed. Verify with
which pylon. - Try unplugging and reconnecting the camera.
Solution:
- Verify the USB Type-C cable is properly connected to the camera.
- Try a different USB port (preferably USB 3.0) and a different USB cable.
- Verify the camera is detected:
lsusb | grep Basler - Ensure the pylon SDK is properly installed. Verify with
which pylon. - Try unplugging and reconnecting the camera.
问题:图像 Quality 较差#
问题:图像出现噪点、过暗或模糊。
解决方法:
-
调整曝光,例如:
-
确保照明充足。如有必要,请减少背光。对于配备主动立体视觉的 Stereo mini 相机,请确保环境光不过强。
- 选择针对您的用例优化的深度预设。
- 用软布清洁镜头,并确保已取下镜头盖。
问题:深度数据问题#
问题:深度数据无效、稀疏或不准确。
解决方法:
- 确保场景中具有足够的纹理。
- 对于主动立体视觉相机(STM-502u、STM-952u),如有必要,请降低环境光。
- 避免正对相机的强反光表面。
- 选择针对您的用例优化的深度预设。
问题:性能优化#
问题:采集或处理速度较慢或资源占用过高。
解决方法:
-
使用适当的采集策略,例如:
-
尽可能以原生格式处理图像,并为您的应用使用高效的算法。
- 检查 CPU 使用率、Memory 消耗和 USB 带宽使用情况。
问题:OpenCV 相关的 DLL 或依赖项问题#
Issue: The code execution cannot proceed because opencv_core.dll was not found.
Solution: Add the folder containing the OpenCV DLLs to your PATH environment variable.
See Adding OpenCV to PATH Environment Variable in the C++ Programmer's Guide.
Issue: opencv_core.so: cannot open shared object file.
Solution: Make sure OpenCV is properly installed and the library path is added to LD_LIBRARY_PATH.
Issue: opencv_core.so: cannot open shared object file.
Solution: Make sure OpenCV is properly installed and the library path is added to LD_LIBRARY_PATH.
问题:PCL 相关的 DLL 或依赖项问题#
Issue: The code execution cannot proceed because OpenNI2.dll was not found.
Solution: Download OpenNI2 and add the folder containing the OpenNI2.dll to your PATH environment variable.
Issue: OpenNI2.so: cannot open shared object file.
Solution: Install the required OpenNI2 library package.
Issue: OpenNI2.so: cannot open shared object file.
Solution: Install the required OpenNI2 library package.
问题:PCL 的 CMake 配置错误 (RelWithDebInfo)#
Issue: When compiling a program that uses PCL with cmake, an error message similar to Compiler: C++ compiler determination failed occurs.
Solution: When building PCL in the CMake GUI, use the Release configuration instead of RelWithDebInfo.
Issue: PCL compilation problems.
Solution: Use the libpcl-dev package instead of building from source.
Issue: PCL compilation problems.
Solution: Use the distribution's PCL package if available, or build from source with Release configuration.
问题:混合使用 32 位和 64 位库#
问题:混合使用 32 位和 64 位库时出现链接器错误。
解决方法:确保所有库(pylon、OpenCV、PCL)均编译为与您的应用程序相同的架构(全部为 32 位或全部为 64 位)。
问题:Debug 模式下帧率较低#
问题:在 Debug 模式下运行时的帧率显著低于 Release 模式。
解决方法:这是正常现象。请在 Release 模式下编译以获得更好的性能。Debug 模式具有额外的开销。
问题:设备已连接错误#
问题: 在发生崩溃或程序异常终止后,应用程序无法连接到设备,因为它报告 Device already in use.
解决方法:
- 重启 pylon 运行时或重启系统。
- 检查是否有其他进程仍在占用与设备的连接。