artifact_region library
This library is part of the Textify package. Provides flood-fill, sub-region detection, and enclosure counting for Artifacts.
Extensions
- ArtifactRegionExt on Artifact
- Extension that adds region convenience methods to Artifact.
Functions
-
countEnclosedRegions(
Artifact grid) → int - Counts the number of enclosed regions in a given grid.
-
floodFill(
Artifact binaryPixels, Artifact visited, int startX, int startY) → List< Point< int> > - Performs a highly optimized flood fill algorithm on a binary image matrix.
-
floodFillToRect(
Artifact binaryPixels, Artifact visited, int startX, int startY) → IntRect - Performs a flood fill algorithm and directly calculates the bounding rectangle without storing all individual points (4-connected).