How to convert pixels to cm?

24 visualizaciones (últimos 30 días)
Epah
Epah el 26 de Oct. de 2013
Comentada: MOUNA RAHAL el 9 de Abr. de 2021
How to convert pixels into cm for the area and major axis length?
results =
Area: 16414
MajorAxisLength: 213.8713

Respuesta aceptada

Image Analyst
Image Analyst el 27 de Oct. de 2013
  2 comentarios
Epah
Epah el 27 de Oct. de 2013
Thank you Image Analyst.
Stelios Fanourakis
Stelios Fanourakis el 1 de En. de 2019
Thank you so much Image Analyst. Happy New Year.

Iniciar sesión para comentar.

Más respuestas (2)

Walter Roberson
Walter Roberson el 26 de Oct. de 2013
You can't tell if that is the only information you have.
  8 comentarios
Image Analyst
Image Analyst el 8 de Abr. de 2021
I said that, not Walter, and I gave you an example already, with the moon. Let me paraphrase it and maybe you'll understand it better.
Let's say you had your camera in your front yard on a tripod, and in the field of view you could see a ruler standing on its edge on a table. And let's say just above that you could see the moon in the sky just above the ruler. Now we know the ruler is 12 inches and let's say you measure it some how, like with imdistline() or improfile(), and found out the ruler is 1200 pixels. The spatial calibration factor is therefore (12 inches) / (1200 pixels) = 0.01 inches / pixel. So now we know that for things at that distance of the ruler, they can be measured accurately. If I measure, say, a water bottle that is also standing on the table and find that it is 400 pixels wide, then the real world width of the water bottle would be 400 * 0.01 = 4 inches.
Now let's consider the moon, which is not on the table at a distance of 10 feet, but is actually 239,000 miles away. Let's now measure the moon in the photo, and let's say it's 100 pixels. So now, can we say that the real world diameter of the moon is only 100 * 0.01 = 1 inch? Of course not. We know that the moon is actually 2159 miles in diameter! Why is it not one inch???? The answer is because it is not in the same plane as the ruler where we made our spatial calibration so the magnification is different.
Does that explain it better?
MOUNA RAHAL
MOUNA RAHAL el 9 de Abr. de 2021
Sorry i thought that it 's Walter.That is clear for me.thank you. So i need another calibration in that position.

Iniciar sesión para comentar.


Epah
Epah el 26 de Oct. de 2013
What other information do I need?
  1 comentario
Walter Roberson
Walter Roberson el 26 de Oct. de 2013
Lens aperture and distance to the object. Or, something in the image at the same distance as the object and which is of known length. Or something in the image that is of known length, and the distance to both that reference object and the target object are known.
That is, you can use optical properties to determine the true size of the target object, or you can use trigonometry.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for USB Webcams 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