AlignMTB

Objective-C

@interface AlignMTB : AlignExposures

Swift

class AlignMTB : 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 .

Member of Photo

Methods

  • Calculates shift between two images, i. e. how to shift the second image to correspond it with the first.

    Declaration

    Objective-C

    - (nonnull Point2i *)calculateShift:(nonnull Mat *)img0
                                   img1:(nonnull Mat *)img1;

    Swift

    func calculateShift(img0: Mat, img1: Mat) -> Point2i

    Parameters

    img0

    first image

    img1

    second image

  • Declaration

    Objective-C

    - (BOOL)getCut NS_SWIFT_NAME(getCut());

    Swift

    func getCut() -> Bool
  • Declaration

    Objective-C

    - (int)getExcludeRange NS_SWIFT_NAME(getExcludeRange());

    Swift

    func getExcludeRange() -> Int32
  • Declaration

    Objective-C

    - (int)getMaxBits NS_SWIFT_NAME(getMaxBits());

    Swift

    func getMaxBits() -> Int32
  • Computes median threshold and exclude bitmaps of given image.

    Declaration

    Objective-C

    - (void)computeBitmaps:(nonnull Mat *)img
                        tb:(nonnull Mat *)tb
                        eb:(nonnull Mat *)eb;

    Swift

    func computeBitmaps(img: Mat, tb: Mat, eb: Mat)

    Parameters

    img

    input image

    tb

    median threshold bitmap

    eb

    exclude bitmap

  • Declaration

    Objective-C

    - (void)process:(nonnull NSArray<Mat *> *)src
                dst:(nonnull NSArray<Mat *> *)dst
              times:(nonnull Mat *)times
           response:(nonnull Mat *)response;

    Swift

    func process(src: [Mat], dst: [Mat], times: Mat, response: Mat)
  • Short version of process, that doesn’t take extra arguments.

    Declaration

    Objective-C

    - (void)process:(nonnull NSArray<Mat *> *)src dst:(nonnull NSArray<Mat *> *)dst;

    Swift

    func process(src: [Mat], dst: [Mat])

    Parameters

    src

    vector of input images

    dst

    vector of aligned images

  • Declaration

    Objective-C

    - (void)setCut:(BOOL)value NS_SWIFT_NAME(setCut(value:));

    Swift

    func setCut(value: Bool)
  • Declaration

    Objective-C

    - (void)setExcludeRange:(int)exclude_range NS_SWIFT_NAME(setExcludeRange(exclude_range:));

    Swift

    func setExcludeRange(exclude_range: Int32)
  • Declaration

    Objective-C

    - (void)setMaxBits:(int)max_bits NS_SWIFT_NAME(setMaxBits(max_bits:));

    Swift

    func setMaxBits(max_bits: Int32)
  • Helper function, that shift Mat filling new regions with zeros.

    Declaration

    Objective-C

    - (void)shiftMat:(nonnull Mat *)src
                 dst:(nonnull Mat *)dst
               shift:(nonnull Point2i *)shift;

    Swift

    func shiftMat(src: Mat, dst: Mat, shift: Point2i)

    Parameters

    src

    input image

    dst

    result image

    shift

    shift value