Package org.opencv.calib3d

## Class StereoMatcher

- java.lang.Object
- - org.opencv.core.Algorithm
  - - org.opencv.calib3d.StereoMatcher

- Direct Known Subclasses:
    `StereoBM`, `StereoSGBM`

      public class StereoMatcher
      extends Algorithm

  The base class for stereo correspondence algorithms.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `DISP_SCALE` |
    `static int` | `DISP_SHIFT` |

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

      `nativeObj`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static StereoMatcher` | `__fromPtr__​(long addr)` |
    `void` | `compute​(Mat left, Mat right, Mat disparity)` | Computes disparity map for the specified stereo pair
    `protected void` | `finalize()` |
    `int` | `getBlockSize()` |
    `int` | `getDisp12MaxDiff()` |
    `int` | `getMinDisparity()` |
    `int` | `getNumDisparities()` |
    `int` | `getSpeckleRange()` |
    `int` | `getSpeckleWindowSize()` |
    `void` | `setBlockSize​(int blockSize)` |
    `void` | `setDisp12MaxDiff​(int disp12MaxDiff)` |
    `void` | `setMinDisparity​(int minDisparity)` |
    `void` | `setNumDisparities​(int numDisparities)` |
    `void` | `setSpeckleRange​(int speckleRange)` |
    `void` | `setSpeckleWindowSize​(int speckleWindowSize)` |

    - ### 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`

- - ### Field Detail

    - #### DISP_SHIFT

          public static final int DISP_SHIFT

      See Also:
        Constant Field Values

    - #### DISP_SCALE

          public static final int DISP_SCALE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StereoMatcher

          protected StereoMatcher​(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static StereoMatcher __fromPtr__​(long addr)

    - #### getBlockSize

          public int getBlockSize()

    - #### getDisp12MaxDiff

          public int getDisp12MaxDiff()

    - #### getMinDisparity

          public int getMinDisparity()

    - #### getNumDisparities

          public int getNumDisparities()

    - #### getSpeckleRange

          public int getSpeckleRange()

    - #### getSpeckleWindowSize

          public int getSpeckleWindowSize()

    - #### compute

          public void compute​(Mat left,
                              Mat right,
                              Mat disparity)

      Computes disparity map for the specified stereo pair
      Parameters:
        `left` - Left 8-bit single-channel image.
        `right` - Right image of the same size and the same type as the left one.
        `disparity` - Output disparity map. It has the same size as the input images. Some algorithms, like StereoBM or StereoSGBM compute 16-bit fixed-point disparity map (where each disparity value has 4 fractional bits), whereas other algorithms output 32-bit floating-point disparity map.

    - #### setBlockSize

          public void setBlockSize​(int blockSize)

    - #### setDisp12MaxDiff

          public void setDisp12MaxDiff​(int disp12MaxDiff)

    - #### setMinDisparity

          public void setMinDisparity​(int minDisparity)

    - #### setNumDisparities

          public void setNumDisparities​(int numDisparities)

    - #### setSpeckleRange

          public void setSpeckleRange​(int speckleRange)

    - #### setSpeckleWindowSize

          public void setSpeckleWindowSize​(int speckleWindowSize)

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

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