Calculation of size from images at unknown distance

  • Thread starter ixeric
  • Start date
  • #1
2
0
Here is the problem I've been trying to solve for a couple of weeks. I have taken 2 pictures of an object of an unknown size with a camera. The first picture of the object was 1162 pixels across. I moved 419.1 mm closer and took a second picture, which was 1429 pixels across.

Can I calculate the size of the object in mm? What if I had a table of radians per pixel at different distances, could you deduce the distance from that?

Focal length: 3.85mm
Aperture: f/2.8
Shutter: 1/15
Resolution: 2048 x 1536

Let me know if you want some test data to test your calculations.
 

Answers and Replies

  • #2
668
0
No.
You can calculate how large the object image would be if you took another picture from somewhere else. But to calculate the actual size and/or distance of the object, you simply don't have enough information.
 
  • #3
1,762
59
From the information given an exact answer is impossible but I think you can get a good estimate. If the apparent angle of the object is small (need to know focal length of lens) then the size of object in pixels varies nearly linearly with distance. Since the size of the image is about 18.7% larger when the camera moved 419.1 mm closer, we will estimate that 419.1 mm represents 18.7 % of the distance to the object from the point where the image was 1162 pixels. This works out to about 2243 mm. Is that approximately correct?
 
  • #4
2
0
I was taking a picture of a 48 inch ruler, at a distance of 120 inches. I also took a picture of the same ruler with my arm stretched forward 16.5 inches which is at distance of 103.5 inches. These resulted in the 1162 and 1429 pixels above.

I also tried at a distance of 240 inches and 223.5 inches, which resulted in pics 600 and 650 pixels across.

I was thinking that if I built a table of pixels per radian at different distances, then I would just need to figure out how to calculate the distance with a method similar to what Skeptic2 proposes. However, I think the linearity is defeated by the effect of magnification.
 
  • #5
russ_watters
Mentor
19,878
6,298
Well you should find that the angle is based on the distance and size of the ruler and that angular pixel pitch is constant. So you shouldn't need to build a table (but you will always need a reference to the distance or against an object of known size like that ruler). Just use trig and compare a couple of them to make sure. I use that method to measure sizes of objects I take pictures of with my telescope.
 

Related Threads on Calculation of size from images at unknown distance

Replies
3
Views
747
Replies
4
Views
653
Replies
1
Views
3K
Replies
8
Views
2K
  • Last Post
Replies
2
Views
744
Replies
10
Views
3K
Replies
1
Views
2K
Replies
4
Views
862
Replies
19
Views
13K
Top