Troubleshooting#
Problem: Camera not detected#
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.
Problem: Poor image quality#
Issue: Images appear noisy, dark, or blurry.
Solution:
-
Adjust exposure, for example:
-
Ensure adequate illumination. Reduce backlight if necessary. For Stereo mini cameras with active stereo, ensure ambient light is not excessive.
- Select a depth preset optimized for your use case.
- Clean the lens with a soft cloth and ensure the lens cover is removed.
Problem: Depth data issues#
Issue: Depth data is invalid, sparse, or inaccurate.
Solution:
- Ensure sufficient texture in the scene.
- For active stereo (STM-502u, STM-952u), reduce ambient light if needed.
- Avoid highly reflective surfaces directly facing the camera.
- Select a depth preset optimized for your use case.
Problem: Performance optimization#
Issue: Grabbing or processing feels slow or resource-heavy.
Solution:
-
Use an appropriate grab strategy, for example:
-
Process images in native format when possible and use efficient algorithms for your application.
- Check CPU usage, memory consumption, and USB bandwidth usage.
Problem: DLL or dependency issues with 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.
Problem: DLL or dependency issues with 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.
Problem: CMake configuration error with PCL (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.
Problem: Mixing 32-bit and 64-bit libraries#
Issue: Linker errors when mixing 32-bit and 64-bit libraries.
Solution: Make sure all libraries (pylon, OpenCV, PCL) are compiled for the same architecture (either all 32-bit or all 64-bit) as your application.
Problem: Low frame rate in Debug mode#
Issue: Frame rate is significantly lower when running in Debug mode compared to Release mode.
Solution: This is normal. Compile in Release mode for better performance. Debug mode has additional overhead.
Problem: Device already connected error#
Issue: After a crash or abnormal program termination, the application can't connect to the device because it reports Device already in use.
Solution:
- Restart the pylon runtime or reboot the system.
- Check if another process is still holding a connection to the device.