Getting Meters per Pixel out of the camera calibration app?

7 visualizaciones (últimos 30 días)
Is it possible to get meters per pixel out of the camera calibration app? The calibration was successful with the use of a checkboard but just need to know the m/Pixal so i can use it for motion tracking. Or is there a way of using the camera calibration data within the motion tracking?
I have objects moving is a video from a static camera and need to find the velocity of the objects. I have photos of a calibration board at the same distance from the camera as the objects i want to track. I have used the camera calibration app to measure the check board but im stuck as to how i can extract the information i need so that i can find an acurate (ish) distance traveled of the object in the video.
Thanks and much love.

Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 6 de En. de 2021
If you know the size of the squares on the checkerboard and your objects are at the same distance then you only need to count the size of the squares in pixels and then you have it. something like this:
checkerboard_size = [0.04 0.05]; % [m] pure guesswork - but reasonable size of a checkerboard square?
pixels_per_square = [34, 35;34.5 34.5; 34 36]; % extracted pixel-sizes of a couple of representative...
% squares of the checkerboard in an image
length_per_pixel = checkerboard_size./mean(pixels_per_square);
Note that I've not bothered to do this with a proper statistical estimate, that is left to the traveler. Also be very careful with the
use of this since it will only be valid at the same distance from the camera as the checkerboard.
HTH

Más respuestas (0)

Categorías

Más información sobre MATLAB Support Package for USB Webcams en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by