You’re describing the right way to do it for a non-circular, deformed cross-section: offset the true boundary inward and look for banding along those offsets.
Two important realities with this particular photo, though:
- “Monocular image → depth” isn’t something I can reliably run here (it needs a trained depth network; I don’t have one available in this environment).
- I can do the rest of your pipeline (outline → spline-ish boundary → inward offsets → peak detection), but the ring contrast in this image is weak vs. lighting/sanding artifacts, so the signal you get from inward offsets is dominated by illumination gradients and grain streaks rather than true annual boundaries.
That said, I implemented the non-circular offset approach using a true shape mask + distance-transform offsets (this is essentially “move inward along normals everywhere” without assuming circles):
- Outline: GrabCut segmentation initialized around the disk, keep largest component, morphology cleanup.
- Spline fit (practically): smooth contour (polygonal approximation of a spline for visualization).
- Inward stepping: compute inside distance transform; for each distance band
d..d+Δ, sample mean intensity of pixels at that offset from the boundary.
- Peak finding: detrend + find local minima (“dark bands”).
On this image, the offset-profile method only finds 2 strong dark minima that pass even loose robustness checks. That’s not because the method assumes circularity (it doesn’t); it’s because:
- the photo has strong shading / specular / sanding texture, and
- the annual bands aren’t consistently darker/lighter around the full perimeter,
- so when you average intensity over each inward offset band, the ring signal largely cancels or gets swamped.
If you can take one more photo, this same method becomes dramatically more accurate:
- camera square to the face (no perspective),
- diffuse lighting (near a window, no point highlights),
- fill the frame with the disk (no keyboard/background),
- optionally wipe with a little mineral spirits / alcohol to pop contrast,
- or sand lightly to a consistent grit.
With that, the non-circular offset signal typically shows many periodic minima, and the inward contour extraction becomes reliable.
If you upload a cleaner straight-on shot, I’ll re-run the same non-circular offset pipeline and you’ll get a much more defensible ring count + annotated contours.