Troubleshooting#
The focus is on practical debugging strategies and typical failure scenarios.
Typical Symptoms and Causes#
| Symptom | Possible Cause |
|---|---|
| No camera detected | Driver missing, cable issue, SDK not installed |
Timeout in RetrieveResult() | Trigger misconfiguration, no signal, wrong timeout |
| Dropped frames | Bandwidth limitation, slow processing |
| Grab errors | Network instability, packet loss |
| Application freezes | Blocking calls, deadlocks, queue overflow |
Camera Detection Issues#
To resolve camera detection issues, you have two options:
-
Check the hardware:
- Verify cable connection.
- Verify camera power.
- Try a different USB port or Ethernet cable.
-
Check the software:
- Ensure that the pylon SDK is installed.
- Verify that the drivers are loaded.
- Test with the pylon Viewer.
Timeout Problems#
Typical Causes#
- Trigger mode enabled but no trigger signal
- Exposure time too long
- Timeout value too low
Debugging Strategies#
Disable triggering for testing:
Grab Errors#
Indicators#
Typical Causes#
- Network congestion (GigE)
- Insufficient bandwidth
- Unstable connection
Image Corruption and Frame Loss#
Typical Causes#
- Packet loss (GigE cameras)
- CPU overload
- Insufficient buffers
Mitigation Strategies#
- Enable jumbo frames.
- Increase
MaxNumBuffer. - Reduce ROI or frame rate.
Performance Issues#
Indicators#
- Rising latency
- Increasing queue sizes
- Dropped frames
Debugging Strategies#
- Measure frame rate.
- Monitor CPU usage.
- Inspect queue sizes.
Threading Issues#
Indicators#
- Deadlocks due to blocking
queue.get() - Threads not stopping on shutdown
Fixes#
-
Use timeouts:
-
Use stop signals:
OpenCV GUI Issues#
Indicators#
Typical Cause#
- GUI functions executed in worker thread
Fix#
- Run
cv2.imshow()only in main thread.
Network Issues (GigE)#
Indicators#
- Packet loss
- Frame drops
Mitigation Strategies#
- Use dedicated network interface card (NIC)
- Enable jumbo frames.
- Adjust packet delay.
Debugging Checklist#
The first step is to identify which layer causes the issue.
Look for the following issue indicators:
- Is the camera detected?
- Does the pylon Viewer work?
- Have you configured
TriggerModecorrectly? - Is the bandwidth sufficient?
- Is the CPU overloaded?
- Are queues blocking?
Logging Recommendations#
Use structured logging instead of print:
Key Takeaways#
- Most issues are related to configuration or timing.
- Always isolate hardware vs. software problems.
- Monitor system resources continuously.
- Use systematic debugging approach.