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) 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 * @return automatically generated 046 */ 047 public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma) { 048 return SIFT.__fromPtr__(create_0(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma)); 049 } 050 051 /** 052 * @param nfeatures The number of best features to retain. The features are ranked by their scores 053 * (measured in SIFT algorithm as the local contrast) 054 * 055 * @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The 056 * number of octaves is computed automatically from the image resolution. 057 * 058 * @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform 059 * (low-contrast) regions. The larger the threshold, the less features are produced by the detector. 060 * 061 * <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When 062 * nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set 063 * this argument to 0.09. 064 * 065 * @param edgeThreshold The threshold used to filter out edge-like features. Note that the its meaning 066 * is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are 067 * filtered out (more features are retained). 068 * 069 * is captured with a weak camera with soft lenses, you might want to reduce the number. 070 * @return automatically generated 071 */ 072 public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold) { 073 return SIFT.__fromPtr__(create_1(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold)); 074 } 075 076 /** 077 * @param nfeatures The number of best features to retain. The features are ranked by their scores 078 * (measured in SIFT algorithm as the local contrast) 079 * 080 * @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The 081 * number of octaves is computed automatically from the image resolution. 082 * 083 * @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform 084 * (low-contrast) regions. The larger the threshold, the less features are produced by the detector. 085 * 086 * <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When 087 * nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set 088 * this argument to 0.09. 089 * 090 * is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are 091 * filtered out (more features are retained). 092 * 093 * is captured with a weak camera with soft lenses, you might want to reduce the number. 094 * @return automatically generated 095 */ 096 public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold) { 097 return SIFT.__fromPtr__(create_2(nfeatures, nOctaveLayers, contrastThreshold)); 098 } 099 100 /** 101 * @param nfeatures The number of best features to retain. The features are ranked by their scores 102 * (measured in SIFT algorithm as the local contrast) 103 * 104 * @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The 105 * number of octaves is computed automatically from the image resolution. 106 * 107 * (low-contrast) regions. The larger the threshold, the less features are produced by the detector. 108 * 109 * <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When 110 * nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set 111 * this argument to 0.09. 112 * 113 * is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are 114 * filtered out (more features are retained). 115 * 116 * is captured with a weak camera with soft lenses, you might want to reduce the number. 117 * @return automatically generated 118 */ 119 public static SIFT create(int nfeatures, int nOctaveLayers) { 120 return SIFT.__fromPtr__(create_3(nfeatures, nOctaveLayers)); 121 } 122 123 /** 124 * @param nfeatures The number of best features to retain. The features are ranked by their scores 125 * (measured in SIFT algorithm as the local contrast) 126 * 127 * number of octaves is computed automatically from the image resolution. 128 * 129 * (low-contrast) regions. The larger the threshold, the less features are produced by the detector. 130 * 131 * <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When 132 * nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set 133 * this argument to 0.09. 134 * 135 * is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are 136 * filtered out (more features are retained). 137 * 138 * is captured with a weak camera with soft lenses, you might want to reduce the number. 139 * @return automatically generated 140 */ 141 public static SIFT create(int nfeatures) { 142 return SIFT.__fromPtr__(create_4(nfeatures)); 143 } 144 145 /** 146 * (measured in SIFT algorithm as the local contrast) 147 * 148 * number of octaves is computed automatically from the image resolution. 149 * 150 * (low-contrast) regions. The larger the threshold, the less features are produced by the detector. 151 * 152 * <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When 153 * nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set 154 * this argument to 0.09. 155 * 156 * is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are 157 * filtered out (more features are retained). 158 * 159 * is captured with a weak camera with soft lenses, you might want to reduce the number. 160 * @return automatically generated 161 */ 162 public static SIFT create() { 163 return SIFT.__fromPtr__(create_5()); 164 } 165 166 167 // 168 // C++: static Ptr_SIFT cv::SIFT::create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType) 169 // 170 171 /** 172 * Create SIFT with specified descriptorType. 173 * @param nfeatures The number of best features to retain. The features are ranked by their scores 174 * (measured in SIFT algorithm as the local contrast) 175 * 176 * @param nOctaveLayers The number of layers in each octave. 3 is the value used in D. Lowe paper. The 177 * number of octaves is computed automatically from the image resolution. 178 * 179 * @param contrastThreshold The contrast threshold used to filter out weak features in semi-uniform 180 * (low-contrast) regions. The larger the threshold, the less features are produced by the detector. 181 * 182 * <b>Note:</b> The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When 183 * nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set 184 * this argument to 0.09. 185 * 186 * @param edgeThreshold The threshold used to filter out edge-like features. Note that the its meaning 187 * is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are 188 * filtered out (more features are retained). 189 * 190 * @param sigma The sigma of the Gaussian applied to the input image at the octave \#0. If your image 191 * is captured with a weak camera with soft lenses, you might want to reduce the number. 192 * 193 * @param descriptorType The type of descriptors. Only CV_32F and CV_8U are supported. 194 * @return automatically generated 195 */ 196 public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType) { 197 return SIFT.__fromPtr__(create_6(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, descriptorType)); 198 } 199 200 201 // 202 // C++: String cv::SIFT::getDefaultName() 203 // 204 205 public String getDefaultName() { 206 return getDefaultName_0(nativeObj); 207 } 208 209 210 @Override 211 protected void finalize() throws Throwable { 212 delete(nativeObj); 213 } 214 215 216 217 // C++: static Ptr_SIFT cv::SIFT::create(int nfeatures = 0, int nOctaveLayers = 3, double contrastThreshold = 0.04, double edgeThreshold = 10, double sigma = 1.6) 218 private static native long create_0(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma); 219 private static native long create_1(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold); 220 private static native long create_2(int nfeatures, int nOctaveLayers, double contrastThreshold); 221 private static native long create_3(int nfeatures, int nOctaveLayers); 222 private static native long create_4(int nfeatures); 223 private static native long create_5(); 224 225 // C++: static Ptr_SIFT cv::SIFT::create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType) 226 private static native long create_6(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType); 227 228 // C++: String cv::SIFT::getDefaultName() 229 private static native String getDefaultName_0(long nativeObj); 230 231 // native support for java finalize() 232 private static native void delete(long nativeObj); 233 234}