I have a Nikon DSLR D5500 and a 18-55mm lens and a 50 mm lens. I was calibrating the camera to get the pixels per inch using each of the lenses and all other factors like the distance from the object is same in both cases. However, I get different pixels per inch values when I set the focal length to 55mm and 50mm lens. It is acceptable and that's what shall happen. But is there a way how I can correlate and come up with a factor that can be used in future to get the ppi for 55mm lens using 50mm lens image?

PS: I am calibrating the camera to know the size of object from the image.

Let me give an example to clarify my question: I image a ruler with same camera settings, same distance from the object, same angle but just two different lens - a 50 mm lens and 18-55mm lens set to 55mm focus. As I have markings on the ruler, I try to find how many pixels are in 1 inch of the scale so if I image some other object with all same settings I can know the physical size of the object from the image. However, by doing this the number of pixels occupied per inch of physical scale change in both images. And taking a ratio I can probably know the correlation between use of each lens and how many pixels are occupied per inch of physical scale. But I want to know if there is any correlation when I change the lens? Say now instead of 55mm I want to use a 200mm lens and want to know the size of the object. But instead of using a 200mm lens physically, can I use the same 50mm lens calibration and use some standard factor which I can scale to whatever focus I want (200mm, 35mm, etc.) I hope this clarifies my question.

  • "Pixels per inch" really has nothing to do with your camera or lens. Your camera creates an image that is MxN pixels, regardless of what lens you're using, the focal length, or anything else. If you print that image on a 4"x6" sheet, the pixels per inch will be different than if you print it on 8"x10". Similar if you view on a 720p monitor vs a 1080p or a 4K monitor, with the addition of the factor of how large the monitor is. What are you really trying to do here? – twalberg Feb 8 '18 at 17:08
  • the D5500 has 24 MP for its resolution, pixels really just refers to the picture elements on the screen (1080p, 4k etc) - when doing photography it isn't about pixels it's about how many megapixels the camera can do, the more means more data captured meaning more detailed saved to be displayed on a monitor or as a resolution in pixels. Lens have no impact on this. The general rule is to take a raw image with as much data as possible and edit it to what you need late. – Matthew Feb 8 '18 at 17:22
  • 2
    Both commenters seem to misunderstand what the OP is trying to do, which is: determine the height/width of a photographed object by measuring its height/width in pixels in the photograph. The real-world measurements can be determined by knowing how many pixels are used for recording each inch of the scene (at a set distance). It's not related to printing or display. Don't be blinkered by the use of the term "pixels per inch". – osullic Feb 8 '18 at 18:39
  • 1
    Are you trying to calculate the number of pixels covered by a one inch object at a specific distance from the camera for each lens/focal length? – Michael C Feb 8 '18 at 18:39
  • 4
    Possible duplicate of Calculate object size when I have physical pixel size – mattdm Feb 9 '18 at 12:04

Probably we could have a theoretical discussion on angles, distances, distortions, focal planes, etc.

But probably it is simply easier to print a grid of perfect squares of 1x1 inch each and take a photo.

Then you grab your photo and count pixels in each zone of your image.

If the grid is at a small distance you will have a lot of distortion, which you will notice.

Now grab the other lens and do the same. Now you have two numbers to correlate.

But let us be clear. This has nothing to do with Pixels per Inch as a unit. That is an intrinsic value of a metadata inside the photo given by the camera, which can be arbitrary.

And something else. This grid method will only work if your object is flat. If it is three dimensional you need to take into account other perspective deformations.

For that case, it is probably better to take several shots and use a 3D modeling software to make a model and measure from there, or using another scanning method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.