疑難排解#
問題:未偵測到相機#
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.
問題:影像品質不佳#
問題:影像出現雜訊、過暗或模糊。
解決方案:
-
調整曝光,例如:
-
請確保照明充足。如有必要,請降低背光亮度。若使用具備主動立體影像功能的Stereo mini 攝影機,請確保環境光線不要過強。
- 請選擇一個針對您的使用情境所優化的深度預設值。
- 請使用軟布清潔鏡頭,並確保已取下鏡頭蓋。
問題:深度資料問題#
問題:深度資料無效、稀疏或不準確。
解決方案:
- 確保場景中具有足夠的質感。
- 若使用主動式立體聲(STM-502u、STM-952u),必要時請降低環境光線。
- 請避免讓高反光表面直接面對相機。
- 請選擇一個針對您的使用情境所優化的深度預設值。
問題:效能優化#
問題:擷取或處理過程感覺很慢,或是佔用太多資源。
解決方案:
-
採用適當的抓取策略,例如:
-
在可行情況下,請以原生格式處理影像,並針對您的應用程式採用高效的演算法。
- 檢查 CPU 使用率、記憶體佔用量以及 USB 頻寬使用情況。
問題:DLL 或與 OpenCV 相關的依賴性問題#
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.
問題:DLL 或 PCL 的依賴性問題#
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 位元)進行編譯。
問題:在除錯模式下幀率過低#
問題:在「除錯模式」下執行時,幀率明顯低於「發行模式」。
解決方案:這是正常現象。請以「Release」模式編譯以獲得更好的效能。偵錯模式會產生額外的開銷。
問題:出現「裝置已連接」錯誤#
議題: 發生當機或程式異常終止後,應用程式無法連線至裝置,因為它回報 Device already in use.
解決方案:
- 重新啟動 pylon 執行環境,或重新啟動系統。
- 檢查是否有其他程序仍與該裝置保持連線。