TransientAreasSegmentationModule

Objective-C

@interface TransientAreasSegmentationModule : Algorithm

Swift

class TransientAreasSegmentationModule : Algorithm

class which provides a transient/moving areas segmentation module

perform a locally adapted segmentation by using the retina magno input data Based on Alexandre BENOIT thesis: “Le système visuel humain au secours de la vision par ordinateur”

3 spatio temporal filters are used:

  • a first one which filters the noise and local variations of the input motion energy
  • a second (more powerfull low pass spatial filter) which gives the neighborhood motion energy the segmentation consists in the comparison of these both outputs, if the local motion energy is higher to the neighborhood otion energy, then the area is considered as moving and is segmented
  • a stronger third low pass filter helps decision by providing a smooth information about the “motion context” in a wider area

Member of Bioinspired

Methods

  • allocator

    Declaration

    Objective-C

    + (nonnull TransientAreasSegmentationModule *)create:
        (nonnull Size2i *)inputSize;

    Swift

    class func create(inputSize: Size2i) -> TransientAreasSegmentationModule

    Parameters

    inputSize

    : size of the images input to segment (output will be the same size)

  • return the sze of the manage input and output images

    Declaration

    Objective-C

    - (nonnull Size2i *)getSize;

    Swift

    func getSize() -> Size2i
  • parameters setup display method - returns: a string which contains formatted parameters information

    Declaration

    Objective-C

    - (nonnull NSString *)printSetup;

    Swift

    func printSetup() -> String
  • cleans all the buffers of the instance

    Declaration

    Objective-C

    - (void)clearAllBuffers;

    Swift

    func clearAllBuffers()
  • access function return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose

    Declaration

    Objective-C

    - (void)getSegmentationPicture:(nonnull Mat *)transientAreas;

    Swift

    func getSegmentationPicture(transientAreas: Mat)
  • main processing method, get result using methods getSegmentationPicture()

    Declaration

    Objective-C

    - (void)run:(nonnull Mat *)inputToSegment channelIndex:(int)channelIndex;

    Swift

    func run(inputToSegment: Mat, channelIndex: Int32)

    Parameters

    inputToSegment

    : the image to process, it must match the instance buffer size !

    channelIndex

    : the channel to process in case of multichannel images

  • main processing method, get result using methods getSegmentationPicture()

    Declaration

    Objective-C

    - (void)run:(nonnull Mat *)inputToSegment;

    Swift

    func run(inputToSegment: Mat)

    Parameters

    inputToSegment

    : the image to process, it must match the instance buffer size !

  • try to open an XML segmentation parameters file to adjust current segmentation instance setup

     - if the xml file does not exist, then default setup is applied
     - warning, Exceptions are thrown if read XML file is not valid
    

    Declaration

    Objective-C

    - (void)setup:(nonnull NSString *)segmentationParameterFile
        applyDefaultSetupOnFailure:(BOOL)applyDefaultSetupOnFailure;

    Swift

    func setup(segmentationParameterFile: String, applyDefaultSetupOnFailure: Bool)

    Parameters

    segmentationParameterFile

    : the parameters filename

    applyDefaultSetupOnFailure

    : set to true if an error must be thrown on error

  • try to open an XML segmentation parameters file to adjust current segmentation instance setup

     - if the xml file does not exist, then default setup is applied
     - warning, Exceptions are thrown if read XML file is not valid
    

    Declaration

    Objective-C

    - (void)setup:(nonnull NSString *)segmentationParameterFile;

    Swift

    func setup(segmentationParameterFile: String)

    Parameters

    segmentationParameterFile

    : the parameters filename

  • try to open an XML segmentation parameters file to adjust current segmentation instance setup

     - if the xml file does not exist, then default setup is applied
     - warning, Exceptions are thrown if read XML file is not valid
    

    Declaration

    Objective-C

    - (void)setup;

    Swift

    func setup()
  • write xml/yml formated parameters information

    Declaration

    Objective-C

    - (void)write:(nonnull NSString *)fs;

    Swift

    func write(fs: String)

    Parameters

    fs

    : the filename of the xml file that will be open and writen with formatted parameters information