SelectiveSearchSegmentationStrategy

Objective-C

@interface SelectiveSearchSegmentationStrategy : Algorithm

Swift

class SelectiveSearchSegmentationStrategy : Algorithm

Strategie for the selective search segmentation algorithm The class implements a generic stragery for the algorithm described in CITE: uijlings2013selective.

Member of Ximgproc

Methods

  • Return the score between two regions (between 0 and 1)

    Declaration

    Objective-C

    - (float)get:(int)r1 r2:(int)r2;

    Swift

    func get(r1: Int32, r2: Int32) -> Float

    Parameters

    r1

    The first region

    r2

    The second region

  • Inform the strategy that two regions will be merged

    Declaration

    Objective-C

    - (void)merge:(int)r1 r2:(int)r2;

    Swift

    func merge(r1: Int32, r2: Int32)

    Parameters

    r1

    The first region

    r2

    The second region

  • Set a initial image, with a segmentation.

    Declaration

    Objective-C

    - (void)setImage:(nonnull Mat *)img
             regions:(nonnull Mat *)regions
               sizes:(nonnull Mat *)sizes
            image_id:(int)image_id;

    Swift

    func setImage(img: Mat, regions: Mat, sizes: Mat, image_id: Int32)

    Parameters

    img

    The input image. Any number of channel can be provided

    regions

    A segmentation of the image. The parameter must be the same size of img.

    sizes

    The sizes of different regions

    image_id

    If not set to -1, try to cache pre-computations. If the same set og (img, regions, size) is used, the image_id need to be the same.

  • Set a initial image, with a segmentation.

    Declaration

    Objective-C

    - (void)setImage:(nonnull Mat *)img
             regions:(nonnull Mat *)regions
               sizes:(nonnull Mat *)sizes;

    Swift

    func setImage(img: Mat, regions: Mat, sizes: Mat)

    Parameters

    img

    The input image. Any number of channel can be provided

    regions

    A segmentation of the image. The parameter must be the same size of img.

    sizes

    The sizes of different regions