Segmentation using Fuzzy Logic-based methods

This page shows the operation of the Fuzzy Logic based methods, as well as the arguments of each method.

Base object

All methods based on Fuzzy Logic are implemented in objects, which inherit from the base object FuzzySetSegmentator. Therefore, all are initialised as follows:

def __init__(self, image: numpy.ndarray, class_representation: Dict):
    """
    Initializes the base object for the segmentation using the membership functions of fuzzy sets.

    Args:
        image: A three-dimensional numpy array, representing the image to be segmented which entries are in 0...255
               range and the channels are BGR.
        class_representation: A dictionary with the representation colour of each class. Each entry in the dictionary
                              must be an integer as the key, and a RGB tuple as value.
    """

To perform the segmentation, this base object defines the segment function.

def segment(self, **kwargs) -> SegmentationResult:
    """
    A generic method to compute the colour segmentation of an RGB image.
    """

AmanteTrapezoidalSegmentator object

When initialised, the labels by default are represented with the following dictionary:

Below are the details of the segment function.

ChamorroTrapezoidalSegmentator object

When initialised, the labels by default are represented with the following dictionary:

Below are the details of the segment function.

LiuWangTrapezoidalSegmentator object

When initialised, the labels by default are represented with the following dictionary:

Below are the details of the segment function.

ShamirTriangularSegmentator object

When initialised, the labels by default are represented with the following dictionary:

Below are the details of the segment function.

Last updated

Was this helpful?