• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Measuring and object in an image.

Started by jsoques, 6 August 2010, 22:37:41

Previous topic - Next topic

jsoques

Does anyone know how to use this library to get the measurements of an object in an image with a reference scale in the image? For example, I have an object known to be 5 cm wide, so another object's width beside it can be deduced.

Thanks
Javier

Galfar

I'm not really sure what are you trying to measure, maybe some illustrations could help?

jsoques

Let´s say I have an image of an insect and beside the insect I have also an object of know size (a dime , let´s say). So I know the size of the dime, from that size how would I go about calculating the size of the insect. Of course, I´m not looking for exact precision, but a close enough measurement would be good.

I hope that explains somewhat what I´m trying to achieve.

Thanks

wp

Simple math: if the true size of the insect is S(cm, ins), the true size of the dime S(cm, dime), the pixel size of the insect S(pixels, ins), and the pixel size of the dime is S(pixel, dime) then

S(cm, ins) = S(cm, dime) * S(pixel, ins) / S(pixel, dime)

jsoques

@wp, thanks. I suppose that's the math part, but I would also like to know how it would be done programatically with this imaging library.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk