Skip to content

Conversation

Hariom-Nagar211
Copy link

What

Fix NMSBoxes usage in lpd_yunet.py.
Previously, it passed [x1, y1, x2, y2] (corner coords), but cv.dnn.NMSBoxes expects [x, y, w, h].

How

  • Convert the 4-point quadrilateral into axis-aligned [x, y, w, h] rectangles only for NMS.
  • Use returned indices (keepIdx) to filter the original quadrilateral detections.
  • Normalize keepIdx across OpenCV versions (tuple vs array).

Why

Notes

  • Tested with sample images: overlapping plates are suppressed correctly, and detections remain quadrilateral-shaped.

…t from 4-point corners); keep original quad dets. Fixes opencv#275
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.

1 participant