ImageSegmenterOptions

class giant.image_processing.image_segmenter.ImageSegmenterOptions(otsu_levels: int = 2, minimum_segment_area: int = 10, minimum_segment_dn: float = 200)[source]
Parameters:
  • otsu_levels (int)

  • minimum_segment_area (int)

  • minimum_segment_dn (float)

otsu_levels: int = 2

This sets the number of levels to attempt to segment the histogram into for Otsu based multi level thresholding.

See the otsu() function for more details.

minimum_segment_area: int = 10

This sets the minimum area for a segment to be considered not noise.

Segments with areas less than this are discarded as noise spikes

minimum_segment_dn: float = 200

The minimum that the average DN for a segment must be for it to not be discarded as the background.

Segments with average DNs less than this are discarded as the background