I am a newbie to OpenCV. I would like to work on a small project for tracking the rotation speed of a gear (by using webcam). However, until now, I have no idea how to work on this. The posted image shows a machine which contains two 'big' gears. What I am interested in the gear only on left hand side (the red line as I highlighted).
My plan is:
Extract the Interested gear region .
Mask all unrelated region. So, the masked image shows the left gear only (ROI).
.....
The problem is, how can I locate/extract/mask the ROI and mask?.
I go through some example aboutcvMatchTemplate()
, but it doesn't support rotations and scalings. Due to using webcam, the captured image may scaled or rotated.cvfindcontour()
will extract all contours in the image rather then ROI.