fixed HOGDescriptor::detect and HOGDescriptor::detectMultiScale signatures (ticket...
authorVadim Pisarevsky <no@email>
Thu, 29 Mar 2012 17:18:38 +0000 (17:18 +0000)
committerVadim Pisarevsky <no@email>
Thu, 29 Mar 2012 17:18:38 +0000 (17:18 +0000)
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
samples/python2/peopledetect.py

index e7ce46f..e21573a 100644 (file)
@@ -546,22 +546,22 @@ public:
                          const vector<Point>& locations=vector<Point>()) const;
        //with found weights output
     CV_WRAP virtual void detect(const Mat& img, CV_OUT vector<Point>& foundLocations, 
-                                               vector<double>& weights,
+                                               CV_OUT vector<double>& weights,
                         double hitThreshold=0, Size winStride=Size(), 
                                                Size padding=Size(),
                         const vector<Point>& searchLocations=vector<Point>()) const;
        //without found weights output
-    CV_WRAP virtual void detect(const Mat& img, CV_OUT vector<Point>& foundLocations,
+    virtual void detect(const Mat& img, CV_OUT vector<Point>& foundLocations,
                         double hitThreshold=0, Size winStride=Size(),
                         Size padding=Size(),
                         const vector<Point>& searchLocations=vector<Point>()) const;
        //with result weights output
     CV_WRAP virtual void detectMultiScale(const Mat& img, CV_OUT vector<Rect>& foundLocations, 
-                                                                 vector<double>& foundWeights, double hitThreshold=0, 
+                                                                 CV_OUT vector<double>& foundWeights, double hitThreshold=0, 
                                                                  Size winStride=Size(), Size padding=Size(), double scale=1.05, 
                                                                  double finalThreshold=2.0,bool useMeanshiftGrouping = false) const;
        //without found weights output
-       CV_WRAP virtual void detectMultiScale(const Mat& img, CV_OUT vector<Rect>& foundLocations, 
+       virtual void detectMultiScale(const Mat& img, CV_OUT vector<Rect>& foundLocations, 
                                                                  double hitThreshold=0, Size winStride=Size(),
                                   Size padding=Size(), double scale=1.05, 
                                                                  double finalThreshold=2.0, bool useMeanshiftGrouping = false) const;
index 5c038bf..7efd1d0 100644 (file)
@@ -38,7 +38,7 @@ if __name__ == '__main__':
             print 'loading error'\r
             continue\r
 \r
-        found = hog.detectMultiScale(img, winStride=(8,8), padding=(32,32), scale=1.05)\r
+        found, w = hog.detectMultiScale(img, winStride=(8,8), padding=(32,32), scale=1.05)\r
         found_filtered = []\r
         for ri, r in enumerate(found):\r
             for qi, q in enumerate(found):\r