001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.features2d;
005
006import org.opencv.features2d.Feature2D;
007import org.opencv.features2d.SIFT;
008
009// C++: class SIFT
010/**
011 * Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform
012 * (SIFT) algorithm by D. Lowe CITE: Lowe04 .
013 */
014public class SIFT extends Feature2D {
015
016    protected SIFT(long addr) { super(addr); }
017
018    // internal usage only
019    public static SIFT __fromPtr__(long addr) { return new SIFT(addr); }
020
021    //
022    // C++: static Ptr_SIFT cv::SIFT::create(int nfeatures = 0, int nOctaveLayers = 3, double contrastThreshold = 0.04, double edgeThreshold = 10, double sigma = 1.6, bool enable_precise_upscale = false)
023    //
024
025    /**
026     * @param nfeatures The number of best features to retain. The features are ranked by their scores
027     *     (measured in SIFT algorithm as the local contrast)
028     *
029     *     @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
030     *     number of octaves is computed automatically from the image resolution.
031     *
032     *     @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform
033     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
034     *
035     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
036     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
037     *     this argument to 0.09.
038     *
039     *     @param edgeThreshold The threshold used to filter out edge-like features. Note that the its meaning
040     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
041     *     filtered out (more features are retained).
042     *
043     *     @param sigma The sigma of the Gaussian applied to the input image at the octave \#0. If your image
044     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
045     *
046     *     @param enable_precise_upscale Whether to enable precise upscaling in the scale pyramid, which maps
047     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
048     *     is disabled by default.
049     * @return automatically generated
050     */
051    public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, boolean enable_precise_upscale) {
052        return SIFT.__fromPtr__(create_0(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, enable_precise_upscale));
053    }
054
055    /**
056     * @param nfeatures The number of best features to retain. The features are ranked by their scores
057     *     (measured in SIFT algorithm as the local contrast)
058     *
059     *     @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
060     *     number of octaves is computed automatically from the image resolution.
061     *
062     *     @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform
063     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
064     *
065     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
066     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
067     *     this argument to 0.09.
068     *
069     *     @param edgeThreshold The threshold used to filter out edge-like features. Note that the its meaning
070     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
071     *     filtered out (more features are retained).
072     *
073     *     @param sigma The sigma of the Gaussian applied to the input image at the octave \#0. If your image
074     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
075     *
076     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
077     *     is disabled by default.
078     * @return automatically generated
079     */
080    public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma) {
081        return SIFT.__fromPtr__(create_1(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma));
082    }
083
084    /**
085     * @param nfeatures The number of best features to retain. The features are ranked by their scores
086     *     (measured in SIFT algorithm as the local contrast)
087     *
088     *     @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
089     *     number of octaves is computed automatically from the image resolution.
090     *
091     *     @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform
092     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
093     *
094     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
095     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
096     *     this argument to 0.09.
097     *
098     *     @param edgeThreshold The threshold used to filter out edge-like features. Note that the its meaning
099     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
100     *     filtered out (more features are retained).
101     *
102     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
103     *
104     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
105     *     is disabled by default.
106     * @return automatically generated
107     */
108    public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold) {
109        return SIFT.__fromPtr__(create_2(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold));
110    }
111
112    /**
113     * @param nfeatures The number of best features to retain. The features are ranked by their scores
114     *     (measured in SIFT algorithm as the local contrast)
115     *
116     *     @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
117     *     number of octaves is computed automatically from the image resolution.
118     *
119     *     @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform
120     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
121     *
122     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
123     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
124     *     this argument to 0.09.
125     *
126     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
127     *     filtered out (more features are retained).
128     *
129     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
130     *
131     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
132     *     is disabled by default.
133     * @return automatically generated
134     */
135    public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold) {
136        return SIFT.__fromPtr__(create_3(nfeatures, nOctaveLayers, contrastThreshold));
137    }
138
139    /**
140     * @param nfeatures The number of best features to retain. The features are ranked by their scores
141     *     (measured in SIFT algorithm as the local contrast)
142     *
143     *     @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
144     *     number of octaves is computed automatically from the image resolution.
145     *
146     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
147     *
148     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
149     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
150     *     this argument to 0.09.
151     *
152     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
153     *     filtered out (more features are retained).
154     *
155     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
156     *
157     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
158     *     is disabled by default.
159     * @return automatically generated
160     */
161    public static SIFT create(int nfeatures, int nOctaveLayers) {
162        return SIFT.__fromPtr__(create_4(nfeatures, nOctaveLayers));
163    }
164
165    /**
166     * @param nfeatures The number of best features to retain. The features are ranked by their scores
167     *     (measured in SIFT algorithm as the local contrast)
168     *
169     *     number of octaves is computed automatically from the image resolution.
170     *
171     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
172     *
173     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
174     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
175     *     this argument to 0.09.
176     *
177     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
178     *     filtered out (more features are retained).
179     *
180     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
181     *
182     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
183     *     is disabled by default.
184     * @return automatically generated
185     */
186    public static SIFT create(int nfeatures) {
187        return SIFT.__fromPtr__(create_5(nfeatures));
188    }
189
190    /**
191     *     (measured in SIFT algorithm as the local contrast)
192     *
193     *     number of octaves is computed automatically from the image resolution.
194     *
195     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
196     *
197     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
198     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
199     *     this argument to 0.09.
200     *
201     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
202     *     filtered out (more features are retained).
203     *
204     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
205     *
206     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
207     *     is disabled by default.
208     * @return automatically generated
209     */
210    public static SIFT create() {
211        return SIFT.__fromPtr__(create_6());
212    }
213
214
215    //
216    // C++: static Ptr_SIFT cv::SIFT::create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType, bool enable_precise_upscale = false)
217    //
218
219    /**
220     * Create SIFT with specified descriptorType.
221     *     @param nfeatures The number of best features to retain. The features are ranked by their scores
222     *     (measured in SIFT algorithm as the local contrast)
223     *
224     *     @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
225     *     number of octaves is computed automatically from the image resolution.
226     *
227     *     @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform
228     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
229     *
230     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
231     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
232     *     this argument to 0.09.
233     *
234     *     @param edgeThreshold The threshold used to filter out edge-like features. Note that the its meaning
235     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
236     *     filtered out (more features are retained).
237     *
238     *     @param sigma The sigma of the Gaussian applied to the input image at the octave \#0. If your image
239     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
240     *
241     *     @param descriptorType The type of descriptors. Only CV_32F and CV_8U are supported.
242     *
243     *     @param enable_precise_upscale Whether to enable precise upscaling in the scale pyramid, which maps
244     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
245     *     is disabled by default.
246     * @return automatically generated
247     */
248    public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType, boolean enable_precise_upscale) {
249        return SIFT.__fromPtr__(create_7(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, descriptorType, enable_precise_upscale));
250    }
251
252    /**
253     * Create SIFT with specified descriptorType.
254     *     @param nfeatures The number of best features to retain. The features are ranked by their scores
255     *     (measured in SIFT algorithm as the local contrast)
256     *
257     *     @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The
258     *     number of octaves is computed automatically from the image resolution.
259     *
260     *     @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform
261     *     (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
262     *
263     *     <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When
264     *     nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set
265     *     this argument to 0.09.
266     *
267     *     @param edgeThreshold The threshold used to filter out edge-like features. Note that the its meaning
268     *     is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are
269     *     filtered out (more features are retained).
270     *
271     *     @param sigma The sigma of the Gaussian applied to the input image at the octave \#0. If your image
272     *     is captured with a weak camera with soft lenses, you might want to reduce the number.
273     *
274     *     @param descriptorType The type of descriptors. Only CV_32F and CV_8U are supported.
275     *
276     *     index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option
277     *     is disabled by default.
278     * @return automatically generated
279     */
280    public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType) {
281        return SIFT.__fromPtr__(create_8(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, descriptorType));
282    }
283
284
285    //
286    // C++:  String cv::SIFT::getDefaultName()
287    //
288
289    public String getDefaultName() {
290        return getDefaultName_0(nativeObj);
291    }
292
293
294    //
295    // C++:  void cv::SIFT::setNFeatures(int maxFeatures)
296    //
297
298    public void setNFeatures(int maxFeatures) {
299        setNFeatures_0(nativeObj, maxFeatures);
300    }
301
302
303    //
304    // C++:  int cv::SIFT::getNFeatures()
305    //
306
307    public int getNFeatures() {
308        return getNFeatures_0(nativeObj);
309    }
310
311
312    //
313    // C++:  void cv::SIFT::setNOctaveLayers(int nOctaveLayers)
314    //
315
316    public void setNOctaveLayers(int nOctaveLayers) {
317        setNOctaveLayers_0(nativeObj, nOctaveLayers);
318    }
319
320
321    //
322    // C++:  int cv::SIFT::getNOctaveLayers()
323    //
324
325    public int getNOctaveLayers() {
326        return getNOctaveLayers_0(nativeObj);
327    }
328
329
330    //
331    // C++:  void cv::SIFT::setContrastThreshold(double contrastThreshold)
332    //
333
334    public void setContrastThreshold(double contrastThreshold) {
335        setContrastThreshold_0(nativeObj, contrastThreshold);
336    }
337
338
339    //
340    // C++:  double cv::SIFT::getContrastThreshold()
341    //
342
343    public double getContrastThreshold() {
344        return getContrastThreshold_0(nativeObj);
345    }
346
347
348    //
349    // C++:  void cv::SIFT::setEdgeThreshold(double edgeThreshold)
350    //
351
352    public void setEdgeThreshold(double edgeThreshold) {
353        setEdgeThreshold_0(nativeObj, edgeThreshold);
354    }
355
356
357    //
358    // C++:  double cv::SIFT::getEdgeThreshold()
359    //
360
361    public double getEdgeThreshold() {
362        return getEdgeThreshold_0(nativeObj);
363    }
364
365
366    //
367    // C++:  void cv::SIFT::setSigma(double sigma)
368    //
369
370    public void setSigma(double sigma) {
371        setSigma_0(nativeObj, sigma);
372    }
373
374
375    //
376    // C++:  double cv::SIFT::getSigma()
377    //
378
379    public double getSigma() {
380        return getSigma_0(nativeObj);
381    }
382
383
384    @Override
385    protected void finalize() throws Throwable {
386        delete(nativeObj);
387    }
388
389
390
391    // C++: static Ptr_SIFT cv::SIFT::create(int nfeatures = 0, int nOctaveLayers = 3, double contrastThreshold = 0.04, double edgeThreshold = 10, double sigma = 1.6, bool enable_precise_upscale = false)
392    private static native long create_0(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, boolean enable_precise_upscale);
393    private static native long create_1(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma);
394    private static native long create_2(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold);
395    private static native long create_3(int nfeatures, int nOctaveLayers, double contrastThreshold);
396    private static native long create_4(int nfeatures, int nOctaveLayers);
397    private static native long create_5(int nfeatures);
398    private static native long create_6();
399
400    // C++: static Ptr_SIFT cv::SIFT::create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType, bool enable_precise_upscale = false)
401    private static native long create_7(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType, boolean enable_precise_upscale);
402    private static native long create_8(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType);
403
404    // C++:  String cv::SIFT::getDefaultName()
405    private static native String getDefaultName_0(long nativeObj);
406
407    // C++:  void cv::SIFT::setNFeatures(int maxFeatures)
408    private static native void setNFeatures_0(long nativeObj, int maxFeatures);
409
410    // C++:  int cv::SIFT::getNFeatures()
411    private static native int getNFeatures_0(long nativeObj);
412
413    // C++:  void cv::SIFT::setNOctaveLayers(int nOctaveLayers)
414    private static native void setNOctaveLayers_0(long nativeObj, int nOctaveLayers);
415
416    // C++:  int cv::SIFT::getNOctaveLayers()
417    private static native int getNOctaveLayers_0(long nativeObj);
418
419    // C++:  void cv::SIFT::setContrastThreshold(double contrastThreshold)
420    private static native void setContrastThreshold_0(long nativeObj, double contrastThreshold);
421
422    // C++:  double cv::SIFT::getContrastThreshold()
423    private static native double getContrastThreshold_0(long nativeObj);
424
425    // C++:  void cv::SIFT::setEdgeThreshold(double edgeThreshold)
426    private static native void setEdgeThreshold_0(long nativeObj, double edgeThreshold);
427
428    // C++:  double cv::SIFT::getEdgeThreshold()
429    private static native double getEdgeThreshold_0(long nativeObj);
430
431    // C++:  void cv::SIFT::setSigma(double sigma)
432    private static native void setSigma_0(long nativeObj, double sigma);
433
434    // C++:  double cv::SIFT::getSigma()
435    private static native double getSigma_0(long nativeObj);
436
437    // native support for java finalize()
438    private static native void delete(long nativeObj);
439
440}