Calculation of size from images at unknown distance

In summary, Skeptic2 suggests that a table of pixels per radian can be used to calculate the size of an object in pixels from the given information.
  • #1
ixeric
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.
 
Physics news on Phys.org
  • #2
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
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
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
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.
 

1. How can I accurately calculate the size of an object from an image at an unknown distance?

Calculating the size of an object from an image at an unknown distance requires knowledge of the object's actual size and the distance from the camera to the object. This can be determined using the ratio of the object's size in the image to its actual size, and applying the formula: Actual size = (Image size x Distance) / Focal length.

2. What is the focal length and how does it affect the calculation of size from images?

The focal length is the distance between the camera's lens and the image sensor when the subject is in focus. It affects the calculation of size from images because it is used in the formula to determine the actual size of the object. A longer focal length will result in a smaller actual size, while a shorter focal length will result in a larger actual size.

3. Can I use a standard ruler or scale to determine the actual size of an object in an image?

Yes, a standard ruler or scale can be used to determine the actual size of an object in an image. However, it is important to ensure that the ruler or scale is placed parallel to the object in the image and that the distance between the object and the ruler is accurately measured.

4. Are there any limitations to using image size to determine actual size at unknown distances?

Yes, there are limitations to using image size to determine actual size at unknown distances. These include factors such as lens distortion, image resolution, and perspective distortion, which can all affect the accuracy of the calculated size.

5. How can I improve the accuracy of my calculations for size from images at unknown distances?

To improve the accuracy of size calculations from images at unknown distances, it is important to take multiple images from different angles and distances. This will help to reduce errors caused by lens distortion and perspective distortion. Additionally, using a ruler or scale in the image can also improve accuracy. Using a camera with a higher resolution can also help to improve the accuracy of the calculation.

Similar threads

  • Introductory Physics Homework Help
Replies
5
Views
841
  • Other Physics Topics
Replies
3
Views
2K
  • Astronomy and Astrophysics
7
Replies
226
Views
11K
Replies
17
Views
2K
  • Introductory Physics Homework Help
Replies
4
Views
1K
Replies
4
Views
1K
  • Classical Physics
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
4K
Replies
16
Views
4K
Back
Top