HOGDescriptor.java
19.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
//
// This file is auto-generated. Please don't modify it!
//
package org.opencv.objdetect;
import java.lang.String;
import java.util.ArrayList;
import java.util.List;
import org.opencv.core.Mat;
import org.opencv.core.MatOfDouble;
import org.opencv.core.MatOfFloat;
import org.opencv.core.MatOfPoint;
import org.opencv.core.MatOfRect;
import org.opencv.core.Size;
import org.opencv.utils.Converters;
// C++: class HOGDescriptor
//javadoc: HOGDescriptor
public class HOGDescriptor {
protected final long nativeObj;
protected HOGDescriptor(long addr) { nativeObj = addr; }
public long getNativeObjAddr() { return nativeObj; }
public static final int
L2Hys = 0,
DEFAULT_NLEVELS = 64;
//
// C++: HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, int _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
//
//javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient)
public HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient)
{
nativeObj = HOGDescriptor_0(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient);
return;
}
//javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins)
public HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins)
{
nativeObj = HOGDescriptor_1(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins);
return;
}
//
// C++: HOGDescriptor(String filename)
//
//javadoc: HOGDescriptor::HOGDescriptor(filename)
public HOGDescriptor(String filename)
{
nativeObj = HOGDescriptor_2(filename);
return;
}
//
// C++: HOGDescriptor()
//
//javadoc: HOGDescriptor::HOGDescriptor()
public HOGDescriptor()
{
nativeObj = HOGDescriptor_3();
return;
}
//
// C++: bool checkDetectorSize()
//
//javadoc: HOGDescriptor::checkDetectorSize()
public boolean checkDetectorSize()
{
boolean retVal = checkDetectorSize_0(nativeObj);
return retVal;
}
//
// C++: bool load(String filename, String objname = String())
//
//javadoc: HOGDescriptor::load(filename, objname)
public boolean load(String filename, String objname)
{
boolean retVal = load_0(nativeObj, filename, objname);
return retVal;
}
//javadoc: HOGDescriptor::load(filename)
public boolean load(String filename)
{
boolean retVal = load_1(nativeObj, filename);
return retVal;
}
//
// C++: double getWinSigma()
//
//javadoc: HOGDescriptor::getWinSigma()
public double getWinSigma()
{
double retVal = getWinSigma_0(nativeObj);
return retVal;
}
//
// C++: size_t getDescriptorSize()
//
//javadoc: HOGDescriptor::getDescriptorSize()
public long getDescriptorSize()
{
long retVal = getDescriptorSize_0(nativeObj);
return retVal;
}
//
// C++: static vector_float getDaimlerPeopleDetector()
//
//javadoc: HOGDescriptor::getDaimlerPeopleDetector()
public static MatOfFloat getDaimlerPeopleDetector()
{
MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDaimlerPeopleDetector_0());
return retVal;
}
//
// C++: static vector_float getDefaultPeopleDetector()
//
//javadoc: HOGDescriptor::getDefaultPeopleDetector()
public static MatOfFloat getDefaultPeopleDetector()
{
MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDefaultPeopleDetector_0());
return retVal;
}
//
// C++: void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
//
//javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding, locations)
public void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
{
Mat descriptors_mat = descriptors;
Mat locations_mat = locations;
compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
return;
}
//javadoc: HOGDescriptor::compute(img, descriptors)
public void compute(Mat img, MatOfFloat descriptors)
{
Mat descriptors_mat = descriptors;
compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
return;
}
//
// C++: void computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
//
//javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs, paddingTL, paddingBR)
public void computeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR)
{
computeGradient_0(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj, paddingTL.width, paddingTL.height, paddingBR.width, paddingBR.height);
return;
}
//javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs)
public void computeGradient(Mat img, Mat grad, Mat angleOfs)
{
computeGradient_1(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj);
return;
}
//
// C++: void detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
//
//javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding, searchLocations)
public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
{
Mat foundLocations_mat = foundLocations;
Mat weights_mat = weights;
Mat searchLocations_mat = searchLocations;
detect_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj);
return;
}
//javadoc: HOGDescriptor::detect(img, foundLocations, weights)
public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
{
Mat foundLocations_mat = foundLocations;
Mat weights_mat = weights;
detect_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
return;
}
//
// C++: void detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double finalThreshold = 2.0, bool useMeanshiftGrouping = false)
//
//javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale, finalThreshold, useMeanshiftGrouping)
public void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
Mat foundLocations_mat = foundLocations;
Mat foundWeights_mat = foundWeights;
detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
return;
}
//javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights)
public void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
Mat foundLocations_mat = foundLocations;
Mat foundWeights_mat = foundWeights;
detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
return;
}
//
// C++: void save(String filename, String objname = String())
//
//javadoc: HOGDescriptor::save(filename, objname)
public void save(String filename, String objname)
{
save_0(nativeObj, filename, objname);
return;
}
//javadoc: HOGDescriptor::save(filename)
public void save(String filename)
{
save_1(nativeObj, filename);
return;
}
//
// C++: void setSVMDetector(Mat _svmdetector)
//
//javadoc: HOGDescriptor::setSVMDetector(_svmdetector)
public void setSVMDetector(Mat _svmdetector)
{
setSVMDetector_0(nativeObj, _svmdetector.nativeObj);
return;
}
//
// C++: Size HOGDescriptor::winSize
//
//javadoc: HOGDescriptor::get_winSize()
public Size get_winSize()
{
Size retVal = new Size(get_winSize_0(nativeObj));
return retVal;
}
//
// C++: Size HOGDescriptor::blockSize
//
//javadoc: HOGDescriptor::get_blockSize()
public Size get_blockSize()
{
Size retVal = new Size(get_blockSize_0(nativeObj));
return retVal;
}
//
// C++: Size HOGDescriptor::blockStride
//
//javadoc: HOGDescriptor::get_blockStride()
public Size get_blockStride()
{
Size retVal = new Size(get_blockStride_0(nativeObj));
return retVal;
}
//
// C++: Size HOGDescriptor::cellSize
//
//javadoc: HOGDescriptor::get_cellSize()
public Size get_cellSize()
{
Size retVal = new Size(get_cellSize_0(nativeObj));
return retVal;
}
//
// C++: int HOGDescriptor::nbins
//
//javadoc: HOGDescriptor::get_nbins()
public int get_nbins()
{
int retVal = get_nbins_0(nativeObj);
return retVal;
}
//
// C++: int HOGDescriptor::derivAperture
//
//javadoc: HOGDescriptor::get_derivAperture()
public int get_derivAperture()
{
int retVal = get_derivAperture_0(nativeObj);
return retVal;
}
//
// C++: double HOGDescriptor::winSigma
//
//javadoc: HOGDescriptor::get_winSigma()
public double get_winSigma()
{
double retVal = get_winSigma_0(nativeObj);
return retVal;
}
//
// C++: int HOGDescriptor::histogramNormType
//
//javadoc: HOGDescriptor::get_histogramNormType()
public int get_histogramNormType()
{
int retVal = get_histogramNormType_0(nativeObj);
return retVal;
}
//
// C++: double HOGDescriptor::L2HysThreshold
//
//javadoc: HOGDescriptor::get_L2HysThreshold()
public double get_L2HysThreshold()
{
double retVal = get_L2HysThreshold_0(nativeObj);
return retVal;
}
//
// C++: bool HOGDescriptor::gammaCorrection
//
//javadoc: HOGDescriptor::get_gammaCorrection()
public boolean get_gammaCorrection()
{
boolean retVal = get_gammaCorrection_0(nativeObj);
return retVal;
}
//
// C++: vector_float HOGDescriptor::svmDetector
//
//javadoc: HOGDescriptor::get_svmDetector()
public MatOfFloat get_svmDetector()
{
MatOfFloat retVal = MatOfFloat.fromNativeAddr(get_svmDetector_0(nativeObj));
return retVal;
}
//
// C++: int HOGDescriptor::nlevels
//
//javadoc: HOGDescriptor::get_nlevels()
public int get_nlevels()
{
int retVal = get_nlevels_0(nativeObj);
return retVal;
}
//
// C++: bool HOGDescriptor::signedGradient
//
//javadoc: HOGDescriptor::get_signedGradient()
public boolean get_signedGradient()
{
boolean retVal = get_signedGradient_0(nativeObj);
return retVal;
}
@Override
protected void finalize() throws Throwable {
delete(nativeObj);
}
// C++: HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture = 1, double _winSigma = -1, int _histogramNormType = HOGDescriptor::L2Hys, double _L2HysThreshold = 0.2, bool _gammaCorrection = false, int _nlevels = HOGDescriptor::DEFAULT_NLEVELS, bool _signedGradient = false)
private static native long HOGDescriptor_0(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient);
private static native long HOGDescriptor_1(double _winSize_width, double _winSize_height, double _blockSize_width, double _blockSize_height, double _blockStride_width, double _blockStride_height, double _cellSize_width, double _cellSize_height, int _nbins);
// C++: HOGDescriptor(String filename)
private static native long HOGDescriptor_2(String filename);
// C++: HOGDescriptor()
private static native long HOGDescriptor_3();
// C++: bool checkDetectorSize()
private static native boolean checkDetectorSize_0(long nativeObj);
// C++: bool load(String filename, String objname = String())
private static native boolean load_0(long nativeObj, String filename, String objname);
private static native boolean load_1(long nativeObj, String filename);
// C++: double getWinSigma()
private static native double getWinSigma_0(long nativeObj);
// C++: size_t getDescriptorSize()
private static native long getDescriptorSize_0(long nativeObj);
// C++: static vector_float getDaimlerPeopleDetector()
private static native long getDaimlerPeopleDetector_0();
// C++: static vector_float getDefaultPeopleDetector()
private static native long getDefaultPeopleDetector_0();
// C++: void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>())
private static native void compute_0(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj, double winStride_width, double winStride_height, double padding_width, double padding_height, long locations_mat_nativeObj);
private static native void compute_1(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj);
// C++: void computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size())
private static native void computeGradient_0(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj, double paddingTL_width, double paddingTL_height, double paddingBR_width, double paddingBR_height);
private static native void computeGradient_1(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj);
// C++: void detect(Mat img, vector_Point& foundLocations, vector_double& weights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), vector_Point searchLocations = std::vector<Point>())
private static native void detect_0(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, long searchLocations_mat_nativeObj);
private static native void detect_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj);
// C++: void detectMultiScale(Mat img, vector_Rect& foundLocations, vector_double& foundWeights, double hitThreshold = 0, Size winStride = Size(), Size padding = Size(), double scale = 1.05, double finalThreshold = 2.0, bool useMeanshiftGrouping = false)
private static native void detectMultiScale_0(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj, double hitThreshold, double winStride_width, double winStride_height, double padding_width, double padding_height, double scale, double finalThreshold, boolean useMeanshiftGrouping);
private static native void detectMultiScale_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj);
// C++: void save(String filename, String objname = String())
private static native void save_0(long nativeObj, String filename, String objname);
private static native void save_1(long nativeObj, String filename);
// C++: void setSVMDetector(Mat _svmdetector)
private static native void setSVMDetector_0(long nativeObj, long _svmdetector_nativeObj);
// C++: Size HOGDescriptor::winSize
private static native double[] get_winSize_0(long nativeObj);
// C++: Size HOGDescriptor::blockSize
private static native double[] get_blockSize_0(long nativeObj);
// C++: Size HOGDescriptor::blockStride
private static native double[] get_blockStride_0(long nativeObj);
// C++: Size HOGDescriptor::cellSize
private static native double[] get_cellSize_0(long nativeObj);
// C++: int HOGDescriptor::nbins
private static native int get_nbins_0(long nativeObj);
// C++: int HOGDescriptor::derivAperture
private static native int get_derivAperture_0(long nativeObj);
// C++: double HOGDescriptor::winSigma
private static native double get_winSigma_0(long nativeObj);
// C++: int HOGDescriptor::histogramNormType
private static native int get_histogramNormType_0(long nativeObj);
// C++: double HOGDescriptor::L2HysThreshold
private static native double get_L2HysThreshold_0(long nativeObj);
// C++: bool HOGDescriptor::gammaCorrection
private static native boolean get_gammaCorrection_0(long nativeObj);
// C++: vector_float HOGDescriptor::svmDetector
private static native long get_svmDetector_0(long nativeObj);
// C++: int HOGDescriptor::nlevels
private static native int get_nlevels_0(long nativeObj);
// C++: bool HOGDescriptor::signedGradient
private static native boolean get_signedGradient_0(long nativeObj);
// native support for java finalize()
private static native void delete(long nativeObj);
}