Ask Your Question

Revision history [back]

How to calculate pixel per mm ratio of microscope

I guess this isn't so much a programming question but rather a practical one which I'm hoping someone on here has solved.

I've written a CV also which measure the width of a line from a real-time video feed of a microscope. My issue is that I haven't been able to come up with a reliable way to calibrate the camera. That is to extract a mm per pixel value.

See below, a picture of a ruler with spacing of 0.5mm and a calibration grid below that which I've printed using an inkjet printer. Neither seem to provide a satisfactory solution, the spacing is too "vague".

Am I missing a trick? Is there a better object I could use? A better algorithm?

image description image description image description