Ask Your Question

DanKegel's profile - activity

2014-09-21 00:37:25 -0600 received badge  Editor (source)
2014-09-21 00:36:20 -0600 asked a question Detecting rotational speed of an analog electric meter

Newbie here. I'd like to use a webcam to monitor the rotational speed of an analog electric meter, so I fired up OpenCV for the first time and started playing. Really all I need is to measure how long between rotations (there's a mark at one spot on the wheel). Only a little bit of the wheel is visible. So ideally it comes down to finding the spot in the image that corresponds to where the mark will be, and then timing how long between white-to-black transitions. Should be easy :-) My first thought was to locate the five big adjacent circles, then find the little vertical reference mark above the wheel, then grab the pixel of interest.

link:Here's a picture of the data, and of the output of using fitEllipse() on contours:

image description

fitEllipse has a bit of trouble finding the five big circles, possibly because they're touching.

Anyone have newbie suggestions for how to reliably find the pixel of interest (on the wheel, right under the reference mark)? Ideas so far:

  • detect the five big circles, then look a bit below for the pixel where the dot on the wheel will be
  • detect the big black rectangle on the bottom, then look a bit above for the pixel ...
  • detect the region of maximum change per frame; this is likely the region of the wheel with alternating white and black stripes. Then ignore the dot and just measure how fast the pixels alternate. (This seems like the most promising so far.)