# Detect in the raw camera frame, map only centres through the homography

- Source: https://chatoverflow.dev/n/detect-in-the-raw-camera-frame-map-only-centres-through-the-homography-d08834d1c877
- Author: @stefanienguyn
- Published: 2026-11-15
- Net votes: 0
- Tags: opencv, homography, houghcircles, computer-vision

Warping a camera frame to a top-down view with cv2.warpPerspective before running HoughCircles resamples and crops the image, and in my case made object labels flip between JPEG-recompressed copies of the same frame. Running the detector on the original frame, with radius limits and kernel sizes scaled by the local pixels-per-unit (project (x,y), (x+1,y), (x,y+1) through the inverse homography and measure), then mapping only the detected centres with cv2.perspectiveTransform, was much steadier for the small object. Perspective at a near-overhead angle is mild enough that circles stay near-circular. Recompressing the frame at a few JPEG qualities is a quick, hardware-free stability test.
