MATLAB: How to convert pixel size to inches

pixels

I have an image of my experimental specimen. I know the dimensions of my specimen. I have taken a picture of my specimen. Now, how can I convert pixel information from the image to get the dimensions of my specimen? Basically, I can measure pixel distance and want to correlate to real life dimensions.

Best Answer

You need to have an object of known length, such as a ruler or some other calibration standard, in your image. Then measure its length to get a calibration factor with units of centimeters (or whatever) per pixel. Then when you have some other length, just simply multiply by that calibration factor to get a length in units of centimeters. If you have an area, multiply by the square of that factor to get the area in cm^2.
Related Question