0
\$\begingroup\$

I am trying measure real object height from an image. I'm using the below formula

$$ \text{real height [mm]} = \frac{\text{object height [px]}\times \text{pixel size }\left[\mathrm{mm\over px}\right]\times \text{distance [mm]}}{\text{focal length [mm]}} $$

My camera is a Canon EOS 550D. My values are below:

  • sensor size: 22.3 x 14.9 mm
  • focal length: 30 mm
  • distance to object: 1000 mm
  • pixel height: 1201

I applied values in this equation but I cannot measure object.

\$\endgroup\$
7
  • \$\begingroup\$ To calculate the pixel size you also need the image pixel height. \$\endgroup\$
    – Guffa
    Jun 7, 2014 at 9:43
  • \$\begingroup\$ thanks for your reply ,my object pixel height =802 i converted to mm =212.2 mm then( 16mm(sensor size aprox)*212.2(mm)*1000(mm,distance)/30mm(focal length) can you please advice me about my mistake \$\endgroup\$
    – Arun
    Jun 7, 2014 at 9:58
  • \$\begingroup\$ Check this question photo.stackexchange.com/questions/23414/… \$\endgroup\$
    – Hugo
    Jun 7, 2014 at 10:02
  • \$\begingroup\$ Thanks for reply, one doubt i checked sensor size of Canon_EOS_550D find out 22.3 x 14.9 mm,how can i use this value in equation,eg 22.3*14.9 or? \$\endgroup\$
    – Arun
    Jun 7, 2014 at 10:12
  • 1
    \$\begingroup\$ 802 pixels can't convert to 212.2 mm, as the sensor is only 14.9 mm high. You need the image height in pixels so that you can calculate the size of a pixel. If the image height is for example 3000 pixels, 802*14.9/3000 = 3.98 mm. \$\endgroup\$
    – Guffa
    Jun 7, 2014 at 15:32

1 Answer 1

0
\$\begingroup\$

The correct formula is this:

$$ \text{obj. height [units]} = \text{distance [units]} \times \frac{\text{obj. height [px]}}{\text{img height [px]}} \times \frac{\text{sensor height [mm]}}{\text{focal length [mm]}} $$

In your case, you are missing the image height in pixels:

$$ \text{obj. height [mm]} = 1000\,[\mathrm{mm}]\times \frac{1201\,[\mathrm{px}]}{\text{IMAGE [px]}} \times \frac{14.9\,[\mathrm{mm}]}{30\,[\mathrm{mm}]} $$

\$\endgroup\$

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