• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 //
3 // This file is auto-generated. Please don't modify it!
4 //
5 package org.opencv.features2d;
6 
7 import java.lang.String;
8 import java.util.ArrayList;
9 import java.util.List;
10 import org.opencv.core.Mat;
11 import org.opencv.core.MatOfKeyPoint;
12 import org.opencv.utils.Converters;
13 
14 // C++: class javaDescriptorExtractor
15 //javadoc: javaDescriptorExtractor
16 public class DescriptorExtractor {
17 
18     protected final long nativeObj;
DescriptorExtractor(long addr)19     protected DescriptorExtractor(long addr) { nativeObj = addr; }
20 
21 
22     private static final int
23             OPPONENTEXTRACTOR = 1000;
24 
25 
26     public static final int
27             SIFT = 1,
28             SURF = 2,
29             ORB = 3,
30             BRIEF = 4,
31             BRISK = 5,
32             FREAK = 6,
33             AKAZE = 7,
34             OPPONENT_SIFT = OPPONENTEXTRACTOR + SIFT,
35             OPPONENT_SURF = OPPONENTEXTRACTOR + SURF,
36             OPPONENT_ORB = OPPONENTEXTRACTOR + ORB,
37             OPPONENT_BRIEF = OPPONENTEXTRACTOR + BRIEF,
38             OPPONENT_BRISK = OPPONENTEXTRACTOR + BRISK,
39             OPPONENT_FREAK = OPPONENTEXTRACTOR + FREAK,
40             OPPONENT_AKAZE = OPPONENTEXTRACTOR + AKAZE;
41 
42 
43     //
44     // C++:  void compute(Mat image, vector_KeyPoint& keypoints, Mat descriptors)
45     //
46 
47     //javadoc: javaDescriptorExtractor::compute(image, keypoints, descriptors)
compute(Mat image, MatOfKeyPoint keypoints, Mat descriptors)48     public  void compute(Mat image, MatOfKeyPoint keypoints, Mat descriptors)
49     {
50         Mat keypoints_mat = keypoints;
51         compute_0(nativeObj, image.nativeObj, keypoints_mat.nativeObj, descriptors.nativeObj);
52 
53         return;
54     }
55 
56 
57     //
58     // C++:  void compute(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat& descriptors)
59     //
60 
61     //javadoc: javaDescriptorExtractor::compute(images, keypoints, descriptors)
compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors)62     public  void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors)
63     {
64         Mat images_mat = Converters.vector_Mat_to_Mat(images);
65         List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0);
66         Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm);
67         Mat descriptors_mat = new Mat();
68         compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj);
69         Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
70         keypoints_mat.release();
71         Converters.Mat_to_vector_Mat(descriptors_mat, descriptors);
72         descriptors_mat.release();
73         return;
74     }
75 
76 
77     //
78     // C++:  int descriptorSize()
79     //
80 
81     //javadoc: javaDescriptorExtractor::descriptorSize()
descriptorSize()82     public  int descriptorSize()
83     {
84 
85         int retVal = descriptorSize_0(nativeObj);
86 
87         return retVal;
88     }
89 
90 
91     //
92     // C++:  int descriptorType()
93     //
94 
95     //javadoc: javaDescriptorExtractor::descriptorType()
descriptorType()96     public  int descriptorType()
97     {
98 
99         int retVal = descriptorType_0(nativeObj);
100 
101         return retVal;
102     }
103 
104 
105     //
106     // C++:  bool empty()
107     //
108 
109     //javadoc: javaDescriptorExtractor::empty()
empty()110     public  boolean empty()
111     {
112 
113         boolean retVal = empty_0(nativeObj);
114 
115         return retVal;
116     }
117 
118 
119     //
120     // C++: static javaDescriptorExtractor* create(int extractorType)
121     //
122 
123     //javadoc: javaDescriptorExtractor::create(extractorType)
create(int extractorType)124     public static DescriptorExtractor create(int extractorType)
125     {
126 
127         DescriptorExtractor retVal = new DescriptorExtractor(create_0(extractorType));
128 
129         return retVal;
130     }
131 
132 
133     //
134     // C++:  void write(String fileName)
135     //
136 
137     //javadoc: javaDescriptorExtractor::write(fileName)
write(String fileName)138     public  void write(String fileName)
139     {
140 
141         write_0(nativeObj, fileName);
142 
143         return;
144     }
145 
146 
147     //
148     // C++:  void read(String fileName)
149     //
150 
151     //javadoc: javaDescriptorExtractor::read(fileName)
read(String fileName)152     public  void read(String fileName)
153     {
154 
155         read_0(nativeObj, fileName);
156 
157         return;
158     }
159 
160 
161     @Override
finalize()162     protected void finalize() throws Throwable {
163         delete(nativeObj);
164     }
165 
166 
167 
168     // C++:  void compute(Mat image, vector_KeyPoint& keypoints, Mat descriptors)
compute_0(long nativeObj, long image_nativeObj, long keypoints_mat_nativeObj, long descriptors_nativeObj)169     private static native void compute_0(long nativeObj, long image_nativeObj, long keypoints_mat_nativeObj, long descriptors_nativeObj);
170 
171     // C++:  void compute(vector_Mat images, vector_vector_KeyPoint& keypoints, vector_Mat& descriptors)
compute_1(long nativeObj, long images_mat_nativeObj, long keypoints_mat_nativeObj, long descriptors_mat_nativeObj)172     private static native void compute_1(long nativeObj, long images_mat_nativeObj, long keypoints_mat_nativeObj, long descriptors_mat_nativeObj);
173 
174     // C++:  int descriptorSize()
descriptorSize_0(long nativeObj)175     private static native int descriptorSize_0(long nativeObj);
176 
177     // C++:  int descriptorType()
descriptorType_0(long nativeObj)178     private static native int descriptorType_0(long nativeObj);
179 
180     // C++:  bool empty()
empty_0(long nativeObj)181     private static native boolean empty_0(long nativeObj);
182 
183     // C++: static javaDescriptorExtractor* create(int extractorType)
create_0(int extractorType)184     private static native long create_0(int extractorType);
185 
186     // C++:  void write(String fileName)
write_0(long nativeObj, String fileName)187     private static native void write_0(long nativeObj, String fileName);
188 
189     // C++:  void read(String fileName)
read_0(long nativeObj, String fileName)190     private static native void read_0(long nativeObj, String fileName);
191 
192     // native support for java finalize()
delete(long nativeObj)193     private static native void delete(long nativeObj);
194 
195 }
196