DiscSegmenter

class PVBM.DiscSegmenter.DiscSegmenter[source]

A class that performs optic disc segmentation.

segment(image_path)[source]

Perform the optic disc segmentation given an image path.

Parameters:

image_path (str) – Path to the image.

Returns:

A PIL Image containing the Optic Disc segmentation.

Return type:

PIL.Image

post_processing(segmentation, max_roi_size)[source]

Post-process the segmentation result to extract relevant zones.

Parameters:
  • segmentation (numpy array) – Segmentation result as a numpy array.

  • max_roi_size (int) – Maximum size of the region of interest.

Returns:

The center, radius, region of interest, and zones ABC.

Return type:

tuple