I'm looking for a class that takes a binary image as input and outputs the number of foreground pixels connected to each pixel. Checking to see if such a filter exists before implementing one. Thanks!