Hi rodrigo, > I don't need to compare two images but confirm if the checkbox is > filled or > not. For example, someone fill a test and then I scan the page and check > throw the checkboxes for it answers and returns that was filled, so I can > compute if the answer is right or not.
if your working from scans, then checking for identical images would return wrong values, as two scans of the same image might differ. IMHO an other approach would be to test the average value of this checkbox : if it's still withe/light gray (e.g. it's not ckecked), the value will be very different from a checked box (darker color) the idea then is to read the average color of the image, and then compare with a threshold. To set this threshold, the best thing is to choose a set of various scans, then read all the average values, and see where unfilled values are situated, as well as checked ones. at last, here comes a little handler to return you a 1x1 image filled with the average colo of the input image. you just have to getPixel this single pixel to know the avergae color of the whole image you've send to this function hope that make sensen seb on average (startImg) ------------------------------------------------ -- ACTION : -- return a image which color is the average of the whole pixel -- panel of the startImg given. -- -- INPUT : -- startImg <#image> : the image to parse -- -- RETURN : -- VOID : startImg is not an image -- #image : the resulting image ------- -- 1 - check input if (ilk(startImg) <> #image) then return VOID -- 2 - do the average stuffs average = image(1,1,startImg.depth) average.copyPixels(startImg, average.rect, startImg.rect) returnImg = image(startImg.width, startImg.height, startImg.depth) returnImg.copyPixels(average, returnImg.rect, average.rect) -- 3 - return the result return returnImg end -- average method [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
