001 002// 003// This file is auto-generated. Please don't modify it! 004// 005package org.opencv.objdetect; 006 007import java.lang.String; 008import java.util.ArrayList; 009import org.opencv.core.Mat; 010import org.opencv.core.MatOfDouble; 011import org.opencv.core.MatOfFloat; 012import org.opencv.core.MatOfPoint; 013import org.opencv.core.MatOfRect; 014import org.opencv.core.Size; 015 016// C++: class HOGDescriptor 017//javadoc: HOGDescriptor 018public class HOGDescriptor { 019 020 protected final long nativeObj; 021 protected HOGDescriptor(long addr) { nativeObj = addr; } 022 023 024 public static final int 025 L2Hys = 0, 026 DEFAULT_NLEVELS = 64; 027 028 029 // 030 // 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) 031 // 032 033 //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins, _derivAperture, _winSigma, _histogramNormType, _L2HysThreshold, _gammaCorrection, _nlevels, _signedGradient) 034 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) 035 { 036 037 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); 038 039 return; 040 } 041 042 //javadoc: HOGDescriptor::HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins) 043 public HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins) 044 { 045 046 nativeObj = HOGDescriptor_1(_winSize.width, _winSize.height, _blockSize.width, _blockSize.height, _blockStride.width, _blockStride.height, _cellSize.width, _cellSize.height, _nbins); 047 048 return; 049 } 050 051 052 // 053 // C++: HOGDescriptor(String filename) 054 // 055 056 //javadoc: HOGDescriptor::HOGDescriptor(filename) 057 public HOGDescriptor(String filename) 058 { 059 060 nativeObj = HOGDescriptor_2(filename); 061 062 return; 063 } 064 065 066 // 067 // C++: HOGDescriptor() 068 // 069 070 //javadoc: HOGDescriptor::HOGDescriptor() 071 public HOGDescriptor() 072 { 073 074 nativeObj = HOGDescriptor_3(); 075 076 return; 077 } 078 079 080 // 081 // C++: bool checkDetectorSize() 082 // 083 084 //javadoc: HOGDescriptor::checkDetectorSize() 085 public boolean checkDetectorSize() 086 { 087 088 boolean retVal = checkDetectorSize_0(nativeObj); 089 090 return retVal; 091 } 092 093 094 // 095 // C++: bool load(String filename, String objname = String()) 096 // 097 098 //javadoc: HOGDescriptor::load(filename, objname) 099 public boolean load(String filename, String objname) 100 { 101 102 boolean retVal = load_0(nativeObj, filename, objname); 103 104 return retVal; 105 } 106 107 //javadoc: HOGDescriptor::load(filename) 108 public boolean load(String filename) 109 { 110 111 boolean retVal = load_1(nativeObj, filename); 112 113 return retVal; 114 } 115 116 117 // 118 // C++: double getWinSigma() 119 // 120 121 //javadoc: HOGDescriptor::getWinSigma() 122 public double getWinSigma() 123 { 124 125 double retVal = getWinSigma_0(nativeObj); 126 127 return retVal; 128 } 129 130 131 // 132 // C++: size_t getDescriptorSize() 133 // 134 135 //javadoc: HOGDescriptor::getDescriptorSize() 136 public long getDescriptorSize() 137 { 138 139 long retVal = getDescriptorSize_0(nativeObj); 140 141 return retVal; 142 } 143 144 145 // 146 // C++: static vector_float getDaimlerPeopleDetector() 147 // 148 149 //javadoc: HOGDescriptor::getDaimlerPeopleDetector() 150 public static MatOfFloat getDaimlerPeopleDetector() 151 { 152 153 MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDaimlerPeopleDetector_0()); 154 155 return retVal; 156 } 157 158 159 // 160 // C++: static vector_float getDefaultPeopleDetector() 161 // 162 163 //javadoc: HOGDescriptor::getDefaultPeopleDetector() 164 public static MatOfFloat getDefaultPeopleDetector() 165 { 166 167 MatOfFloat retVal = MatOfFloat.fromNativeAddr(getDefaultPeopleDetector_0()); 168 169 return retVal; 170 } 171 172 173 // 174 // C++: void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>()) 175 // 176 177 //javadoc: HOGDescriptor::compute(img, descriptors, winStride, padding, locations) 178 public void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations) 179 { 180 Mat descriptors_mat = descriptors; 181 Mat locations_mat = locations; 182 compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj); 183 184 return; 185 } 186 187 //javadoc: HOGDescriptor::compute(img, descriptors) 188 public void compute(Mat img, MatOfFloat descriptors) 189 { 190 Mat descriptors_mat = descriptors; 191 compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj); 192 193 return; 194 } 195 196 197 // 198 // C++: void computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size()) 199 // 200 201 //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs, paddingTL, paddingBR) 202 public void computeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR) 203 { 204 205 computeGradient_0(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj, paddingTL.width, paddingTL.height, paddingBR.width, paddingBR.height); 206 207 return; 208 } 209 210 //javadoc: HOGDescriptor::computeGradient(img, grad, angleOfs) 211 public void computeGradient(Mat img, Mat grad, Mat angleOfs) 212 { 213 214 computeGradient_1(nativeObj, img.nativeObj, grad.nativeObj, angleOfs.nativeObj); 215 216 return; 217 } 218 219 220 // 221 // 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>()) 222 // 223 224 //javadoc: HOGDescriptor::detect(img, foundLocations, weights, hitThreshold, winStride, padding, searchLocations) 225 public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations) 226 { 227 Mat foundLocations_mat = foundLocations; 228 Mat weights_mat = weights; 229 Mat searchLocations_mat = searchLocations; 230 detect_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj); 231 232 return; 233 } 234 235 //javadoc: HOGDescriptor::detect(img, foundLocations, weights) 236 public void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights) 237 { 238 Mat foundLocations_mat = foundLocations; 239 Mat weights_mat = weights; 240 detect_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj); 241 242 return; 243 } 244 245 246 // 247 // 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) 248 // 249 250 //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, padding, scale, finalThreshold, useMeanshiftGrouping) 251 public void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping) 252 { 253 Mat foundLocations_mat = foundLocations; 254 Mat foundWeights_mat = foundWeights; 255 detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping); 256 257 return; 258 } 259 260 //javadoc: HOGDescriptor::detectMultiScale(img, foundLocations, foundWeights) 261 public void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights) 262 { 263 Mat foundLocations_mat = foundLocations; 264 Mat foundWeights_mat = foundWeights; 265 detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj); 266 267 return; 268 } 269 270 271 // 272 // C++: void save(String filename, String objname = String()) 273 // 274 275 //javadoc: HOGDescriptor::save(filename, objname) 276 public void save(String filename, String objname) 277 { 278 279 save_0(nativeObj, filename, objname); 280 281 return; 282 } 283 284 //javadoc: HOGDescriptor::save(filename) 285 public void save(String filename) 286 { 287 288 save_1(nativeObj, filename); 289 290 return; 291 } 292 293 294 // 295 // C++: void setSVMDetector(Mat _svmdetector) 296 // 297 298 //javadoc: HOGDescriptor::setSVMDetector(_svmdetector) 299 public void setSVMDetector(Mat _svmdetector) 300 { 301 302 setSVMDetector_0(nativeObj, _svmdetector.nativeObj); 303 304 return; 305 } 306 307 308 // 309 // C++: Size HOGDescriptor::winSize 310 // 311 312 //javadoc: HOGDescriptor::get_winSize() 313 public Size get_winSize() 314 { 315 316 Size retVal = new Size(get_winSize_0(nativeObj)); 317 318 return retVal; 319 } 320 321 322 // 323 // C++: Size HOGDescriptor::blockSize 324 // 325 326 //javadoc: HOGDescriptor::get_blockSize() 327 public Size get_blockSize() 328 { 329 330 Size retVal = new Size(get_blockSize_0(nativeObj)); 331 332 return retVal; 333 } 334 335 336 // 337 // C++: Size HOGDescriptor::blockStride 338 // 339 340 //javadoc: HOGDescriptor::get_blockStride() 341 public Size get_blockStride() 342 { 343 344 Size retVal = new Size(get_blockStride_0(nativeObj)); 345 346 return retVal; 347 } 348 349 350 // 351 // C++: Size HOGDescriptor::cellSize 352 // 353 354 //javadoc: HOGDescriptor::get_cellSize() 355 public Size get_cellSize() 356 { 357 358 Size retVal = new Size(get_cellSize_0(nativeObj)); 359 360 return retVal; 361 } 362 363 364 // 365 // C++: int HOGDescriptor::nbins 366 // 367 368 //javadoc: HOGDescriptor::get_nbins() 369 public int get_nbins() 370 { 371 372 int retVal = get_nbins_0(nativeObj); 373 374 return retVal; 375 } 376 377 378 // 379 // C++: int HOGDescriptor::derivAperture 380 // 381 382 //javadoc: HOGDescriptor::get_derivAperture() 383 public int get_derivAperture() 384 { 385 386 int retVal = get_derivAperture_0(nativeObj); 387 388 return retVal; 389 } 390 391 392 // 393 // C++: double HOGDescriptor::winSigma 394 // 395 396 //javadoc: HOGDescriptor::get_winSigma() 397 public double get_winSigma() 398 { 399 400 double retVal = get_winSigma_0(nativeObj); 401 402 return retVal; 403 } 404 405 406 // 407 // C++: int HOGDescriptor::histogramNormType 408 // 409 410 //javadoc: HOGDescriptor::get_histogramNormType() 411 public int get_histogramNormType() 412 { 413 414 int retVal = get_histogramNormType_0(nativeObj); 415 416 return retVal; 417 } 418 419 420 // 421 // C++: double HOGDescriptor::L2HysThreshold 422 // 423 424 //javadoc: HOGDescriptor::get_L2HysThreshold() 425 public double get_L2HysThreshold() 426 { 427 428 double retVal = get_L2HysThreshold_0(nativeObj); 429 430 return retVal; 431 } 432 433 434 // 435 // C++: bool HOGDescriptor::gammaCorrection 436 // 437 438 //javadoc: HOGDescriptor::get_gammaCorrection() 439 public boolean get_gammaCorrection() 440 { 441 442 boolean retVal = get_gammaCorrection_0(nativeObj); 443 444 return retVal; 445 } 446 447 448 // 449 // C++: vector_float HOGDescriptor::svmDetector 450 // 451 452 //javadoc: HOGDescriptor::get_svmDetector() 453 public MatOfFloat get_svmDetector() 454 { 455 456 MatOfFloat retVal = MatOfFloat.fromNativeAddr(get_svmDetector_0(nativeObj)); 457 458 return retVal; 459 } 460 461 462 // 463 // C++: int HOGDescriptor::nlevels 464 // 465 466 //javadoc: HOGDescriptor::get_nlevels() 467 public int get_nlevels() 468 { 469 470 int retVal = get_nlevels_0(nativeObj); 471 472 return retVal; 473 } 474 475 476 // 477 // C++: bool HOGDescriptor::signedGradient 478 // 479 480 //javadoc: HOGDescriptor::get_signedGradient() 481 public boolean get_signedGradient() 482 { 483 484 boolean retVal = get_signedGradient_0(nativeObj); 485 486 return retVal; 487 } 488 489 490 @Override 491 protected void finalize() throws Throwable { 492 delete(nativeObj); 493 } 494 495 496 497 // 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) 498 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); 499 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); 500 501 // C++: HOGDescriptor(String filename) 502 private static native long HOGDescriptor_2(String filename); 503 504 // C++: HOGDescriptor() 505 private static native long HOGDescriptor_3(); 506 507 // C++: bool checkDetectorSize() 508 private static native boolean checkDetectorSize_0(long nativeObj); 509 510 // C++: bool load(String filename, String objname = String()) 511 private static native boolean load_0(long nativeObj, String filename, String objname); 512 private static native boolean load_1(long nativeObj, String filename); 513 514 // C++: double getWinSigma() 515 private static native double getWinSigma_0(long nativeObj); 516 517 // C++: size_t getDescriptorSize() 518 private static native long getDescriptorSize_0(long nativeObj); 519 520 // C++: static vector_float getDaimlerPeopleDetector() 521 private static native long getDaimlerPeopleDetector_0(); 522 523 // C++: static vector_float getDefaultPeopleDetector() 524 private static native long getDefaultPeopleDetector_0(); 525 526 // C++: void compute(Mat img, vector_float& descriptors, Size winStride = Size(), Size padding = Size(), vector_Point locations = std::vector<Point>()) 527 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); 528 private static native void compute_1(long nativeObj, long img_nativeObj, long descriptors_mat_nativeObj); 529 530 // C++: void computeGradient(Mat img, Mat& grad, Mat& angleOfs, Size paddingTL = Size(), Size paddingBR = Size()) 531 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); 532 private static native void computeGradient_1(long nativeObj, long img_nativeObj, long grad_nativeObj, long angleOfs_nativeObj); 533 534 // 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>()) 535 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); 536 private static native void detect_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long weights_mat_nativeObj); 537 538 // 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) 539 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); 540 private static native void detectMultiScale_1(long nativeObj, long img_nativeObj, long foundLocations_mat_nativeObj, long foundWeights_mat_nativeObj); 541 542 // C++: void save(String filename, String objname = String()) 543 private static native void save_0(long nativeObj, String filename, String objname); 544 private static native void save_1(long nativeObj, String filename); 545 546 // C++: void setSVMDetector(Mat _svmdetector) 547 private static native void setSVMDetector_0(long nativeObj, long _svmdetector_nativeObj); 548 549 // C++: Size HOGDescriptor::winSize 550 private static native double[] get_winSize_0(long nativeObj); 551 552 // C++: Size HOGDescriptor::blockSize 553 private static native double[] get_blockSize_0(long nativeObj); 554 555 // C++: Size HOGDescriptor::blockStride 556 private static native double[] get_blockStride_0(long nativeObj); 557 558 // C++: Size HOGDescriptor::cellSize 559 private static native double[] get_cellSize_0(long nativeObj); 560 561 // C++: int HOGDescriptor::nbins 562 private static native int get_nbins_0(long nativeObj); 563 564 // C++: int HOGDescriptor::derivAperture 565 private static native int get_derivAperture_0(long nativeObj); 566 567 // C++: double HOGDescriptor::winSigma 568 private static native double get_winSigma_0(long nativeObj); 569 570 // C++: int HOGDescriptor::histogramNormType 571 private static native int get_histogramNormType_0(long nativeObj); 572 573 // C++: double HOGDescriptor::L2HysThreshold 574 private static native double get_L2HysThreshold_0(long nativeObj); 575 576 // C++: bool HOGDescriptor::gammaCorrection 577 private static native boolean get_gammaCorrection_0(long nativeObj); 578 579 // C++: vector_float HOGDescriptor::svmDetector 580 private static native long get_svmDetector_0(long nativeObj); 581 582 // C++: int HOGDescriptor::nlevels 583 private static native int get_nlevels_0(long nativeObj); 584 585 // C++: bool HOGDescriptor::signedGradient 586 private static native boolean get_signedGradient_0(long nativeObj); 587 588 // native support for java finalize() 589 private static native void delete(long nativeObj); 590 591}