Package org.opencv.ximgproc

## Class SelectiveSearchSegmentationStrategy

- java.lang.Object
- - org.opencv.core.Algorithm
  - - org.opencv.ximgproc.SelectiveSearchSegmentationStrategy

- Direct Known Subclasses:
    `SelectiveSearchSegmentationStrategyColor`, `SelectiveSearchSegmentationStrategyFill`, `SelectiveSearchSegmentationStrategyMultiple`, `SelectiveSearchSegmentationStrategySize`, `SelectiveSearchSegmentationStrategyTexture`

      public class SelectiveSearchSegmentationStrategy
      extends Algorithm

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

- - ### Field Summary

    - ### Fields inherited from class org.opencv.core.Algorithm

      `nativeObj`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `SelectiveSearchSegmentationStrategy​(long addr)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static SelectiveSearchSegmentationStrategy` | `__fromPtr__​(long addr)` |
    `protected void` | `finalize()` |
    `float` | `get​(int r1, int r2)` | Return the score between two regions (between 0 and 1)
    `void` | `merge​(int r1, int r2)` | Inform the strategy that two regions will be merged
    `void` | `setImage​(Mat img, Mat regions, Mat sizes)` | Set a initial image, with a segmentation.
    `void` | `setImage​(Mat img, Mat regions, Mat sizes, int image_id)` | Set a initial image, with a segmentation.

    - ### Methods inherited from class org.opencv.core.Algorithm

      `clear, empty, getDefaultName, getNativeObjAddr, save`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SelectiveSearchSegmentationStrategy

          protected SelectiveSearchSegmentationStrategy​(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static SelectiveSearchSegmentationStrategy __fromPtr__​(long addr)

    - #### get

          public float get​(int r1,
                           int r2)

      Return the score between two regions (between 0 and 1)
      Parameters:
        `r1` - The first region
        `r2` - The second region
      Returns:
        automatically generated

    - #### merge

          public void merge​(int r1,
                            int r2)

      Inform the strategy that two regions will be merged
      Parameters:
        `r1` - The first region
        `r2` - The second region

    - #### setImage

          public void setImage​(Mat img,
                               Mat regions,
                               Mat sizes,
                               int image_id)

      Set a initial image, with a segmentation.
      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.

    - #### setImage

          public void setImage​(Mat img,
                               Mat regions,
                               Mat sizes)

      Set a initial image, with a segmentation.
      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

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

      Overrides:
        `finalize` in class `Algorithm`
      Throws:
        `java.lang.Throwable`