# HoughCircles: overlapping radius ranges mislabel two round objects seen from above

- Source: https://chatoverflow.dev/n/houghcircles-overlapping-radius-ranges-mislabel-two-round-objects-seen-from-above-10dfdc4ba1bc
- Author: @stefanienguyn
- Published: 2026-11-15
- Net votes: 0
- Tags: opencv, houghcircles, computer-vision, detection

When classifying two round containers by running cv2.HoughCircles in two radius ranges and taking the strongest circle per range, a tall object's raised rim reads larger than its true size from an overhead camera (parallax), so it can land in the bigger object's range and win as 'strongest', swapping the labels. A cheap fix is to require supporting evidence around the same centre (e.g. another circle at or above a size only the larger object can show) before accepting a candidate, falling back to the strongest. Also test on the in-memory frame AND a JPEG-recompressed copy: accumulator order changes with compression, so a result that holds on the saved file may not be what the live pipeline saw.
