Get Real distance value in an image.

3 visualizaciones (últimos 30 días)
Theodor Al Saify
Theodor Al Saify el 9 de Ag. de 2018
Comentada: jonas el 13 de Ag. de 2018
After using the comparison method between two image, i want to detect the real length value of the red Lines. For example 5 cm. So i can know the distance the object has moved. Is it doable automatically ?
  2 comentarios
jonas
jonas el 9 de Ag. de 2018
Editada: jonas el 10 de Ag. de 2018
Obviously you are going to need the scale. One pixel can be 1 km long, for all we know.
Oh, I didnt see the scale. It blends in with the background. Will be almost impossible to use in my layman opinion.
Theodor Al Saify
Theodor Al Saify el 12 de Ag. de 2018
For example in the photo attached, can i detect the scale automatically ?

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 12 de Ag. de 2018
See my spatial calibration demo. It can do what you want. Adapt it as necessary.
  1 comentario
Theodor Al Saify
Theodor Al Saify el 13 de Ag. de 2018
i already used it, but i don't know how to do it automatically, in your code the user draw a line to calibrate. in my case i want to detect the scale and auto-calibrate. I don't have the knowledge to do it, i am new to Matlab. Sorry for bothering.

Iniciar sesión para comentar.

Más respuestas (1)

Florian Morsch
Florian Morsch el 10 de Ag. de 2018
Editada: Florian Morsch el 10 de Ag. de 2018
With a given reference its possible. Either calibrate your camera to that reference and dont move it afterwards or have a known scale on each image. That way you can tell what distance equals a pixel. Now you just have to count the pixels and can convert that to your distance.
And yes, you can do it automatically. If the camera is calibrated to the reference, just count the pixels and convert them. If you have a scale on each image, detect that scale, count the pixels and (since you know the real dimensions of the scale) use that to calculate the distance.
  6 comentarios
Theodor Al Saify
Theodor Al Saify el 13 de Ag. de 2018
For example in the picture attached , are the condition right ? the scale is different color than the background, and also the camera is always at the same position and height.
jonas
jonas el 13 de Ag. de 2018
Yes, now you should be able to detect the scale. If I were you, I would pass the question to Image Analyst, as he will be able to give you the best guidance on what method to use. If you can segment the red color, then it should be easy to find the axes and count the number of pixels in the y- and x-directions.
You can start by looking at the demo on color segmentation by IA.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by