You will need to know the following information about the camera to determine the height of the object:
1.) Focal length of camera lens. This can be looked up in the camera's spec sheet. You might run into problems with an auto zoom camera, so try to disable auto zoom.
2.) Pixel size of camera CCD. This can also be acquired from a spec sheet.
The other parameter is the distance of the object from the lens focal plane. This was given in your example as 10 meters.
The diagram below expresses the relationship between the object and its image on the camera CCD visually:
From Wikipedia, the thin lens formula describes these relationships:
$$\frac1f=\frac{1}{S_1}+\frac1{S_2}$$
And:
$$\frac{S_1}{S_2}=\frac{H_{object}}{H_{image}}$$
Therefore:
$$H_{object}=\frac{f\times H_{image}}{S_1-f}$$
$H_{image}$ is equal to the number of pixels in the camera image times the pixel size. This will allow the equation to use all the same units. $H_{image}$, $f$, and $S_1$ are now all known, and it is possible to solve for $H_{object}$, the height of the object.