001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.photo;
005
006import java.util.ArrayList;
007import java.util.List;
008import org.opencv.core.Mat;
009import org.opencv.core.Point;
010import org.opencv.photo.AlignExposures;
011import org.opencv.utils.Converters;
012
013// C++: class AlignMTB
014/**
015 * This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median
016 * luminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations.
017 *
018 * It is invariant to exposure, so exposure values and camera response are not necessary.
019 *
020 * In this implementation new image regions are filled with zeros.
021 *
022 * For more information see CITE: GW03 .
023 */
024public class AlignMTB extends AlignExposures {
025
026    protected AlignMTB(long addr) { super(addr); }
027
028    // internal usage only
029    public static AlignMTB __fromPtr__(long addr) { return new AlignMTB(addr); }
030
031    //
032    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
033    //
034
035    public void process(List<Mat> src, List<Mat> dst, Mat times, Mat response) {
036        Mat src_mat = Converters.vector_Mat_to_Mat(src);
037        Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
038        process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj);
039    }
040
041
042    //
043    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst)
044    //
045
046    /**
047     * Short version of process, that doesn't take extra arguments.
048     *
049     *     @param src vector of input images
050     *     @param dst vector of aligned images
051     */
052    public void process(List<Mat> src, List<Mat> dst) {
053        Mat src_mat = Converters.vector_Mat_to_Mat(src);
054        Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
055        process_1(nativeObj, src_mat.nativeObj, dst_mat.nativeObj);
056    }
057
058
059    //
060    // C++:  Point cv::AlignMTB::calculateShift(Mat img0, Mat img1)
061    //
062
063    /**
064     * Calculates shift between two images, i. e. how to shift the second image to correspond it with the
065     *     first.
066     *
067     *     @param img0 first image
068     *     @param img1 second image
069     * @return automatically generated
070     */
071    public Point calculateShift(Mat img0, Mat img1) {
072        return new Point(calculateShift_0(nativeObj, img0.nativeObj, img1.nativeObj));
073    }
074
075
076    //
077    // C++:  void cv::AlignMTB::shiftMat(Mat src, Mat& dst, Point shift)
078    //
079
080    /**
081     * Helper function, that shift Mat filling new regions with zeros.
082     *
083     *     @param src input image
084     *     @param dst result image
085     *     @param shift shift value
086     */
087    public void shiftMat(Mat src, Mat dst, Point shift) {
088        shiftMat_0(nativeObj, src.nativeObj, dst.nativeObj, shift.x, shift.y);
089    }
090
091
092    //
093    // C++:  void cv::AlignMTB::computeBitmaps(Mat img, Mat& tb, Mat& eb)
094    //
095
096    /**
097     * Computes median threshold and exclude bitmaps of given image.
098     *
099     *     @param img input image
100     *     @param tb median threshold bitmap
101     *     @param eb exclude bitmap
102     */
103    public void computeBitmaps(Mat img, Mat tb, Mat eb) {
104        computeBitmaps_0(nativeObj, img.nativeObj, tb.nativeObj, eb.nativeObj);
105    }
106
107
108    //
109    // C++:  int cv::AlignMTB::getMaxBits()
110    //
111
112    public int getMaxBits() {
113        return getMaxBits_0(nativeObj);
114    }
115
116
117    //
118    // C++:  void cv::AlignMTB::setMaxBits(int max_bits)
119    //
120
121    public void setMaxBits(int max_bits) {
122        setMaxBits_0(nativeObj, max_bits);
123    }
124
125
126    //
127    // C++:  int cv::AlignMTB::getExcludeRange()
128    //
129
130    public int getExcludeRange() {
131        return getExcludeRange_0(nativeObj);
132    }
133
134
135    //
136    // C++:  void cv::AlignMTB::setExcludeRange(int exclude_range)
137    //
138
139    public void setExcludeRange(int exclude_range) {
140        setExcludeRange_0(nativeObj, exclude_range);
141    }
142
143
144    //
145    // C++:  bool cv::AlignMTB::getCut()
146    //
147
148    public boolean getCut() {
149        return getCut_0(nativeObj);
150    }
151
152
153    //
154    // C++:  void cv::AlignMTB::setCut(bool value)
155    //
156
157    public void setCut(boolean value) {
158        setCut_0(nativeObj, value);
159    }
160
161
162    @Override
163    protected void finalize() throws Throwable {
164        delete(nativeObj);
165    }
166
167
168
169    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
170    private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj, long times_nativeObj, long response_nativeObj);
171
172    // C++:  void cv::AlignMTB::process(vector_Mat src, vector_Mat dst)
173    private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj);
174
175    // C++:  Point cv::AlignMTB::calculateShift(Mat img0, Mat img1)
176    private static native double[] calculateShift_0(long nativeObj, long img0_nativeObj, long img1_nativeObj);
177
178    // C++:  void cv::AlignMTB::shiftMat(Mat src, Mat& dst, Point shift)
179    private static native void shiftMat_0(long nativeObj, long src_nativeObj, long dst_nativeObj, double shift_x, double shift_y);
180
181    // C++:  void cv::AlignMTB::computeBitmaps(Mat img, Mat& tb, Mat& eb)
182    private static native void computeBitmaps_0(long nativeObj, long img_nativeObj, long tb_nativeObj, long eb_nativeObj);
183
184    // C++:  int cv::AlignMTB::getMaxBits()
185    private static native int getMaxBits_0(long nativeObj);
186
187    // C++:  void cv::AlignMTB::setMaxBits(int max_bits)
188    private static native void setMaxBits_0(long nativeObj, int max_bits);
189
190    // C++:  int cv::AlignMTB::getExcludeRange()
191    private static native int getExcludeRange_0(long nativeObj);
192
193    // C++:  void cv::AlignMTB::setExcludeRange(int exclude_range)
194    private static native void setExcludeRange_0(long nativeObj, int exclude_range);
195
196    // C++:  bool cv::AlignMTB::getCut()
197    private static native boolean getCut_0(long nativeObj);
198
199    // C++:  void cv::AlignMTB::setCut(bool value)
200    private static native void setCut_0(long nativeObj, boolean value);
201
202    // native support for java finalize()
203    private static native void delete(long nativeObj);
204
205}