optimized ConnectedComponentFinder