This may be a programming issue, not a mathematical one. If so, please let me know so that I can rewrite it specifically for that audience.
Consider a shape with a random border. Each point on its border has an x and y value that is an integer. This shape's interior is also composed of points that have integer values for both x and y. Each of these points is a distance of 1 from each other.
What is the most efficient way to get a total count of the points within that shape?
In case my question isn't clear enough, allow me to explain the specific issue I'm trying to solve.
It's a programming issue. I have an image that is divided up into different groups of pixels based on certain color analysis techniques. But I have no way of knowing when such a division occurs.
My program first analyzes all the pixels. In the process, it determines a specific pixel's "siblings" -- those that border it up, down, left, right and diagonally in each direction -- but that also satisfy a certain result from the color analysis I alluded to earlier. Therefore, one pixel's siblings can lead the program to their siblings, which lead the program to their siblings, and so on.
Beyond what I've written here, I'm having trouble offering a better formulation of this question. I'll happily edit my question if its current state is found lacking.