Ask Your Question

Camera as angle encoder

asked 2015-02-25 10:13:27 -0500


In my project I need to use a webcam as an shaft angle encoder. The shaft rotates very slowly, 1rpm, and is always somewhat in the center view of the camera. I will attach a thin disk to the shaft and put some fiducials on the disk. The camera will detect either the position of the fiducials or their orientation and determine the shaft angular position.

I have tried using different colored circles arranged in a circular pattern as fiducials. The code detects the circles centers and determines the angle using simple trigonometry. I was able to get around 1 degree of accuracy with this system.

I have also tried using reactiVision fiducials since the library provides angle information of each marker. This approach turned out to be pretty noisy.

Is there any better fiducial for this application. I am looking for more precision and less noise. Maybe instead of circles I can try to detect lines or something like that.

Thanks in advance.


edit retag flag offensive close merge delete


Sample images?

FooBar gravatar imageFooBar ( 2015-02-25 11:01:45 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-02-25 16:13:28 -0500

ClintFromVa gravatar image

I've been working on something similar. For a target, I started with a surveyor's benchmark (2x2 checkerboard) but now think a 1x1 colored square centered in a 3x3 white one would work better.

What type of camera/sensor are you using?

edit flag offensive delete link more


A regular webcam. I will try the colored square approach.

fernandomierhicks gravatar imagefernandomierhicks ( 2015-02-26 09:01:00 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2015-02-25 10:13:27 -0500

Seen: 145 times

Last updated: Feb 25 '15