artifact_splitting library

This library is part of the Textify package. Provides valley detection and artifact splitting utilities.

Functions

artifactValleysOffsets(Artifact artifact, {bool allowSoftValleys = true}) List<int>
Returns a list of column indices where the artifact should be split.
calculateThreshold(List<int> histogram) int
Calculates an appropriate threshold for identifying valleys in a histogram.
splitArtifactByColumns(Artifact artifactToSplit, List<int> offsets) List<Artifact>
Splits the given artifact into multiple column slices based on the offsets.