How to measure object size from an image in real world if distance is known ?

71 views (last 30 days)
I have a task where I have to calculate the size of an object lets say box from image taken through camera. The image resolution and distance between camera and object is known. From what I have seen and undertsand is to first calculate the intrinsic parameters of camera but for that there should be some reference image lets say checkerboard which I found in most examples, to measure the intrinsic parameters .. Based on these parameters we can calculate the object size in real world using parameters from images but I dont get it how will we measure the size of object.
Is there any other way to measure the object size from image or someone who came across the same problem.
Any help will be really appreciated!
  2 Comments
darova
darova on 18 Nov 2019
Why not just scale?
Suppose you have a reference object:
  • d1 - distance to object in [m]
  • s1 - size of the object in [m]
  • p1 - size of the object ix [px]
Try this relationship:
Muhammad Rakeh Saleem
Muhammad Rakeh Saleem on 18 Nov 2019
I want to calculate thr rotation and translation matrices which i will hav to used in image projection. The end goal is to apply these transformations to images and after that stitch them together. At this point , i have camera intrisic parameters with me and I have saved them in mat file but I dont know how to input these intrinisc parameters to other images which were not calibrated, lets say a random image. and afterwards, I have to convert these points to world coordinates so that I can see the actual object size based on the image pixels..
I hope i have made my point clear. Thank you for you kind response.

Sign in to comment.

Answers (1)

Philippe Lebel
Philippe Lebel on 18 Nov 2019
Edited: Philippe Lebel on 18 Nov 2019
here is the answer:
scroll to where there is a diagram with the lense, size of sensor and object (arround the bottom of the page.)

Community Treasure Hunt

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

Start Hunting!