Ask Your Question
0

Distance measurement using canny edge detector.

asked 2014-05-06 03:44:52 -0600

vibinvalsan gravatar image

updated 2014-05-07 01:15:31 -0600

berak gravatar image

I would like to know, can canny edge detector be used to measure the real distance between two parallel edges, say my project is to measure the distance between the rail tracks, which has to have an accuracy in micro meters. My question is, is there any possible algorithms in opencv which can get the absolute distance measurement in micrometers, the term micrometer is of most importance.I look forward for an answer.I am able to detect the edges but mere edge detection doesn't give me a solution for my problem.Please let me know if it is possible I can go forward with confidence.

Thanks a lot in advance opencv.org

edit retag flag offensive close merge delete

Comments

What about using Hough lines or line segment detector to detect the rail tracks?

If you'll upload some example images, we'll have a better understanding of the problem.

GilLevi gravatar imageGilLevi ( 2014-05-06 10:14:55 -0600 )edit
1

"micrometer precision" sounds unrealistic, unless you are talking about images from a microscope.

berak gravatar imageberak ( 2014-05-07 01:14:11 -0600 )edit

Thank you berek, microscope is not in the scope even if it is possible to measure in millimeter precision ,fair enough for me to proceed and I need a portable device to port the algorithm, I has thought about working with beaglebone-xm board which is supported by opencv and the maximum compatibility of camera is 5 MP on that board, well, I went through stereo vision principle too and found it quite applicable for my application could you please give me your input in that regard.

Thanking you in advance !

vibinvalsan gravatar imagevibinvalsan ( 2014-06-12 11:21:46 -0600 )edit

GiLevi please go through the binary image I had uploaded just before, waiting for your valuable comment thank you!

vibinvalsan gravatar imagevibinvalsan ( 2014-06-12 11:39:05 -0600 )edit

When you say micrometer, you really mean that? Like, 0.001 mm accuracy? Never heard of such an accurate vision system. I guess you would need to work with incredibly high resolution images, and there would be no way you could process edges on such a big image on real time. Also, there are some other possible error sources that may further decrease accuracy... for example, which points in the edges would you use to calculate the distance? Could you ensure that they would be always parallel? If you find a solution, please give us updates on your progress.

Pedro Batista gravatar imagePedro Batista ( 2014-06-13 08:46:27 -0600 )edit

@pedrobatista thank you for raising extremely good questions that really matters in my project. well,micrometer sounds nearly impossible since I have to use microscopic lenses, I think I should step back to millimeter accuracy and I am working and trying to fix the issues, I will definitely let you know if I get any useful leads thank you so much

vibinvalsan gravatar imagevibinvalsan ( 2014-06-16 05:34:21 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
3

answered 2014-05-06 15:03:57 -0600

jwatte gravatar image

If you need micrometer precision, what is the resolution of your camera? Even with subpixel sampling to estimate "true" edge locations, a 1000 pixel wide picture could only cover a few millimeters for micrometer resolution to be possible. Is that what you're using? What kind of "rails" are these? Railroad rails in a forest? To get micrometer precision for standard 1.5 meter rail tracks, wouldn't you need a picture that's several hundred thousand pixels wide? (assuming subpixel fitting, else even more.)

edit flag offensive delete link more

Comments

An idea would be to use two cameras mounted on both sides of a 1.5m pole, but still you'd need very expensive high resolution cameras w. special lenses to achieve micrometer accuracy.

Guanta gravatar imageGuanta ( 2014-05-07 03:12:33 -0600 )edit
0

answered 2014-06-12 11:33:32 -0600

vibinvalsan gravatar image

image description

edit flag offensive delete link more

Comments

when you convert in to binary this is how it looks like and I need to measure the exact perpendicular distance between two edges and I am worried about getting the absolute points on the respective tracks to determine whether it is perpendicular or not, kindly reply

vibinvalsan gravatar imagevibinvalsan ( 2014-06-12 11:36:59 -0600 )edit

Question Tools

Stats

Asked: 2014-05-06 03:44:52 -0600

Seen: 2,190 times

Last updated: Jun 12 '14