Package org.opencv.calib3d

## Class StereoBM

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

-     public class StereoBM
      extends StereoMatcher

  Class for computing stereo correspondence using the block matching algorithm, introduced and contributed to OpenCV by K. Konolige.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `PREFILTER_NORMALIZED_RESPONSE` |
    `static int` | `PREFILTER_XSOBEL` |

    - ### Fields inherited from class org.opencv.calib3d.StereoMatcher

      `DISP_SCALE, DISP_SHIFT`

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

      `nativeObj`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static StereoBM` | `__fromPtr__​(long addr)` |
    `static StereoBM` | `create()` | Creates StereoBM object disparity from 0 (default minimum disparity) to numDisparities.
    `static StereoBM` | `create​(int numDisparities)` | Creates StereoBM object
    `static StereoBM` | `create​(int numDisparities, int blockSize)` | Creates StereoBM object
    `protected void` | `finalize()` |
    `int` | `getPreFilterCap()` |
    `int` | `getPreFilterSize()` |
    `int` | `getPreFilterType()` |
    `Rect` | `getROI1()` |
    `Rect` | `getROI2()` |
    `int` | `getSmallerBlockSize()` |
    `int` | `getTextureThreshold()` |
    `int` | `getUniquenessRatio()` |
    `void` | `setPreFilterCap​(int preFilterCap)` |
    `void` | `setPreFilterSize​(int preFilterSize)` |
    `void` | `setPreFilterType​(int preFilterType)` |
    `void` | `setROI1​(Rect roi1)` |
    `void` | `setROI2​(Rect roi2)` |
    `void` | `setSmallerBlockSize​(int blockSize)` |
    `void` | `setTextureThreshold​(int textureThreshold)` |
    `void` | `setUniquenessRatio​(int uniquenessRatio)` |

    - ### Methods inherited from class org.opencv.calib3d.StereoMatcher

      `compute, getBlockSize, getDisp12MaxDiff, getMinDisparity, getNumDisparities, getSpeckleRange, getSpeckleWindowSize, setBlockSize, setDisp12MaxDiff, setMinDisparity, setNumDisparities, setSpeckleRange, setSpeckleWindowSize`

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

    - #### PREFILTER_NORMALIZED_RESPONSE

          public static final int PREFILTER_NORMALIZED_RESPONSE

      See Also:
        Constant Field Values

    - #### PREFILTER_XSOBEL

          public static final int PREFILTER_XSOBEL

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StereoBM

          protected StereoBM​(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static StereoBM __fromPtr__​(long addr)

    - #### create

          public static StereoBM create​(int numDisparities,
                                        int blockSize)

      Creates StereoBM object
      Parameters:
        `numDisparities` - the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity.
        `blockSize` - the linear size of the blocks compared by the algorithm. The size should be odd (as the block is centered at the current pixel). Larger block size implies smoother, though less accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher chance for algorithm to find a wrong correspondence. The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for a specific stereo pair.
      Returns:
        automatically generated

    - #### create

          public static StereoBM create​(int numDisparities)

      Creates StereoBM object
      Parameters:
        `numDisparities` - the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity. (as the block is centered at the current pixel). Larger block size implies smoother, though less accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher chance for algorithm to find a wrong correspondence. The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for a specific stereo pair.
      Returns:
        automatically generated

    - #### create

          public static StereoBM create()

      Creates StereoBM object disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity. (as the block is centered at the current pixel). Larger block size implies smoother, though less accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher chance for algorithm to find a wrong correspondence. The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for a specific stereo pair.
      Returns:
        automatically generated

    - #### getROI1

          public Rect getROI1()

    - #### getROI2

          public Rect getROI2()

    - #### getPreFilterCap

          public int getPreFilterCap()

    - #### getPreFilterSize

          public int getPreFilterSize()

    - #### getPreFilterType

          public int getPreFilterType()

    - #### getSmallerBlockSize

          public int getSmallerBlockSize()

    - #### getTextureThreshold

          public int getTextureThreshold()

    - #### getUniquenessRatio

          public int getUniquenessRatio()

    - #### setPreFilterCap

          public void setPreFilterCap​(int preFilterCap)

    - #### setPreFilterSize

          public void setPreFilterSize​(int preFilterSize)

    - #### setPreFilterType

          public void setPreFilterType​(int preFilterType)

    - #### setROI1

          public void setROI1​(Rect roi1)

    - #### setROI2

          public void setROI2​(Rect roi2)

    - #### setSmallerBlockSize

          public void setSmallerBlockSize​(int blockSize)

    - #### setTextureThreshold

          public void setTextureThreshold​(int textureThreshold)

    - #### setUniquenessRatio

          public void setUniquenessRatio​(int uniquenessRatio)

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

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