On Sun, 08 Nov 2009 21:44:56 +0100 Joerg Feierabend <[email protected]> wrote:
| Hi everyone, | | how to measure an object in a prefixed environment with permanent | changes of camera focus? | | I want to measure books, lying on their back, height and length. At the | moment, I have one ruler on its right and another on its bottom, at the | moment I have to enter the sizes manually into the db and to cut out the | book manually. I already get the black cut out automatically, but still | have to cut out the rulers from the book. | | Now - via image comparison would there be a way to tell its size, that I | do not have to manually enter that into the db? After all, I do not need | overall exact measurement. Would a pattern help? Like, if I have no more | then 30 cm and each cm has a different pattern, one would search the | first one found, that would tell me what size I have. One should | remember, that these patterns might slightly change due to different | light, Is this idea worth following at all or rather a waste of time? | | George | _______________________________________________ | Magick-users mailing list | [email protected] | http://studio.imagemagick.org/mailman/listinfo/magick-users It should be posible to use to rulers (assuming they are are right angles) to correct for affine distortion. After which any distance measurement in pixels can be related to the scale provided by the 'fixed' and 'known' rulers. However that is only for affine distortion correction (3 point). For a more exact handling in situations where the camera may also be angled to the subject a 'frame' ruler would be better. that is you have a fixed and known square or rectangular frame which you place around the object before taking the photo. corners of the frame then provide the four reference points needed for perspective image correction and thus image measurements. The known rules could also be simply a grid on which the book lies, though some extra processing may be needed to find the reference points. However as you are taking images of books, and books are square, and assuming the two known rulers are also perpendicular, then you can use books rectangle attibute to correct the perspective, and the rulers lengths to correct scaling. However the calculations are not standard and you may need to write a program to do the math using both ruler and book reference points. Basically the better your known reference frame (rulers) and the better and more automated your results can be. Anthony Thyssen ( System Programmer ) <[email protected]> -------------------------------------------------------------------------- Always choose a bigger enemy. It makes him easier to hit! --- Terry Pratchett, "The Carpet People" -------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
