3

I am working with photos containing one or more rulers. The size and shape of the rulers are unknown (i.e. there are a hundred different types which might be used). We can assume that the focal plane of the camera and target are parallel (pitch and yaw are controlled), so we only have to deal with rotation of the ruler. For now we can also assume there's only one ruler in the image.

Using OpenCV, I would like to identify the ruler, use the tick marks to scale the image, and provide visual feedback to the user (i.e. a line on the ruler showing, say, 10 mm).

I found a similar question: How to find the ruler position from an image by using opencv? but it has a different set of constraints and doesn't seem to apply.

I also found an article which outlines exactly what I'd like to do: Image Based Measurement of Ancient Coins (just the ruler part though - I'm not doing anything with coins). I am in over my head when it comes to image processing, but I got as far as detecting the scale using the FFT. Conceptually I understand what the authors are explaining in the Ridge Detection and Visual Feedback sections, but I don't know what tools to use to implement it.

Has anyone done anything similar or can anyone point me in the right direction? Or maybe suggest alternatives if I'm trying to use the wrong technique?

asm
  • 63
  • 1
  • 5
  • Sure. I can't use the real images, but I created a couple of examples. (These are cleaner than the images I'll need to process.) [Example 1](http://i153.photobucket.com/albums/s209/asm_bucket/Example1.png), [Example 1 Spectrum](http://i153.photobucket.com/albums/s209/asm_bucket/SpectrumExample1.png), [Example 2](http://i153.photobucket.com/albums/s209/asm_bucket/Example2.png), [Example 2 Spectrum](http://i153.photobucket.com/albums/s209/asm_bucket/SpectrumExample2.png). – asm Oct 12 '14 at 14:25
  • always on the same constant background? – user1269942 Oct 12 '14 at 23:54
  • No - background could be anything. Lighting/contrast could be variable. Can't make it too easy :-) – asm Oct 13 '14 at 00:48
  • 1
    do you have any success? – Siarhei Feb 09 '17 at 19:16
  • 1
    No I never did not complete this successfully. It wasn't high priority for my work, so I ended up focusing on other things. I'd still like to get it working at some point though! – asm Feb 11 '17 at 17:14

0 Answers0