故障排除#
問題:未檢測到相機#
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 差#
Issue:影像出現噪點、過暗或模糊。
解決方案:
-
調整曝光,例如:
-
確保充足的照明。如有必要,請減少背光。對於配備主動式立體的 Stereo mini 相機,請確保環境光不過強。
- 選擇針對您的使用情境最佳化的深度預設值。
- 用軟布清潔鏡頭,並確保已取下鏡頭蓋。
問題:深度資料問題#
Issue:深度資料無效、稀疏或不準確。
解決方案:
- 確保場景中有足夠的紋理。
- 對於主動式立體相機(STM-502u、STM-952u),如有必要請減少環境光。
- 避免正對相機的高反射性表面。
- 選擇針對您的使用情境最佳化的深度預設值。
問題:效能最佳化#
Issue:擷取或處理速度緩慢或資源消耗過高。
解決方案:
-
使用適當的擷取策略,例如:
-
盡可能以原生格式處理影像,並為您的應用程式使用高效的演算法。
- 檢查 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 執行階段或重新開機系統。
- 檢查是否有其他處理程序仍佔用與裝置的連線。