Package org.opencv.photo

## Class AlignMTB

- java.lang.Object
- - org.opencv.core.Algorithm
  - - org.opencv.photo.AlignExposures
    - - org.opencv.photo.AlignMTB

-     public class AlignMTB
      extends AlignExposures

  This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median luminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations. It is invariant to exposure, so exposure values and camera response are not necessary. In this implementation new image regions are filled with zeros. For more information see CITE: GW03 .

- - ### Field Summary

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

      `nativeObj`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static AlignMTB` | `__fromPtr__​(long addr)` |
    `Point` | `calculateShift​(Mat img0, Mat img1)` | Calculates shift between two images, i.
    `void` | `computeBitmaps​(Mat img, Mat tb, Mat eb)` | Computes median threshold and exclude bitmaps of given image.
    `protected void` | `finalize()` |
    `boolean` | `getCut()` |
    `int` | `getExcludeRange()` |
    `int` | `getMaxBits()` |
    `void` | `process​(java.util.List<Mat> src, java.util.List<Mat> dst)` | Short version of process, that doesn't take extra arguments.
    `void` | `process​(java.util.List<Mat> src, java.util.List<Mat> dst, Mat times, Mat response)` | Aligns images
    `void` | `setCut​(boolean value)` |
    `void` | `setExcludeRange​(int exclude_range)` |
    `void` | `setMaxBits​(int max_bits)` |
    `void` | `shiftMat​(Mat src, Mat dst, Point shift)` | Helper function, that shift Mat filling new regions with zeros.

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

    - #### AlignMTB

          protected AlignMTB​(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static AlignMTB __fromPtr__​(long addr)

    - #### calculateShift

          public Point calculateShift​(Mat img0,
                                      Mat img1)

      Calculates shift between two images, i. e. how to shift the second image to correspond it with the first.
      Parameters:
        `img0` - first image
        `img1` - second image
      Returns:
        automatically generated

    - #### getCut

          public boolean getCut()

    - #### getExcludeRange

          public int getExcludeRange()

    - #### getMaxBits

          public int getMaxBits()

    - #### computeBitmaps

          public void computeBitmaps​(Mat img,
                                     Mat tb,
                                     Mat eb)

      Computes median threshold and exclude bitmaps of given image.
      Parameters:
        `img` - input image
        `tb` - median threshold bitmap
        `eb` - exclude bitmap

    - #### process

          public void process​(java.util.List<Mat> src,
                              java.util.List<Mat> dst,
                              Mat times,
                              Mat response)

      Description copied from class: `AlignExposures`
      Aligns images
      Overrides:
        `process` in class `AlignExposures`
      Parameters:
        `src` - vector of input images
        `dst` - vector of aligned images
        `times` - vector of exposure time values for each image
        `response` - 256x1 matrix with inverse camera response function for each pixel value, it should have the same number of channels as images.

    - #### process

          public void process​(java.util.List<Mat> src,
                              java.util.List<Mat> dst)

      Short version of process, that doesn't take extra arguments.
      Parameters:
        `src` - vector of input images
        `dst` - vector of aligned images

    - #### setCut

          public void setCut​(boolean value)

    - #### setExcludeRange

          public void setExcludeRange​(int exclude_range)

    - #### setMaxBits

          public void setMaxBits​(int max_bits)

    - #### shiftMat

          public void shiftMat​(Mat src,
                               Mat dst,
                               Point shift)

      Helper function, that shift Mat filling new regions with zeros.
      Parameters:
        `src` - input image
        `dst` - result image
        `shift` - shift value

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

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