commercial solutions exist for this. the keywords are “machine vision” (MV) and “automated optical inspection”.
to break this down:
- locate wheel
– separate wheel from background (maybe)
– find circles, center - relative to wheel, find valve stem (?)
based on the video…
circles:
-
maybe
houghCircles
will find the hub and rim circles - MV approaches would sample the picture along several radial profile lines, arranged like a circle were to be found at a certain position, find edges in those 1-dimensional profile lines, and use those points to calculate the actual circle. that’s a lot faster than Hough, a lot more precise, and easier to debug.
- image may need more operations to distinguish the wheel from background
valve stem:
- MV would take a circular profile line at a radius where the valve stem is to be expected (relative to the real circle), then analyze that 1D signal for distinguishable edges/levels
- the equivalent in OpenCV would be
warpPolar
you might want to google for some commercial MV programs and look at some screenshots. a few illustrative examples:
- Machine vision measurement, halcon measurement explanation, caliper finding line, caliper finding circle | DayDayNews
- https://www.mvtec.com/fileadmin/Redaktion/mvtec.com/products/halcon/documentation/solution_guide/solution_guide_iii_b_2d_measuring.pdf
- Calibrated measurements using 2D Metrology with MVTec HALCON