MATLAB: Hi every one , I need help about:

camera-calibrationComputer Vision Toolboximage processingImage Processing Toolboxspatial calibration

How to know the real size of a bubble in an image , the distance of camera is 10 cm from the bubble, and how to convert it from pixel to micron unit. I know the size of
the bubble in the attachment but in pixel without real distance of camera.
if possible help. thanx

Best Answer

In order to determine this you need at least one additional piece of information. The camera converts light from incidence angles, to image position (u,v) (this is only stating the rather obvious). Typically cameras with small fields-of-view have a rather simple mapping:
where u0, v0 are the horizontal and vertical image coordinate of the optical axis (you can at least initially assume that is the centre of your image), f is the focal length of your lens, and θ and ϕ are the polar angle to the optical axis and the azimuthal angle around it. To determine the size of the bubble you need to know the focal length f in useful units. If you know the field-of-view of your camera you can determine this:
where is the edge-to-edge field-of-view and S is the image size. (90-deg field-of-view gives you a focal length that is half the image size.
Since you know the distance to the bubble the rest is geometry.
A simpler way would be to include a ruler with well-calibrated scale-marks in the images.
HTH