Ask Your Question

Revision history [back]

Linear encoder with webcam to measure length

There are tools like digital caliper, linear encoders that measures lengths. the are basically digital rulers and they use magnetic strips. they simply count magnetic stripes and calculated the distance.

I want to make it optical by using webcam instead of using magnetic stripes.

Imagine a ruler with webcam pointed on it. dont think about numbers or anything. just imagine ruler with vertical lines. webcam placed on to this ruler very closely and image is very clear. maybe not just webcam but usb microscope, meaning it will obtain very clear and magnified video of ruler.

as webcam moves, vertical lines will travel across video.

what I want to do is count these lines at the center of the video so I can calculate how far we go. or maybe a better algorithm to calculate the horizontal distance of webcam moved.

I googled every word I can think of to find a stating point I had no luck.

any suggestions please ?