001// 002// This file is auto-generated. Please don't modify it! 003// 004package org.opencv.features2d; 005 006import java.util.ArrayList; 007import java.util.List; 008import org.opencv.core.Mat; 009import org.opencv.core.MatOfFloat; 010import org.opencv.features2d.AffineFeature; 011import org.opencv.features2d.Feature2D; 012import org.opencv.utils.Converters; 013 014// C++: class AffineFeature 015/** 016 * Class for implementing the wrapper which makes detectors and extractors to be affine invariant, 017 * described as ASIFT in CITE: YM11 . 018 */ 019public class AffineFeature extends Feature2D { 020 021 protected AffineFeature(long addr) { super(addr); } 022 023 // internal usage only 024 public static AffineFeature __fromPtr__(long addr) { return new AffineFeature(addr); } 025 026 // 027 // C++: static Ptr_AffineFeature cv::AffineFeature::create(Ptr_Feature2D backend, int maxTilt = 5, int minTilt = 0, float tiltStep = 1.4142135623730951f, float rotateStepBase = 72) 028 // 029 030 /** 031 * @param backend The detector/extractor you want to use as backend. 032 * @param maxTilt The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n. 033 * @param minTilt The lowest power index of tilt factor. 0 is used in the paper. 034 * @param tiltStep Tilt sampling step \(\delta_t\) in Algorithm 1 in the paper. 035 * @param rotateStepBase Rotation sampling step factor b in Algorithm 1 in the paper. 036 * @return automatically generated 037 */ 038 public static AffineFeature create(Feature2D backend, int maxTilt, int minTilt, float tiltStep, float rotateStepBase) { 039 return AffineFeature.__fromPtr__(create_0(backend.getNativeObjAddr(), maxTilt, minTilt, tiltStep, rotateStepBase)); 040 } 041 042 /** 043 * @param backend The detector/extractor you want to use as backend. 044 * @param maxTilt The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n. 045 * @param minTilt The lowest power index of tilt factor. 0 is used in the paper. 046 * @param tiltStep Tilt sampling step \(\delta_t\) in Algorithm 1 in the paper. 047 * @return automatically generated 048 */ 049 public static AffineFeature create(Feature2D backend, int maxTilt, int minTilt, float tiltStep) { 050 return AffineFeature.__fromPtr__(create_1(backend.getNativeObjAddr(), maxTilt, minTilt, tiltStep)); 051 } 052 053 /** 054 * @param backend The detector/extractor you want to use as backend. 055 * @param maxTilt The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n. 056 * @param minTilt The lowest power index of tilt factor. 0 is used in the paper. 057 * @return automatically generated 058 */ 059 public static AffineFeature create(Feature2D backend, int maxTilt, int minTilt) { 060 return AffineFeature.__fromPtr__(create_2(backend.getNativeObjAddr(), maxTilt, minTilt)); 061 } 062 063 /** 064 * @param backend The detector/extractor you want to use as backend. 065 * @param maxTilt The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n. 066 * @return automatically generated 067 */ 068 public static AffineFeature create(Feature2D backend, int maxTilt) { 069 return AffineFeature.__fromPtr__(create_3(backend.getNativeObjAddr(), maxTilt)); 070 } 071 072 /** 073 * @param backend The detector/extractor you want to use as backend. 074 * @return automatically generated 075 */ 076 public static AffineFeature create(Feature2D backend) { 077 return AffineFeature.__fromPtr__(create_4(backend.getNativeObjAddr())); 078 } 079 080 081 // 082 // C++: void cv::AffineFeature::setViewParams(vector_float tilts, vector_float rolls) 083 // 084 085 public void setViewParams(MatOfFloat tilts, MatOfFloat rolls) { 086 Mat tilts_mat = tilts; 087 Mat rolls_mat = rolls; 088 setViewParams_0(nativeObj, tilts_mat.nativeObj, rolls_mat.nativeObj); 089 } 090 091 092 // 093 // C++: void cv::AffineFeature::getViewParams(vector_float tilts, vector_float rolls) 094 // 095 096 public void getViewParams(MatOfFloat tilts, MatOfFloat rolls) { 097 Mat tilts_mat = tilts; 098 Mat rolls_mat = rolls; 099 getViewParams_0(nativeObj, tilts_mat.nativeObj, rolls_mat.nativeObj); 100 } 101 102 103 // 104 // C++: String cv::AffineFeature::getDefaultName() 105 // 106 107 public String getDefaultName() { 108 return getDefaultName_0(nativeObj); 109 } 110 111 112 @Override 113 protected void finalize() throws Throwable { 114 delete(nativeObj); 115 } 116 117 118 119 // C++: static Ptr_AffineFeature cv::AffineFeature::create(Ptr_Feature2D backend, int maxTilt = 5, int minTilt = 0, float tiltStep = 1.4142135623730951f, float rotateStepBase = 72) 120 private static native long create_0(long backend_nativeObj, int maxTilt, int minTilt, float tiltStep, float rotateStepBase); 121 private static native long create_1(long backend_nativeObj, int maxTilt, int minTilt, float tiltStep); 122 private static native long create_2(long backend_nativeObj, int maxTilt, int minTilt); 123 private static native long create_3(long backend_nativeObj, int maxTilt); 124 private static native long create_4(long backend_nativeObj); 125 126 // C++: void cv::AffineFeature::setViewParams(vector_float tilts, vector_float rolls) 127 private static native void setViewParams_0(long nativeObj, long tilts_mat_nativeObj, long rolls_mat_nativeObj); 128 129 // C++: void cv::AffineFeature::getViewParams(vector_float tilts, vector_float rolls) 130 private static native void getViewParams_0(long nativeObj, long tilts_mat_nativeObj, long rolls_mat_nativeObj); 131 132 // C++: String cv::AffineFeature::getDefaultName() 133 private static native String getDefaultName_0(long nativeObj); 134 135 // native support for java finalize() 136 private static native void delete(long nativeObj); 137 138}