001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.calib3d;
005
006import org.opencv.core.Algorithm;
007import org.opencv.core.Mat;
008
009// C++: class StereoMatcher
010/**
011 * The base class for stereo correspondence algorithms.
012 */
013public class StereoMatcher extends Algorithm {
014
015    protected StereoMatcher(long addr) { super(addr); }
016
017    // internal usage only
018    public static StereoMatcher __fromPtr__(long addr) { return new StereoMatcher(addr); }
019
020    // C++: enum <unnamed>
021    public static final int
022            DISP_SHIFT = 4,
023            DISP_SCALE = (1 << DISP_SHIFT);
024
025
026    //
027    // C++:  void cv::StereoMatcher::compute(Mat left, Mat right, Mat& disparity)
028    //
029
030    /**
031     * Computes disparity map for the specified stereo pair
032     *
033     *     @param left Left 8-bit single-channel image.
034     *     @param right Right image of the same size and the same type as the left one.
035     *     @param disparity Output disparity map. It has the same size as the input images. Some algorithms,
036     *     like StereoBM or StereoSGBM compute 16-bit fixed-point disparity map (where each disparity value
037     *     has 4 fractional bits), whereas other algorithms output 32-bit floating-point disparity map.
038     */
039    public void compute(Mat left, Mat right, Mat disparity) {
040        compute_0(nativeObj, left.nativeObj, right.nativeObj, disparity.nativeObj);
041    }
042
043
044    //
045    // C++:  int cv::StereoMatcher::getMinDisparity()
046    //
047
048    public int getMinDisparity() {
049        return getMinDisparity_0(nativeObj);
050    }
051
052
053    //
054    // C++:  void cv::StereoMatcher::setMinDisparity(int minDisparity)
055    //
056
057    public void setMinDisparity(int minDisparity) {
058        setMinDisparity_0(nativeObj, minDisparity);
059    }
060
061
062    //
063    // C++:  int cv::StereoMatcher::getNumDisparities()
064    //
065
066    public int getNumDisparities() {
067        return getNumDisparities_0(nativeObj);
068    }
069
070
071    //
072    // C++:  void cv::StereoMatcher::setNumDisparities(int numDisparities)
073    //
074
075    public void setNumDisparities(int numDisparities) {
076        setNumDisparities_0(nativeObj, numDisparities);
077    }
078
079
080    //
081    // C++:  int cv::StereoMatcher::getBlockSize()
082    //
083
084    public int getBlockSize() {
085        return getBlockSize_0(nativeObj);
086    }
087
088
089    //
090    // C++:  void cv::StereoMatcher::setBlockSize(int blockSize)
091    //
092
093    public void setBlockSize(int blockSize) {
094        setBlockSize_0(nativeObj, blockSize);
095    }
096
097
098    //
099    // C++:  int cv::StereoMatcher::getSpeckleWindowSize()
100    //
101
102    public int getSpeckleWindowSize() {
103        return getSpeckleWindowSize_0(nativeObj);
104    }
105
106
107    //
108    // C++:  void cv::StereoMatcher::setSpeckleWindowSize(int speckleWindowSize)
109    //
110
111    public void setSpeckleWindowSize(int speckleWindowSize) {
112        setSpeckleWindowSize_0(nativeObj, speckleWindowSize);
113    }
114
115
116    //
117    // C++:  int cv::StereoMatcher::getSpeckleRange()
118    //
119
120    public int getSpeckleRange() {
121        return getSpeckleRange_0(nativeObj);
122    }
123
124
125    //
126    // C++:  void cv::StereoMatcher::setSpeckleRange(int speckleRange)
127    //
128
129    public void setSpeckleRange(int speckleRange) {
130        setSpeckleRange_0(nativeObj, speckleRange);
131    }
132
133
134    //
135    // C++:  int cv::StereoMatcher::getDisp12MaxDiff()
136    //
137
138    public int getDisp12MaxDiff() {
139        return getDisp12MaxDiff_0(nativeObj);
140    }
141
142
143    //
144    // C++:  void cv::StereoMatcher::setDisp12MaxDiff(int disp12MaxDiff)
145    //
146
147    public void setDisp12MaxDiff(int disp12MaxDiff) {
148        setDisp12MaxDiff_0(nativeObj, disp12MaxDiff);
149    }
150
151
152    @Override
153    protected void finalize() throws Throwable {
154        delete(nativeObj);
155    }
156
157
158
159    // C++:  void cv::StereoMatcher::compute(Mat left, Mat right, Mat& disparity)
160    private static native void compute_0(long nativeObj, long left_nativeObj, long right_nativeObj, long disparity_nativeObj);
161
162    // C++:  int cv::StereoMatcher::getMinDisparity()
163    private static native int getMinDisparity_0(long nativeObj);
164
165    // C++:  void cv::StereoMatcher::setMinDisparity(int minDisparity)
166    private static native void setMinDisparity_0(long nativeObj, int minDisparity);
167
168    // C++:  int cv::StereoMatcher::getNumDisparities()
169    private static native int getNumDisparities_0(long nativeObj);
170
171    // C++:  void cv::StereoMatcher::setNumDisparities(int numDisparities)
172    private static native void setNumDisparities_0(long nativeObj, int numDisparities);
173
174    // C++:  int cv::StereoMatcher::getBlockSize()
175    private static native int getBlockSize_0(long nativeObj);
176
177    // C++:  void cv::StereoMatcher::setBlockSize(int blockSize)
178    private static native void setBlockSize_0(long nativeObj, int blockSize);
179
180    // C++:  int cv::StereoMatcher::getSpeckleWindowSize()
181    private static native int getSpeckleWindowSize_0(long nativeObj);
182
183    // C++:  void cv::StereoMatcher::setSpeckleWindowSize(int speckleWindowSize)
184    private static native void setSpeckleWindowSize_0(long nativeObj, int speckleWindowSize);
185
186    // C++:  int cv::StereoMatcher::getSpeckleRange()
187    private static native int getSpeckleRange_0(long nativeObj);
188
189    // C++:  void cv::StereoMatcher::setSpeckleRange(int speckleRange)
190    private static native void setSpeckleRange_0(long nativeObj, int speckleRange);
191
192    // C++:  int cv::StereoMatcher::getDisp12MaxDiff()
193    private static native int getDisp12MaxDiff_0(long nativeObj);
194
195    // C++:  void cv::StereoMatcher::setDisp12MaxDiff(int disp12MaxDiff)
196    private static native void setDisp12MaxDiff_0(long nativeObj, int disp12MaxDiff);
197
198    // native support for java finalize()
199    private static native void delete(long nativeObj);
200
201}