title: How to read utility meter needle with opencv?
body: <p>I don't necessarily need source code but looking for pseudocode or ideas on how to approach this. I have a camera pointed at my water meter and want to log the usage to a database. I've been playing with OpenCV the past couple weeks and have digit detection working okay. (The last digit poses problems because it spins endlessly, not snap to the number like the first 5, so the full digit is in view less than half the time.)</p>
  
  <p>Anyway, for the best resolution I want to track the actual big red needle. Right now I'm going in a circle and finding the "reddest" pixel, and using that to calculate the angle of the needle. It works... as long as the light is decent and the camera doesn't move.</p>
  
  <p>I'm guessing there is a trick I can do with Canny edge detection... ultimately I'm just trying to find the angle of the longest line maybe? And the needle being a unique color should help eliminate a lot of false positives but how do I actually apply a filter for that?</p>
  
  <p>(Note that there's a little red spinner on the bottom left of the meter, same color as the needle. I need to make sure that doesn't false trigger something also.)</p>
  
  <p>Thank you!
  -Adam<a href="https://i.stack.imgur.com/5oOGL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5oOGL.jpg" alt="Water Meter Example"></a></p>