001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.calib3d;
005
006import org.opencv.calib3d.StereoBM;
007import org.opencv.calib3d.StereoMatcher;
008import org.opencv.core.Rect;
009
010// C++: class StereoBM
011/**
012 * Class for computing stereo correspondence using the block matching algorithm, introduced and
013 * contributed to OpenCV by K. Konolige.
014 */
015public class StereoBM extends StereoMatcher {
016
017    protected StereoBM(long addr) { super(addr); }
018
019    // internal usage only
020    public static StereoBM __fromPtr__(long addr) { return new StereoBM(addr); }
021
022    // C++: enum <unnamed>
023    public static final int
024            PREFILTER_NORMALIZED_RESPONSE = 0,
025            PREFILTER_XSOBEL = 1;
026
027
028    //
029    // C++:  int cv::StereoBM::getPreFilterType()
030    //
031
032    public int getPreFilterType() {
033        return getPreFilterType_0(nativeObj);
034    }
035
036
037    //
038    // C++:  void cv::StereoBM::setPreFilterType(int preFilterType)
039    //
040
041    public void setPreFilterType(int preFilterType) {
042        setPreFilterType_0(nativeObj, preFilterType);
043    }
044
045
046    //
047    // C++:  int cv::StereoBM::getPreFilterSize()
048    //
049
050    public int getPreFilterSize() {
051        return getPreFilterSize_0(nativeObj);
052    }
053
054
055    //
056    // C++:  void cv::StereoBM::setPreFilterSize(int preFilterSize)
057    //
058
059    public void setPreFilterSize(int preFilterSize) {
060        setPreFilterSize_0(nativeObj, preFilterSize);
061    }
062
063
064    //
065    // C++:  int cv::StereoBM::getPreFilterCap()
066    //
067
068    public int getPreFilterCap() {
069        return getPreFilterCap_0(nativeObj);
070    }
071
072
073    //
074    // C++:  void cv::StereoBM::setPreFilterCap(int preFilterCap)
075    //
076
077    public void setPreFilterCap(int preFilterCap) {
078        setPreFilterCap_0(nativeObj, preFilterCap);
079    }
080
081
082    //
083    // C++:  int cv::StereoBM::getTextureThreshold()
084    //
085
086    public int getTextureThreshold() {
087        return getTextureThreshold_0(nativeObj);
088    }
089
090
091    //
092    // C++:  void cv::StereoBM::setTextureThreshold(int textureThreshold)
093    //
094
095    public void setTextureThreshold(int textureThreshold) {
096        setTextureThreshold_0(nativeObj, textureThreshold);
097    }
098
099
100    //
101    // C++:  int cv::StereoBM::getUniquenessRatio()
102    //
103
104    public int getUniquenessRatio() {
105        return getUniquenessRatio_0(nativeObj);
106    }
107
108
109    //
110    // C++:  void cv::StereoBM::setUniquenessRatio(int uniquenessRatio)
111    //
112
113    public void setUniquenessRatio(int uniquenessRatio) {
114        setUniquenessRatio_0(nativeObj, uniquenessRatio);
115    }
116
117
118    //
119    // C++:  int cv::StereoBM::getSmallerBlockSize()
120    //
121
122    public int getSmallerBlockSize() {
123        return getSmallerBlockSize_0(nativeObj);
124    }
125
126
127    //
128    // C++:  void cv::StereoBM::setSmallerBlockSize(int blockSize)
129    //
130
131    public void setSmallerBlockSize(int blockSize) {
132        setSmallerBlockSize_0(nativeObj, blockSize);
133    }
134
135
136    //
137    // C++:  Rect cv::StereoBM::getROI1()
138    //
139
140    public Rect getROI1() {
141        return new Rect(getROI1_0(nativeObj));
142    }
143
144
145    //
146    // C++:  void cv::StereoBM::setROI1(Rect roi1)
147    //
148
149    public void setROI1(Rect roi1) {
150        setROI1_0(nativeObj, roi1.x, roi1.y, roi1.width, roi1.height);
151    }
152
153
154    //
155    // C++:  Rect cv::StereoBM::getROI2()
156    //
157
158    public Rect getROI2() {
159        return new Rect(getROI2_0(nativeObj));
160    }
161
162
163    //
164    // C++:  void cv::StereoBM::setROI2(Rect roi2)
165    //
166
167    public void setROI2(Rect roi2) {
168        setROI2_0(nativeObj, roi2.x, roi2.y, roi2.width, roi2.height);
169    }
170
171
172    //
173    // C++: static Ptr_StereoBM cv::StereoBM::create(int numDisparities = 0, int blockSize = 21)
174    //
175
176    /**
177     * Creates StereoBM object
178     *
179     *     @param numDisparities the disparity search range. For each pixel algorithm will find the best
180     *     disparity from 0 (default minimum disparity) to numDisparities. The search range can then be
181     *     shifted by changing the minimum disparity.
182     *     @param blockSize the linear size of the blocks compared by the algorithm. The size should be odd
183     *     (as the block is centered at the current pixel). Larger block size implies smoother, though less
184     *     accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher
185     *     chance for algorithm to find a wrong correspondence.
186     *
187     *     The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for
188     *     a specific stereo pair.
189     * @return automatically generated
190     */
191    public static StereoBM create(int numDisparities, int blockSize) {
192        return StereoBM.__fromPtr__(create_0(numDisparities, blockSize));
193    }
194
195    /**
196     * Creates StereoBM object
197     *
198     *     @param numDisparities the disparity search range. For each pixel algorithm will find the best
199     *     disparity from 0 (default minimum disparity) to numDisparities. The search range can then be
200     *     shifted by changing the minimum disparity.
201     *     (as the block is centered at the current pixel). Larger block size implies smoother, though less
202     *     accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher
203     *     chance for algorithm to find a wrong correspondence.
204     *
205     *     The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for
206     *     a specific stereo pair.
207     * @return automatically generated
208     */
209    public static StereoBM create(int numDisparities) {
210        return StereoBM.__fromPtr__(create_1(numDisparities));
211    }
212
213    /**
214     * Creates StereoBM object
215     *
216     *     disparity from 0 (default minimum disparity) to numDisparities. The search range can then be
217     *     shifted by changing the minimum disparity.
218     *     (as the block is centered at the current pixel). Larger block size implies smoother, though less
219     *     accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher
220     *     chance for algorithm to find a wrong correspondence.
221     *
222     *     The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for
223     *     a specific stereo pair.
224     * @return automatically generated
225     */
226    public static StereoBM create() {
227        return StereoBM.__fromPtr__(create_2());
228    }
229
230
231    @Override
232    protected void finalize() throws Throwable {
233        delete(nativeObj);
234    }
235
236
237
238    // C++:  int cv::StereoBM::getPreFilterType()
239    private static native int getPreFilterType_0(long nativeObj);
240
241    // C++:  void cv::StereoBM::setPreFilterType(int preFilterType)
242    private static native void setPreFilterType_0(long nativeObj, int preFilterType);
243
244    // C++:  int cv::StereoBM::getPreFilterSize()
245    private static native int getPreFilterSize_0(long nativeObj);
246
247    // C++:  void cv::StereoBM::setPreFilterSize(int preFilterSize)
248    private static native void setPreFilterSize_0(long nativeObj, int preFilterSize);
249
250    // C++:  int cv::StereoBM::getPreFilterCap()
251    private static native int getPreFilterCap_0(long nativeObj);
252
253    // C++:  void cv::StereoBM::setPreFilterCap(int preFilterCap)
254    private static native void setPreFilterCap_0(long nativeObj, int preFilterCap);
255
256    // C++:  int cv::StereoBM::getTextureThreshold()
257    private static native int getTextureThreshold_0(long nativeObj);
258
259    // C++:  void cv::StereoBM::setTextureThreshold(int textureThreshold)
260    private static native void setTextureThreshold_0(long nativeObj, int textureThreshold);
261
262    // C++:  int cv::StereoBM::getUniquenessRatio()
263    private static native int getUniquenessRatio_0(long nativeObj);
264
265    // C++:  void cv::StereoBM::setUniquenessRatio(int uniquenessRatio)
266    private static native void setUniquenessRatio_0(long nativeObj, int uniquenessRatio);
267
268    // C++:  int cv::StereoBM::getSmallerBlockSize()
269    private static native int getSmallerBlockSize_0(long nativeObj);
270
271    // C++:  void cv::StereoBM::setSmallerBlockSize(int blockSize)
272    private static native void setSmallerBlockSize_0(long nativeObj, int blockSize);
273
274    // C++:  Rect cv::StereoBM::getROI1()
275    private static native double[] getROI1_0(long nativeObj);
276
277    // C++:  void cv::StereoBM::setROI1(Rect roi1)
278    private static native void setROI1_0(long nativeObj, int roi1_x, int roi1_y, int roi1_width, int roi1_height);
279
280    // C++:  Rect cv::StereoBM::getROI2()
281    private static native double[] getROI2_0(long nativeObj);
282
283    // C++:  void cv::StereoBM::setROI2(Rect roi2)
284    private static native void setROI2_0(long nativeObj, int roi2_x, int roi2_y, int roi2_width, int roi2_height);
285
286    // C++: static Ptr_StereoBM cv::StereoBM::create(int numDisparities = 0, int blockSize = 21)
287    private static native long create_0(int numDisparities, int blockSize);
288    private static native long create_1(int numDisparities);
289    private static native long create_2();
290
291    // native support for java finalize()
292    private static native void delete(long nativeObj);
293
294}