Nidelva river through Trondheim Norway

Nidelva river through Trondheim Norway
by Saaru Lindestokke                

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Calculate object size when I have physical pixel size

I am working on the following formula to calculate distance of object from camera:

distance to object (mm) = focal length (mm) * real height of the object (mm) * image height (pixels)
                                         object height (pixels) * sensor height (mm)

all other parameters are known except object height in pixels?

share|improve this question

marked as duplicate by mattdm, John Cavan, jrista Dec 24 '12 at 19:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Wait, hold on — do you mean "how do I find out what the height in pixels of a given object is?" – mattdm Dec 22 '12 at 13:08

That's going to sound amazingly simple but open the image in your image editing software of choice (e.g. The GIMP), pick the "Select" tool, and select a rectangle encompassing your "object". In The GIMP, the size of the select box is displayed in the status bar at the bottom. There you go. Object height in pixels :)

share|improve this answer
I think he means how many pixels <i>will</i> some object be in size given the distance from the camera, the focal length, and size and resolution of the sensor. – Olin Lathrop Dec 22 '12 at 17:20
@OlinLathrop : "I am working on the following formula to calculate distance of object from camera". So the distance is not known, but all other parameters should be. – matt.nguyen Dec 22 '12 at 17:36
Yeah, I kind of think so too, which in my mind makes this a silly question. (To which this is the right answer.) – mattdm Dec 22 '12 at 19:07

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