001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.video;
005
006import org.opencv.core.Mat;
007import org.opencv.video.DenseOpticalFlow;
008import org.opencv.video.VariationalRefinement;
009
010// C++: class VariationalRefinement
011/**
012 * Variational optical flow refinement
013 *
014 * This class implements variational refinement of the input flow field, i.e.
015 * it uses input flow to initialize the minimization of the following functional:
016 * \(E(U) = \int_{\Omega} \delta \Psi(E_I) + \gamma \Psi(E_G) + \alpha \Psi(E_S) \),
017 * where \(E_I,E_G,E_S\) are color constancy, gradient constancy and smoothness terms
018 * respectively. \(\Psi(s^2)=\sqrt{s^2+\epsilon^2}\) is a robust penalizer to limit the
019 * influence of outliers. A complete formulation and a description of the minimization
020 * procedure can be found in CITE: Brox2004
021 */
022public class VariationalRefinement extends DenseOpticalFlow {
023
024    protected VariationalRefinement(long addr) { super(addr); }
025
026    // internal usage only
027    public static VariationalRefinement __fromPtr__(long addr) { return new VariationalRefinement(addr); }
028
029    //
030    // C++:  void cv::VariationalRefinement::calcUV(Mat I0, Mat I1, Mat& flow_u, Mat& flow_v)
031    //
032
033    /**
034     * REF: calc function overload to handle separate horizontal (u) and vertical (v) flow components
035     * (to avoid extra splits/merges)
036     * @param I0 automatically generated
037     * @param I1 automatically generated
038     * @param flow_u automatically generated
039     * @param flow_v automatically generated
040     */
041    public void calcUV(Mat I0, Mat I1, Mat flow_u, Mat flow_v) {
042        calcUV_0(nativeObj, I0.nativeObj, I1.nativeObj, flow_u.nativeObj, flow_v.nativeObj);
043    }
044
045
046    //
047    // C++:  int cv::VariationalRefinement::getFixedPointIterations()
048    //
049
050    /**
051     * Number of outer (fixed-point) iterations in the minimization procedure.
052     * SEE: setFixedPointIterations
053     * @return automatically generated
054     */
055    public int getFixedPointIterations() {
056        return getFixedPointIterations_0(nativeObj);
057    }
058
059
060    //
061    // C++:  void cv::VariationalRefinement::setFixedPointIterations(int val)
062    //
063
064    /**
065     *  getFixedPointIterations SEE: getFixedPointIterations
066     * @param val automatically generated
067     */
068    public void setFixedPointIterations(int val) {
069        setFixedPointIterations_0(nativeObj, val);
070    }
071
072
073    //
074    // C++:  int cv::VariationalRefinement::getSorIterations()
075    //
076
077    /**
078     * Number of inner successive over-relaxation (SOR) iterations
079     *         in the minimization procedure to solve the respective linear system.
080     * SEE: setSorIterations
081     * @return automatically generated
082     */
083    public int getSorIterations() {
084        return getSorIterations_0(nativeObj);
085    }
086
087
088    //
089    // C++:  void cv::VariationalRefinement::setSorIterations(int val)
090    //
091
092    /**
093     *  getSorIterations SEE: getSorIterations
094     * @param val automatically generated
095     */
096    public void setSorIterations(int val) {
097        setSorIterations_0(nativeObj, val);
098    }
099
100
101    //
102    // C++:  float cv::VariationalRefinement::getOmega()
103    //
104
105    /**
106     * Relaxation factor in SOR
107     * SEE: setOmega
108     * @return automatically generated
109     */
110    public float getOmega() {
111        return getOmega_0(nativeObj);
112    }
113
114
115    //
116    // C++:  void cv::VariationalRefinement::setOmega(float val)
117    //
118
119    /**
120     *  getOmega SEE: getOmega
121     * @param val automatically generated
122     */
123    public void setOmega(float val) {
124        setOmega_0(nativeObj, val);
125    }
126
127
128    //
129    // C++:  float cv::VariationalRefinement::getAlpha()
130    //
131
132    /**
133     * Weight of the smoothness term
134     * SEE: setAlpha
135     * @return automatically generated
136     */
137    public float getAlpha() {
138        return getAlpha_0(nativeObj);
139    }
140
141
142    //
143    // C++:  void cv::VariationalRefinement::setAlpha(float val)
144    //
145
146    /**
147     *  getAlpha SEE: getAlpha
148     * @param val automatically generated
149     */
150    public void setAlpha(float val) {
151        setAlpha_0(nativeObj, val);
152    }
153
154
155    //
156    // C++:  float cv::VariationalRefinement::getDelta()
157    //
158
159    /**
160     * Weight of the color constancy term
161     * SEE: setDelta
162     * @return automatically generated
163     */
164    public float getDelta() {
165        return getDelta_0(nativeObj);
166    }
167
168
169    //
170    // C++:  void cv::VariationalRefinement::setDelta(float val)
171    //
172
173    /**
174     *  getDelta SEE: getDelta
175     * @param val automatically generated
176     */
177    public void setDelta(float val) {
178        setDelta_0(nativeObj, val);
179    }
180
181
182    //
183    // C++:  float cv::VariationalRefinement::getGamma()
184    //
185
186    /**
187     * Weight of the gradient constancy term
188     * SEE: setGamma
189     * @return automatically generated
190     */
191    public float getGamma() {
192        return getGamma_0(nativeObj);
193    }
194
195
196    //
197    // C++:  void cv::VariationalRefinement::setGamma(float val)
198    //
199
200    /**
201     *  getGamma SEE: getGamma
202     * @param val automatically generated
203     */
204    public void setGamma(float val) {
205        setGamma_0(nativeObj, val);
206    }
207
208
209    //
210    // C++: static Ptr_VariationalRefinement cv::VariationalRefinement::create()
211    //
212
213    /**
214     * Creates an instance of VariationalRefinement
215     * @return automatically generated
216     */
217    public static VariationalRefinement create() {
218        return VariationalRefinement.__fromPtr__(create_0());
219    }
220
221
222    @Override
223    protected void finalize() throws Throwable {
224        delete(nativeObj);
225    }
226
227
228
229    // C++:  void cv::VariationalRefinement::calcUV(Mat I0, Mat I1, Mat& flow_u, Mat& flow_v)
230    private static native void calcUV_0(long nativeObj, long I0_nativeObj, long I1_nativeObj, long flow_u_nativeObj, long flow_v_nativeObj);
231
232    // C++:  int cv::VariationalRefinement::getFixedPointIterations()
233    private static native int getFixedPointIterations_0(long nativeObj);
234
235    // C++:  void cv::VariationalRefinement::setFixedPointIterations(int val)
236    private static native void setFixedPointIterations_0(long nativeObj, int val);
237
238    // C++:  int cv::VariationalRefinement::getSorIterations()
239    private static native int getSorIterations_0(long nativeObj);
240
241    // C++:  void cv::VariationalRefinement::setSorIterations(int val)
242    private static native void setSorIterations_0(long nativeObj, int val);
243
244    // C++:  float cv::VariationalRefinement::getOmega()
245    private static native float getOmega_0(long nativeObj);
246
247    // C++:  void cv::VariationalRefinement::setOmega(float val)
248    private static native void setOmega_0(long nativeObj, float val);
249
250    // C++:  float cv::VariationalRefinement::getAlpha()
251    private static native float getAlpha_0(long nativeObj);
252
253    // C++:  void cv::VariationalRefinement::setAlpha(float val)
254    private static native void setAlpha_0(long nativeObj, float val);
255
256    // C++:  float cv::VariationalRefinement::getDelta()
257    private static native float getDelta_0(long nativeObj);
258
259    // C++:  void cv::VariationalRefinement::setDelta(float val)
260    private static native void setDelta_0(long nativeObj, float val);
261
262    // C++:  float cv::VariationalRefinement::getGamma()
263    private static native float getGamma_0(long nativeObj);
264
265    // C++:  void cv::VariationalRefinement::setGamma(float val)
266    private static native void setGamma_0(long nativeObj, float val);
267
268    // C++: static Ptr_VariationalRefinement cv::VariationalRefinement::create()
269    private static native long create_0();
270
271    // native support for java finalize()
272    private static native void delete(long nativeObj);
273
274}