1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Instrumentation for OpenCV API regions and IPP functions;

This commit is contained in:
Pavel Vlasov
2016-08-18 09:53:00 +03:00
parent 680ca88ce0
commit 30a6cee2fe
133 changed files with 1691 additions and 456 deletions
+20
View File
@@ -236,6 +236,8 @@ inline float32x4_t vsetq_f32(float f0, float f1, float f2, float f3)
void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
Size paddingTL, Size paddingBR) const
{
CV_INSTRUMENT_REGION()
CV_Assert( img.type() == CV_8U || img.type() == CV_8UC3 );
Size gradsize(img.cols + paddingTL.width + paddingBR.width,
@@ -1582,6 +1584,8 @@ static bool ocl_compute(InputArray _img, Size win_stride, std::vector<float>& _d
void HOGDescriptor::compute(InputArray _img, std::vector<float>& descriptors,
Size winStride, Size padding, const std::vector<Point>& locations) const
{
CV_INSTRUMENT_REGION()
if( winStride == Size() )
winStride = cellSize;
Size cacheStride(gcd(winStride.width, blockStride.width),
@@ -1647,6 +1651,8 @@ void HOGDescriptor::detect(const Mat& img,
std::vector<Point>& hits, std::vector<double>& weights, double hitThreshold,
Size winStride, Size padding, const std::vector<Point>& locations) const
{
CV_INSTRUMENT_REGION()
hits.clear();
weights.clear();
if( svmDetector.empty() )
@@ -1758,6 +1764,8 @@ void HOGDescriptor::detect(const Mat& img,
void HOGDescriptor::detect(const Mat& img, std::vector<Point>& hits, double hitThreshold,
Size winStride, Size padding, const std::vector<Point>& locations) const
{
CV_INSTRUMENT_REGION()
std::vector<double> weightsV;
detect(img, hits, weightsV, hitThreshold, winStride, padding, locations);
}
@@ -2040,6 +2048,8 @@ void HOGDescriptor::detectMultiScale(
double hitThreshold, Size winStride, Size padding,
double scale0, double finalThreshold, bool useMeanshiftGrouping) const
{
CV_INSTRUMENT_REGION()
double scale = 1.;
int levels = 0;
@@ -2093,6 +2103,8 @@ void HOGDescriptor::detectMultiScale(InputArray img, std::vector<Rect>& foundLoc
double hitThreshold, Size winStride, Size padding,
double scale0, double finalThreshold, bool useMeanshiftGrouping) const
{
CV_INSTRUMENT_REGION()
std::vector<double> foundWeights;
detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride,
padding, scale0, finalThreshold, useMeanshiftGrouping);
@@ -3489,6 +3501,8 @@ public:
void operator()( const Range& range ) const
{
CV_INSTRUMENT_REGION()
int i, i1 = range.start, i2 = range.end;
Size maxSz(cvCeil(img.cols/(*locations)[0].scale), cvCeil(img.rows/(*locations)[0].scale));
@@ -3531,6 +3545,8 @@ void HOGDescriptor::detectROI(const cv::Mat& img, const std::vector<cv::Point> &
CV_OUT std::vector<cv::Point>& foundLocations, CV_OUT std::vector<double>& confidences,
double hitThreshold, cv::Size winStride, cv::Size padding) const
{
CV_INSTRUMENT_REGION()
foundLocations.clear();
confidences.clear();
@@ -3641,6 +3657,8 @@ void HOGDescriptor::detectMultiScaleROI(const cv::Mat& img,
CV_OUT std::vector<cv::Rect>& foundLocations, std::vector<DetectionROI>& locations,
double hitThreshold, int groupThreshold) const
{
CV_INSTRUMENT_REGION()
std::vector<Rect> allCandidates;
Mutex mtx;
@@ -3747,6 +3765,8 @@ void HOGDescriptor::readALTModel(String modelfile)
void HOGDescriptor::groupRectangles(std::vector<cv::Rect>& rectList, std::vector<double>& weights, int groupThreshold, double eps) const
{
CV_INSTRUMENT_REGION()
if( groupThreshold <= 0 || rectList.empty() )
{
return;