Path: utzoo!utgpu!watmath!clyde!att!whuts!homxb!homxc!jackson From: jackson@homxc.ATT.COM (B.JACKSON) Newsgroups: comp.graphics Subject: How do I find the area of a non-polygonal bounded region? Keywords: area fill computer graphics Message-ID: <5532@homxc.ATT.COM> Date: 14 Feb 89 02:06:27 GMT Distribution: na Organization: AT&T BL Holmdel NJ USA Lines: 33 Here's the problem: I've got a bitmapped display that has an image of a ragged-edged closed perimeter surrounding an open area. I need to know the area of the opening. The boundry of the area looks like someone spray-painted a circle of pixels on the screen -- I can guarentee a closed boundry of connected pixels, but there are some individual pixels (and groups of pixels) 'floating' around out in the area I want to measure (I don't want to count the 'floaters' in the area). The perimeter has, as you might guess, thousands of small inclusions. My first guess at how to measure the area is to perform a "fill" operation and count the number of pixels I generate to do the fill -- but I'm open to suggestions. (I can guarentee I can plant a seed pixel in a clear space within the circle if that helps.) If anyone has a recommended algorithm for finding the enclosed area (or for doing a fill on an arbitrarily-bounded region) please let me know. If you've got source code for solving such a problem (or can point me to a reference that does) I will be even more grateful! Thanks in advance, B. Scott Jackson Room 3D-418 AT&T Bell Laboratories Crawford's Corner Rd. Holmdel, NJ 07733 (201) 949-6495 homxc!jackson