Skip to content

Conversation

@neha458
Copy link

@neha458 neha458 commented Oct 12, 2025

Fix: OpenCV 4.x compatibility issue

Summary

This pull request updates the code to make it compatible with OpenCV 4.x.

Details of Changes

  • Updated cv2.findContours call in segment.py
  • OpenCV 3.x returned three values (_, contours, _)
  • OpenCV 4.x returns only two values (contours, _)
  • Modified the code to unpack the correct number of return values
  • Ensured it works properly on OpenCV 4.x and Python 3.10

Testing

✅ Tested successfully on:

  • Python 3.10
  • OpenCV 4.9.0

The gesture recognition system runs without errors after this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants