1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33: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
+22 -1
View File
@@ -1188,6 +1188,8 @@ public:
virtual void operator() (const Range & range) const
{
CV_INSTRUMENT_REGION_IPP()
Ipp32s levelNum = histSize + 1;
Mat phist(hist->size(), hist->type(), Scalar::all(0));
#if IPP_VERSION_X100 >= 900
@@ -1226,7 +1228,7 @@ public:
return;
}
IppStatus status = ippiHistogram_8u_C1R(src->ptr(range.start), (int)src->step, ippiSize(src->cols, range.end - range.start),
IppStatus status = CV_INSTRUMENT_FUN_IPP(ippiHistogram_8u_C1R, src->ptr(range.start), (int)src->step, ippiSize(src->cols, range.end - range.start),
phist.ptr<Ipp32u>(), pSpec, pBuffer);
if(pSpec) ippFree(pSpec);
@@ -1269,6 +1271,8 @@ static bool ipp_calchist(const Mat* images, int nimages, const int* channels,
InputArray _mask, OutputArray _hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate )
{
CV_INSTRUMENT_REGION_IPP()
Mat mask = _mask.getMat();
CV_Assert(dims > 0 && histSize);
@@ -1311,6 +1315,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
InputArray _mask, OutputArray _hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate )
{
CV_INSTRUMENT_REGION()
CV_IPP_RUN(nimages == 1 && images[0].type() == CV_8UC1 && dims == 1 && channels &&
channels[0] == 0 && _mask.getMat().empty() && images[0].dims <= 2 &&
@@ -1602,6 +1607,8 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
InputArray _mask, SparseMat& hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate )
{
CV_INSTRUMENT_REGION()
Mat mask = _mask.getMat();
calcHist( images, nimages, channels, mask, hist, dims, histSize,
ranges, uniform, accumulate, false );
@@ -1614,6 +1621,8 @@ void cv::calcHist( InputArrayOfArrays images, const std::vector<int>& channels,
const std::vector<float>& ranges,
bool accumulate )
{
CV_INSTRUMENT_REGION()
CV_OCL_RUN(images.total() == 1 && channels.size() == 1 && images.channels(0) == 1 &&
channels[0] == 0 && images.isUMatVector() && mask.empty() && !accumulate &&
histSize.size() == 1 && histSize[0] == BINS && ranges.size() == 2 &&
@@ -1941,6 +1950,8 @@ void cv::calcBackProject( const Mat* images, int nimages, const int* channels,
InputArray _hist, OutputArray _backProject,
const float** ranges, double scale, bool uniform )
{
CV_INSTRUMENT_REGION()
Mat hist = _hist.getMat();
std::vector<uchar*> ptrs;
std::vector<int> deltas;
@@ -2104,6 +2115,8 @@ void cv::calcBackProject( const Mat* images, int nimages, const int* channels,
const SparseMat& hist, OutputArray _backProject,
const float** ranges, double scale, bool uniform )
{
CV_INSTRUMENT_REGION()
std::vector<uchar*> ptrs;
std::vector<int> deltas;
std::vector<double> uniranges;
@@ -2283,6 +2296,8 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha
const std::vector<float>& ranges,
double scale )
{
CV_INSTRUMENT_REGION()
#ifdef HAVE_OPENCL
Size histSize = hist.size();
bool _1D = histSize.height == 1 || histSize.width == 1;
@@ -2335,6 +2350,8 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha
double cv::compareHist( InputArray _H1, InputArray _H2, int method )
{
CV_INSTRUMENT_REGION()
Mat H1 = _H1.getMat(), H2 = _H2.getMat();
const Mat* arrays[] = {&H1, &H2, 0};
Mat planes[2];
@@ -2541,6 +2558,8 @@ double cv::compareHist( InputArray _H1, InputArray _H2, int method )
double cv::compareHist( const SparseMat& H1, const SparseMat& H2, int method )
{
CV_INSTRUMENT_REGION()
double result = 0;
int i, dims = H1.dims();
@@ -3685,6 +3704,8 @@ static bool ocl_equalizeHist(InputArray _src, OutputArray _dst)
void cv::equalizeHist( InputArray _src, OutputArray _dst )
{
CV_INSTRUMENT_REGION()
CV_Assert( _src.type() == CV_8UC1 );
if (_src.empty())