Skip to content

Commit

Permalink
wrap cv.HOGDescriptor.detectMultiScale
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Mar 19, 2023
1 parent 28fb5ea commit cfd7c24
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Objdetect/classes.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
(
['CascadeClassifier',[],'@brief Cascade classifier class for object detection.',0,'cv::CascadeClassifier',[],''],
['HOGDescriptor',[],'@brief Implementation of HOG (Histogram of Oriented Gradients) descriptor and object detector.
the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs @cite Dalal2005 .
useful links:
https://hal.inria.fr/inria-00548512/document/
https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients
https://software.intel.com/en-us/ipp-dev-reference-histogram-of-oriented-gradients-hog-descriptor
http://www.learnopencv.com/histogram-of-oriented-gradients
http://www.learnopencv.com/handwritten-digits-classification-an-opencv-c-python-tutorial',0,'cv::HOGDescriptor',[],'@brief Creates the HOG descriptor and detector with default params.
aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )'],
['QRCodeDetector',[],'@brief Groups the object candidate rectangles.
@param rectList Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.)
@param weights Input/output vector of weights of rectangles. Output vector includes weights of retained and grouped rectangles. (The Python list is not modified in place.)
Expand Down
13 changes: 13 additions & 0 deletions Objdetect/funclist.pl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@
@param filename Name of the file from which the classifier is loaded. The file may contain an old
HAAR classifier trained by the haartraining application or a new cascade classifier trained by the
traincascade application.',1,'bool',['String','filename','',['/C','/Ref']]],
['HOGDescriptor','detectMultiScale','@brief Detects objects of different sizes in the input image. The detected objects are returned as a list
of rectangles.
@param img Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
@param foundLocations Vector of rectangles where each rectangle contains the detected object.
@param foundWeights Vector that will contain confidence values for each detected object.
@param hitThreshold Threshold for the distance between features and SVM classifying plane.
Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
But if the free coefficient is omitted (which is allowed), you can specify it manually here.
@param winStride Window stride. It must be a multiple of block stride.
@param padding Padding
@param scale Coefficient of the detection window increase.
@param finalThreshold Final threshold
@param useMeanshiftGrouping indicates grouping algorithm',1,'void',['Mat','img','',[]],['vector_Rect','foundLocations','',['/O','/Ref']],['vector_double','foundWeights','',['/O','/Ref']],['double','hitThreshold','0',[]],['Size','winStride','Size()',[]],['Size','padding','Size()',[]],['double','scale','1.05',[]],['double','finalThreshold','2.0',[]],['bool','useMeanshiftGrouping','false',[]]],
['QRCodeDetector','detectAndDecodeMulti','@brief Both detects and decodes QR codes
@param img grayscale or color (BGR) image containing QR codes.
@param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
Expand Down
4 changes: 3 additions & 1 deletion maint/genlists
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ my %force = map +($_=>1), qw(
cv.groupRectangles
cv.CascadeClassifier.load
cv.CascadeClassifier.detectMultiScale
cv.HOGDescriptor.detectMultiScale
cv.Tracker.init
cv.Tracker.update
);
my %class = map +($_=>1), qw(
LineSegmentDetector Tracker VideoCapture VideoWriter QRCodeDetector
CascadeClassifier Subdiv2D TrackerKCF TrackerCSRT TrackerMIL
FileNode FileStorage DMatch KeyPoint Algorithm CLAHE GeneralizedHough
HOGDescriptor
);
my $no_want = qr/^(TermCriteria|RNG|RotatedRect)/;

Expand All @@ -114,7 +116,7 @@ print "enum: $name\n";
$pname =~ s#\.#::#g;
push @{$dest2enums{$dest}}, $pname;
}
} elsif ($name =~ /^class cv\.(.*)/) {
} elsif ($name =~ /^(?:class|struct) cv\.(.*)/) {
my $cname = $1;
next if !$class{$cname};
$ret =~ s/^:\s*//;
Expand Down

0 comments on commit cfd7c24

Please sign in to comment.