MATLAB: Pixels to inch conversion

calibrationimage acquisitionimage analysisImage Processing Toolboxspatial calibration

Hello everyone, I need to convert the number of pixels into inches(cm)…I know the calculation but if the image is taken as a photograph, based on the camera distance number of pixels are varied…Then what is the relationship between number of pixels and camera focal length…Thanks in advace …

Best Answer

See my spatial calibration demo, attached. It lets you specify some known distance in the image and then make measurements based off of that.