From 53433884ee9b060406aa5e365f00806b07907a8a Mon Sep 17 00:00:00 2001 From: "marina.kolpakova" Date: Wed, 16 Jan 2013 14:04:32 +0400 Subject: [PATCH] fix python wrapping --- modules/objdetect/include/opencv2/objdetect/objdetect.hpp | 2 +- modules/objdetect/src/softcascade.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/objdetect/include/opencv2/objdetect/objdetect.hpp b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp index 79b9ea3f05..986c4f6d85 100644 --- a/modules/objdetect/include/opencv2/objdetect/objdetect.hpp +++ b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp @@ -561,7 +561,7 @@ public: virtual void detect(InputArray image, InputArray rois, std::vector& objects) const; // Param rects is an output array of bounding rectangles for detected objects. // Param confs is an output array of confidence for detected objects. i-th bounding rectangle corresponds i-th configence. - CV_WRAP virtual void detect(InputArray image, InputArray rois, OutputArray rects, OutputArray confs) const; + CV_WRAP virtual void detect(InputArray image, InputArray rois, CV_OUT OutputArray rects, CV_OUT OutputArray confs) const; private: void detectNoRoi(const Mat& image, std::vector& objects) const; diff --git a/modules/objdetect/src/softcascade.cpp b/modules/objdetect/src/softcascade.cpp index 2a6ed8d6e4..8ce247c93a 100644 --- a/modules/objdetect/src/softcascade.cpp +++ b/modules/objdetect/src/softcascade.cpp @@ -525,7 +525,7 @@ void cv::SCascade::detect(cv::InputArray _image, cv::InputArray _rois, std::vect objects.clear(); - if (_rois.kind() == cv::_InputArray::NONE) + if (_rois.empty()) return detectNoRoi(image, objects); int shr = fld.shrinkage; @@ -577,7 +577,7 @@ void cv::SCascade::detect(InputArray _image, InputArray _rois, OutputArray _rec _confs.create(1, objects.size(), CV_32F); cv::Mat confs = _confs.getMat(); - float* confPtr = rects.ptr(0); + float* confPtr = confs.ptr(0); typedef std::vector::const_iterator IDet;