I'm not really sure if this is possible but it should be.I currently have a photo of a sphere, whose radius I've measures physically. Knowing the apparent size of the sphere from the photo and all internal camera parameters is it possible to estimate the distance from the camera to the sphere?There is an equation, more used in lens imaging that is useful:object_image_size = (real_object_size * lens_focal_length)/object distanceProblem is my object_image_size is in pixels and I need to convert it to a real world measure, preferable the size that actually showed up on the sensor. 
Estimating real world object distance from photo
maths;pixels;conversion
I may be misunderstanding what you're asking, but if you know the sensor size and the number of pixels in the object, then you can calculate the object size. For example, a Canon 7D has an APS-C sensor that's 22.3 x 14.9mm and 5184 x 3456 pixels. That works out to ~0.0043mm/pixel. So if you have an object that's 250 pixels wide, then the projection of the object onto the sensor would have been 250 pixels * 0.0043mm/pixel = 1.075mm wide.EDIT:So just for fun, I gave this a try. I took a 300mm ruler, put it at 1 meter from the camera and shot it with a 50mm lens on a Canon 7D. According to the ruler tool in Photoshop, it was 3734 pixels wide. That gives me the following equation:3734 * 0.0043 = (300 * 50) / 1000or16.0562 = 15.0Well, it's close, but not exact. (Over by 7%.) My guess is that the sensor site size is actually slightly smaller than 0.0043mm or the sensor size is slightly bigger than the reported size. In fact, the specs for the camera say 18MP effective size, but 19MP actual sensor size. So I'm not sure what that means, but I'm guessing it explains the difference between my actual result and the calculated result. (Either that or I'm misreading the length in Photoshop and it should actually be 3488 pixels instead of 3734.) But it was fun to try!2nd EDIT: This question on the Photo Stack Exchange explains it. Camera lenses are often slightly longer or shorter than claimed, but rounded to the nearest nice focal length. So (assuming my calculations and measurements were correct) my lens is actually a ~53.5mm lens.