Merge pull request #12530 from cv3d:lint/instrument_semicolon

This commit is contained in:
Alexander Alekhin 2018-09-14 08:57:31 +00:00
commit 65e2961fee
161 changed files with 695 additions and 695 deletions

View File

@ -297,7 +297,7 @@ int ap3p::computePoses(const double featureVectors[3][3],
} }
bool ap3p::solve(cv::Mat &R, cv::Mat &tvec, const cv::Mat &opoints, const cv::Mat &ipoints) { bool ap3p::solve(cv::Mat &R, cv::Mat &tvec, const cv::Mat &opoints, const cv::Mat &ipoints) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double rotation_matrix[3][3], translation[3]; double rotation_matrix[3][3], translation[3];
std::vector<double> points; std::vector<double> points;
@ -321,7 +321,7 @@ bool ap3p::solve(cv::Mat &R, cv::Mat &tvec, const cv::Mat &opoints, const cv::Ma
} }
int ap3p::solve(std::vector<cv::Mat> &Rs, std::vector<cv::Mat> &tvecs, const cv::Mat &opoints, const cv::Mat &ipoints) { int ap3p::solve(std::vector<cv::Mat> &Rs, std::vector<cv::Mat> &tvecs, const cv::Mat &opoints, const cv::Mat &ipoints) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double rotation_matrix[4][3][3], translation[4][3]; double rotation_matrix[4][3][3], translation[4][3];
std::vector<double> points; std::vector<double> points;

View File

@ -485,7 +485,7 @@ static void icvBinarizationHistogramBased(Mat & img)
bool findChessboardCorners(InputArray image_, Size pattern_size, bool findChessboardCorners(InputArray image_, Size pattern_size,
OutputArray corners_, int flags) OutputArray corners_, int flags)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
DPRINTF("==== findChessboardCorners(img=%dx%d, pattern=%dx%d, flags=%d)", DPRINTF("==== findChessboardCorners(img=%dx%d, pattern=%dx%d, flags=%d)",
image_.cols(), image_.rows(), pattern_size.width, pattern_size.height, flags); image_.cols(), image_.rows(), pattern_size.width, pattern_size.height, flags);
@ -2193,7 +2193,7 @@ bool findCirclesGrid2(InputArray _image, Size patternSize,
OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector, OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector,
CirclesGridFinderParameters2 parameters) CirclesGridFinderParameters2 parameters)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool isAsymmetricGrid = (flags & CALIB_CB_ASYMMETRIC_GRID) ? true : false; bool isAsymmetricGrid = (flags & CALIB_CB_ASYMMETRIC_GRID) ? true : false;
bool isSymmetricGrid = (flags & CALIB_CB_SYMMETRIC_GRID ) ? true : false; bool isSymmetricGrid = (flags & CALIB_CB_SYMMETRIC_GRID ) ? true : false;

View File

@ -2795,7 +2795,7 @@ void cv::reprojectImageTo3D( InputArray _disparity,
OutputArray __3dImage, InputArray _Qmat, OutputArray __3dImage, InputArray _Qmat,
bool handleMissingValues, int dtype ) bool handleMissingValues, int dtype )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat disparity = _disparity.getMat(), Q = _Qmat.getMat(); Mat disparity = _disparity.getMat(), Q = _Qmat.getMat();
int stype = disparity.type(); int stype = disparity.type();
@ -3225,7 +3225,7 @@ static Mat prepareDistCoeffs(Mat& distCoeffs0, int rtype, int outputSize = 14)
void cv::Rodrigues(InputArray _src, OutputArray _dst, OutputArray _jacobian) void cv::Rodrigues(InputArray _src, OutputArray _dst, OutputArray _jacobian)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
bool v2m = src.cols == 1 || src.rows == 1; bool v2m = src.cols == 1 || src.rows == 1;
@ -3245,7 +3245,7 @@ void cv::Rodrigues(InputArray _src, OutputArray _dst, OutputArray _jacobian)
void cv::matMulDeriv( InputArray _Amat, InputArray _Bmat, void cv::matMulDeriv( InputArray _Amat, InputArray _Bmat,
OutputArray _dABdA, OutputArray _dABdB ) OutputArray _dABdA, OutputArray _dABdB )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat A = _Amat.getMat(), B = _Bmat.getMat(); Mat A = _Amat.getMat(), B = _Bmat.getMat();
_dABdA.create(A.rows*B.cols, A.rows*A.cols, A.type()); _dABdA.create(A.rows*B.cols, A.rows*A.cols, A.type());
@ -3350,7 +3350,7 @@ cv::Mat cv::initCameraMatrix2D( InputArrayOfArrays objectPoints,
InputArrayOfArrays imagePoints, InputArrayOfArrays imagePoints,
Size imageSize, double aspectRatio ) Size imageSize, double aspectRatio )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat objPt, imgPt, npoints, cameraMatrix(3, 3, CV_64F); Mat objPt, imgPt, npoints, cameraMatrix(3, 3, CV_64F);
collectCalibrationData( objectPoints, imagePoints, noArray(), collectCalibrationData( objectPoints, imagePoints, noArray(),
@ -3368,7 +3368,7 @@ double cv::calibrateCamera( InputArrayOfArrays _objectPoints,
Size imageSize, InputOutputArray _cameraMatrix, InputOutputArray _distCoeffs, Size imageSize, InputOutputArray _cameraMatrix, InputOutputArray _distCoeffs,
OutputArrayOfArrays _rvecs, OutputArrayOfArrays _tvecs, int flags, TermCriteria criteria ) OutputArrayOfArrays _rvecs, OutputArrayOfArrays _tvecs, int flags, TermCriteria criteria )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return calibrateCamera(_objectPoints, _imagePoints, imageSize, _cameraMatrix, _distCoeffs, return calibrateCamera(_objectPoints, _imagePoints, imageSize, _cameraMatrix, _distCoeffs,
_rvecs, _tvecs, noArray(), noArray(), noArray(), flags, criteria); _rvecs, _tvecs, noArray(), noArray(), noArray(), flags, criteria);
@ -3382,7 +3382,7 @@ double cv::calibrateCamera(InputArrayOfArrays _objectPoints,
OutputArray stdDeviationsExtrinsics, OutputArray stdDeviationsExtrinsics,
OutputArray _perViewErrors, int flags, TermCriteria criteria ) OutputArray _perViewErrors, int flags, TermCriteria criteria )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int rtype = CV_64F; int rtype = CV_64F;
Mat cameraMatrix = _cameraMatrix.getMat(); Mat cameraMatrix = _cameraMatrix.getMat();
@ -3496,7 +3496,7 @@ void cv::calibrationMatrixValues( InputArray _cameraMatrix, Size imageSize,
double& fovx, double& fovy, double& focalLength, double& fovx, double& fovy, double& focalLength,
Point2d& principalPoint, double& aspectRatio ) Point2d& principalPoint, double& aspectRatio )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(_cameraMatrix.size() != Size(3, 3)) if(_cameraMatrix.size() != Size(3, 3))
CV_Error(CV_StsUnmatchedSizes, "Size of cameraMatrix must be 3x3!"); CV_Error(CV_StsUnmatchedSizes, "Size of cameraMatrix must be 3x3!");
@ -3675,7 +3675,7 @@ bool cv::stereoRectifyUncalibrated( InputArray _points1, InputArray _points2,
InputArray _Fmat, Size imgSize, InputArray _Fmat, Size imgSize,
OutputArray _Hmat1, OutputArray _Hmat2, double threshold ) OutputArray _Hmat1, OutputArray _Hmat2, double threshold )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int rtype = CV_64F; int rtype = CV_64F;
_Hmat1.create(3, 3, rtype); _Hmat1.create(3, 3, rtype);
@ -3695,7 +3695,7 @@ cv::Mat cv::getOptimalNewCameraMatrix( InputArray _cameraMatrix,
Size imgSize, double alpha, Size newImgSize, Size imgSize, double alpha, Size newImgSize,
Rect* validPixROI, bool centerPrincipalPoint ) Rect* validPixROI, bool centerPrincipalPoint )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat cameraMatrix = _cameraMatrix.getMat(), distCoeffs = _distCoeffs.getMat(); Mat cameraMatrix = _cameraMatrix.getMat(), distCoeffs = _distCoeffs.getMat();
CvMat c_cameraMatrix = cvMat(cameraMatrix), c_distCoeffs = cvMat(distCoeffs); CvMat c_cameraMatrix = cvMat(cameraMatrix), c_distCoeffs = cvMat(distCoeffs);
@ -3717,7 +3717,7 @@ cv::Vec3d cv::RQDecomp3x3( InputArray _Mmat,
OutputArray _Qy, OutputArray _Qy,
OutputArray _Qz ) OutputArray _Qz )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat M = _Mmat.getMat(); Mat M = _Mmat.getMat();
_Rmat.create(3, 3, M.type()); _Rmat.create(3, 3, M.type());
@ -3751,7 +3751,7 @@ void cv::decomposeProjectionMatrix( InputArray _projMatrix, OutputArray _cameraM
OutputArray _rotMatrixX, OutputArray _rotMatrixY, OutputArray _rotMatrixX, OutputArray _rotMatrixY,
OutputArray _rotMatrixZ, OutputArray _eulerAngles ) OutputArray _rotMatrixZ, OutputArray _eulerAngles )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat projMatrix = _projMatrix.getMat(); Mat projMatrix = _projMatrix.getMat();
int type = projMatrix.type(); int type = projMatrix.type();

View File

@ -63,7 +63,7 @@ namespace cv { namespace
void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, const Affine3d& affine, void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, const Affine3d& affine,
InputArray K, InputArray D, double alpha, OutputArray jacobian) InputArray K, InputArray D, double alpha, OutputArray jacobian)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
projectPoints(objectPoints, imagePoints, affine.rvec(), affine.translation(), K, D, alpha, jacobian); projectPoints(objectPoints, imagePoints, affine.rvec(), affine.translation(), K, D, alpha, jacobian);
} }
@ -71,7 +71,7 @@ void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints
void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, InputArray _rvec, void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, InputArray _rvec,
InputArray _tvec, InputArray _K, InputArray _D, double alpha, OutputArray jacobian) InputArray _tvec, InputArray _K, InputArray _D, double alpha, OutputArray jacobian)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
// will support only 3-channel data now for points // will support only 3-channel data now for points
CV_Assert(objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3); CV_Assert(objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3);
@ -255,7 +255,7 @@ void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints
void cv::fisheye::distortPoints(InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha) void cv::fisheye::distortPoints(InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
// will support only 2-channel data now for points // will support only 2-channel data now for points
CV_Assert(undistorted.type() == CV_32FC2 || undistorted.type() == CV_64FC2); CV_Assert(undistorted.type() == CV_32FC2 || undistorted.type() == CV_64FC2);
@ -319,7 +319,7 @@ void cv::fisheye::distortPoints(InputArray undistorted, OutputArray distorted, I
void cv::fisheye::undistortPoints( InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray R, InputArray P) void cv::fisheye::undistortPoints( InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray R, InputArray P)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
// will support only 2-channel data now for points // will support only 2-channel data now for points
CV_Assert(distorted.type() == CV_32FC2 || distorted.type() == CV_64FC2); CV_Assert(distorted.type() == CV_32FC2 || distorted.type() == CV_64FC2);
@ -425,7 +425,7 @@ void cv::fisheye::undistortPoints( InputArray distorted, OutputArray undistorted
void cv::fisheye::initUndistortRectifyMap( InputArray K, InputArray D, InputArray R, InputArray P, void cv::fisheye::initUndistortRectifyMap( InputArray K, InputArray D, InputArray R, InputArray P,
const cv::Size& size, int m1type, OutputArray map1, OutputArray map2 ) const cv::Size& size, int m1type, OutputArray map1, OutputArray map2 )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( m1type == CV_16SC2 || m1type == CV_32F || m1type <=0 ); CV_Assert( m1type == CV_16SC2 || m1type == CV_32F || m1type <=0 );
map1.create( size, m1type <= 0 ? CV_16SC2 : m1type ); map1.create( size, m1type <= 0 ? CV_16SC2 : m1type );
@ -532,7 +532,7 @@ void cv::fisheye::initUndistortRectifyMap( InputArray K, InputArray D, InputArra
void cv::fisheye::undistortImage(InputArray distorted, OutputArray undistorted, void cv::fisheye::undistortImage(InputArray distorted, OutputArray undistorted,
InputArray K, InputArray D, InputArray Knew, const Size& new_size) InputArray K, InputArray D, InputArray Knew, const Size& new_size)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Size size = new_size.area() != 0 ? new_size : distorted.size(); Size size = new_size.area() != 0 ? new_size : distorted.size();
@ -548,7 +548,7 @@ void cv::fisheye::undistortImage(InputArray distorted, OutputArray undistorted,
void cv::fisheye::estimateNewCameraMatrixForUndistortRectify(InputArray K, InputArray D, const Size &image_size, InputArray R, void cv::fisheye::estimateNewCameraMatrixForUndistortRectify(InputArray K, InputArray D, const Size &image_size, InputArray R,
OutputArray P, double balance, const Size& new_size, double fov_scale) OutputArray P, double balance, const Size& new_size, double fov_scale)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( K.size() == Size(3, 3) && (K.depth() == CV_32F || K.depth() == CV_64F)); CV_Assert( K.size() == Size(3, 3) && (K.depth() == CV_32F || K.depth() == CV_64F));
CV_Assert(D.empty() || ((D.total() == 4) && (D.depth() == CV_32F || D.depth() == CV_64F))); CV_Assert(D.empty() || ((D.total() == 4) && (D.depth() == CV_32F || D.depth() == CV_64F)));
@ -623,7 +623,7 @@ void cv::fisheye::stereoRectify( InputArray K1, InputArray D1, InputArray K2, In
InputArray _R, InputArray _tvec, OutputArray R1, OutputArray R2, OutputArray P1, OutputArray P2, InputArray _R, InputArray _tvec, OutputArray R1, OutputArray R2, OutputArray P1, OutputArray P2,
OutputArray Q, int flags, const Size& newImageSize, double balance, double fov_scale) OutputArray Q, int flags, const Size& newImageSize, double balance, double fov_scale)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert((_R.size() == Size(3, 3) || _R.total() * _R.channels() == 3) && (_R.depth() == CV_32F || _R.depth() == CV_64F)); CV_Assert((_R.size() == Size(3, 3) || _R.total() * _R.channels() == 3) && (_R.depth() == CV_32F || _R.depth() == CV_64F));
CV_Assert(_tvec.total() * _tvec.channels() == 3 && (_tvec.depth() == CV_32F || _tvec.depth() == CV_64F)); CV_Assert(_tvec.total() * _tvec.channels() == 3 && (_tvec.depth() == CV_32F || _tvec.depth() == CV_64F));
@ -707,7 +707,7 @@ double cv::fisheye::calibrate(InputArrayOfArrays objectPoints, InputArrayOfArray
InputOutputArray K, InputOutputArray D, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, InputOutputArray K, InputOutputArray D, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs,
int flags , cv::TermCriteria criteria) int flags , cv::TermCriteria criteria)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(!objectPoints.empty() && !imagePoints.empty() && objectPoints.total() == imagePoints.total()); CV_Assert(!objectPoints.empty() && !imagePoints.empty() && objectPoints.total() == imagePoints.total());
CV_Assert(objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3); CV_Assert(objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3);
@ -846,7 +846,7 @@ double cv::fisheye::stereoCalibrate(InputArrayOfArrays objectPoints, InputArrayO
InputOutputArray K1, InputOutputArray D1, InputOutputArray K2, InputOutputArray D2, Size imageSize, InputOutputArray K1, InputOutputArray D1, InputOutputArray K2, InputOutputArray D2, Size imageSize,
OutputArray R, OutputArray T, int flags, TermCriteria criteria) OutputArray R, OutputArray T, int flags, TermCriteria criteria)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(!objectPoints.empty() && !imagePoints1.empty() && !imagePoints2.empty()); CV_Assert(!objectPoints.empty() && !imagePoints1.empty() && !imagePoints2.empty());
CV_Assert(objectPoints.total() == imagePoints1.total() || imagePoints1.total() == imagePoints2.total()); CV_Assert(objectPoints.total() == imagePoints1.total() || imagePoints1.total() == imagePoints2.total());
@ -1172,7 +1172,7 @@ void cv::internal::projectPoints(cv::InputArray objectPoints, cv::OutputArray im
cv::InputArray _rvec,cv::InputArray _tvec, cv::InputArray _rvec,cv::InputArray _tvec,
const IntrinsicParams& param, cv::OutputArray jacobian) const IntrinsicParams& param, cv::OutputArray jacobian)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(!objectPoints.empty() && (objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3)); CV_Assert(!objectPoints.empty() && (objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3));
Matx33d K(param.f[0], param.f[0] * param.alpha, param.c[0], Matx33d K(param.f[0], param.f[0] * param.alpha, param.c[0],
@ -1227,7 +1227,7 @@ void cv::internal::ComputeExtrinsicRefine(const Mat& imagePoints, const Mat& obj
cv::Mat cv::internal::ComputeHomography(Mat m, Mat M) cv::Mat cv::internal::ComputeHomography(Mat m, Mat M)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int Np = m.cols; int Np = m.cols;
@ -1328,7 +1328,7 @@ cv::Mat cv::internal::ComputeHomography(Mat m, Mat M)
cv::Mat cv::internal::NormalizePixels(const Mat& imagePoints, const IntrinsicParams& param) cv::Mat cv::internal::NormalizePixels(const Mat& imagePoints, const IntrinsicParams& param)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(!imagePoints.empty() && imagePoints.type() == CV_64FC2); CV_Assert(!imagePoints.empty() && imagePoints.type() == CV_64FC2);

View File

@ -405,7 +405,7 @@ protected:
cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArray _cameraMatrix, cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArray _cameraMatrix,
int method, double prob, double threshold, OutputArray _mask) int method, double prob, double threshold, OutputArray _mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat points1, points2, cameraMatrix; Mat points1, points2, cameraMatrix;
_points1.getMat().convertTo(points1, CV_64F); _points1.getMat().convertTo(points1, CV_64F);
@ -452,7 +452,7 @@ cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArr
cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, double focal, Point2d pp, cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, double focal, Point2d pp,
int method, double prob, double threshold, OutputArray _mask) int method, double prob, double threshold, OutputArray _mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat cameraMatrix = (Mat_<double>(3,3) << focal, 0, pp.x, 0, focal, pp.y, 0, 0, 1); Mat cameraMatrix = (Mat_<double>(3,3) << focal, 0, pp.x, 0, focal, pp.y, 0, 0, 1);
return cv::findEssentialMat(_points1, _points2, cameraMatrix, method, prob, threshold, _mask); return cv::findEssentialMat(_points1, _points2, cameraMatrix, method, prob, threshold, _mask);
@ -462,7 +462,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2,
InputArray _cameraMatrix, OutputArray _R, OutputArray _t, double distanceThresh, InputArray _cameraMatrix, OutputArray _R, OutputArray _t, double distanceThresh,
InputOutputArray _mask, OutputArray triangulatedPoints) InputOutputArray _mask, OutputArray triangulatedPoints)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat points1, points2, cameraMatrix; Mat points1, points2, cameraMatrix;
_points1.getMat().convertTo(points1, CV_64F); _points1.getMat().convertTo(points1, CV_64F);
@ -642,7 +642,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
void cv::decomposeEssentialMat( InputArray _E, OutputArray _R1, OutputArray _R2, OutputArray _t ) void cv::decomposeEssentialMat( InputArray _E, OutputArray _R1, OutputArray _R2, OutputArray _t )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat E = _E.getMat().reshape(1, 3); Mat E = _E.getMat().reshape(1, 3);
CV_Assert(E.cols == 3 && E.rows == 3); CV_Assert(E.cols == 3 && E.rows == 3);

View File

@ -351,7 +351,7 @@ cv::Mat cv::findHomography( InputArray _points1, InputArray _points2,
int method, double ransacReprojThreshold, OutputArray _mask, int method, double ransacReprojThreshold, OutputArray _mask,
const int maxIters, const double confidence) const int maxIters, const double confidence)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const double defaultRANSACReprojThreshold = 3; const double defaultRANSACReprojThreshold = 3;
bool result = false; bool result = false;
@ -764,7 +764,7 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
int method, double ransacReprojThreshold, double confidence, int method, double ransacReprojThreshold, double confidence,
OutputArray _mask ) OutputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat points1 = _points1.getMat(), points2 = _points2.getMat(); Mat points1 = _points1.getMat(), points2 = _points2.getMat();
Mat m1, m2, F; Mat m1, m2, F;
@ -836,7 +836,7 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
void cv::computeCorrespondEpilines( InputArray _points, int whichImage, void cv::computeCorrespondEpilines( InputArray _points, int whichImage,
InputArray _Fmat, OutputArray _lines ) InputArray _Fmat, OutputArray _lines )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double f[9] = {0}; double f[9] = {0};
Mat tempF(3, 3, CV_64F, f); Mat tempF(3, 3, CV_64F, f);
@ -911,7 +911,7 @@ void cv::computeCorrespondEpilines( InputArray _points, int whichImage,
void cv::convertPointsFromHomogeneous( InputArray _src, OutputArray _dst ) void cv::convertPointsFromHomogeneous( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
if( !src.isContinuous() ) if( !src.isContinuous() )
@ -1012,7 +1012,7 @@ void cv::convertPointsFromHomogeneous( InputArray _src, OutputArray _dst )
void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst ) void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
if( !src.isContinuous() ) if( !src.isContinuous() )
@ -1095,7 +1095,7 @@ void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst )
void cv::convertPointsHomogeneous( InputArray _src, OutputArray _dst ) void cv::convertPointsHomogeneous( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), dtype = _dst.type(); int stype = _src.type(), dtype = _dst.type();
CV_Assert( _dst.fixedType() ); CV_Assert( _dst.fixedType() );
@ -1108,7 +1108,7 @@ void cv::convertPointsHomogeneous( InputArray _src, OutputArray _dst )
double cv::sampsonDistance(InputArray _pt1, InputArray _pt2, InputArray _F) double cv::sampsonDistance(InputArray _pt1, InputArray _pt2, InputArray _F)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(_pt1.type() == CV_64F && _pt2.type() == CV_64F && _F.type() == CV_64F); CV_Assert(_pt1.type() == CV_64F && _pt2.type() == CV_64F && _F.type() == CV_64F);
CV_DbgAssert(_pt1.rows() == 3 && _F.size() == Size(3, 3) && _pt1.rows() == _pt2.rows()); CV_DbgAssert(_pt1.rows() == 3 && _F.size() == Size(3, 3) && _pt1.rows() == _pt2.rows());

View File

@ -33,7 +33,7 @@ p3p::p3p(double _fx, double _fy, double _cx, double _cy)
bool p3p::solve(cv::Mat& R, cv::Mat& tvec, const cv::Mat& opoints, const cv::Mat& ipoints) bool p3p::solve(cv::Mat& R, cv::Mat& tvec, const cv::Mat& opoints, const cv::Mat& ipoints)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double rotation_matrix[3][3], translation[3]; double rotation_matrix[3][3], translation[3];
std::vector<double> points; std::vector<double> points;
@ -59,7 +59,7 @@ bool p3p::solve(cv::Mat& R, cv::Mat& tvec, const cv::Mat& opoints, const cv::Mat
int p3p::solve(std::vector<cv::Mat>& Rs, std::vector<cv::Mat>& tvecs, const cv::Mat& opoints, const cv::Mat& ipoints) int p3p::solve(std::vector<cv::Mat>& Rs, std::vector<cv::Mat>& tvecs, const cv::Mat& opoints, const cv::Mat& ipoints)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double rotation_matrix[4][3][3], translation[4][3]; double rotation_matrix[4][3][3], translation[4][3];
std::vector<double> points; std::vector<double> points;

View File

@ -793,7 +793,7 @@ int estimateAffine3D(InputArray _from, InputArray _to,
OutputArray _out, OutputArray _inliers, OutputArray _out, OutputArray _inliers,
double ransacThreshold, double confidence) double ransacThreshold, double confidence)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat from = _from.getMat(), to = _to.getMat(); Mat from = _from.getMat(), to = _to.getMat();
int count = from.checkVector(3); int count = from.checkVector(3);

View File

@ -163,7 +163,7 @@ static int segment_hist_max(const Mat& hist, int& low_thresh, int& high_thresh)
bool cv::find4QuadCornerSubpix(InputArray _img, InputOutputArray _corners, Size region_size) bool cv::find4QuadCornerSubpix(InputArray _img, InputOutputArray _corners, Size region_size)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(), cornersM = _corners.getMat(); Mat img = _img.getMat(), cornersM = _corners.getMat();
int ncorners = cornersM.checkVector(2, CV_32F); int ncorners = cornersM.checkVector(2, CV_32F);

View File

@ -57,7 +57,7 @@ bool solvePnP( InputArray _opoints, InputArray _ipoints,
InputArray _cameraMatrix, InputArray _distCoeffs, InputArray _cameraMatrix, InputArray _distCoeffs,
OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess, int flags ) OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat(); Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat();
int npoints = std::max(opoints.checkVector(3, CV_32F), opoints.checkVector(3, CV_64F)); int npoints = std::max(opoints.checkVector(3, CV_32F), opoints.checkVector(3, CV_64F));
@ -236,7 +236,7 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints,
int iterationsCount, float reprojectionError, double confidence, int iterationsCount, float reprojectionError, double confidence,
OutputArray _inliers, int flags) OutputArray _inliers, int flags)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat opoints0 = _opoints.getMat(), ipoints0 = _ipoints.getMat(); Mat opoints0 = _opoints.getMat(), ipoints0 = _ipoints.getMat();
Mat opoints, ipoints; Mat opoints, ipoints;
@ -379,7 +379,7 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints,
int solveP3P( InputArray _opoints, InputArray _ipoints, int solveP3P( InputArray _opoints, InputArray _ipoints,
InputArray _cameraMatrix, InputArray _distCoeffs, InputArray _cameraMatrix, InputArray _distCoeffs,
OutputArrayOfArrays _rvecs, OutputArrayOfArrays _tvecs, int flags) { OutputArrayOfArrays _rvecs, OutputArrayOfArrays _tvecs, int flags) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat(); Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat();
int npoints = std::max(opoints.checkVector(3, CV_32F), opoints.checkVector(3, CV_64F)); int npoints = std::max(opoints.checkVector(3, CV_32F), opoints.checkVector(3, CV_64F));

View File

@ -1101,7 +1101,7 @@ public:
void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int dtype = disparr.fixedType() ? disparr.type() : params.dispType; int dtype = disparr.fixedType() ? disparr.type() : params.dispType;
Size leftsize = leftarr.size(); Size leftsize = leftarr.size();

View File

@ -2151,7 +2151,7 @@ public:
void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat left = leftarr.getMat(), right = rightarr.getMat(); Mat left = leftarr.getMat(), right = rightarr.getMat();
CV_Assert( left.size() == right.size() && left.type() == right.type() && CV_Assert( left.size() == right.size() && left.type() == right.type() &&
@ -2390,7 +2390,7 @@ void filterSpecklesImpl(cv::Mat& img, int newVal, int maxSpeckleSize, int maxDif
static bool ipp_filterSpeckles(Mat &img, int maxSpeckleSize, int newVal, int maxDiff, Mat &buffer) static bool ipp_filterSpeckles(Mat &img, int maxSpeckleSize, int newVal, int maxDiff, Mat &buffer)
{ {
#if IPP_VERSION_X100 >= 810 #if IPP_VERSION_X100 >= 810
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
IppDataType dataType = ippiGetDataType(img.depth()); IppDataType dataType = ippiGetDataType(img.depth());
IppiSize size = ippiSize(img.size()); IppiSize size = ippiSize(img.size());
@ -2426,7 +2426,7 @@ static bool ipp_filterSpeckles(Mat &img, int maxSpeckleSize, int newVal, int max
void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSize, void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSize,
double _maxDiff, InputOutputArray __buf ) double _maxDiff, InputOutputArray __buf )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
int type = img.type(); int type = img.type();
@ -2446,7 +2446,7 @@ void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSi
void cv::validateDisparity( InputOutputArray _disp, InputArray _cost, int minDisparity, void cv::validateDisparity( InputOutputArray _disp, InputArray _cost, int minDisparity,
int numberOfDisparities, int disp12MaxDiff ) int numberOfDisparities, int disp12MaxDiff )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat disp = _disp.getMat(), cost = _cost.getMat(); Mat disp = _disp.getMat(), cost = _cost.getMat();
int cols = disp.cols, rows = disp.rows; int cols = disp.cols, rows = disp.rows;

View File

@ -347,7 +347,7 @@ void cv::triangulatePoints( InputArray _projMatr1, InputArray _projMatr2,
InputArray _projPoints1, InputArray _projPoints2, InputArray _projPoints1, InputArray _projPoints2,
OutputArray _points4D ) OutputArray _points4D )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat matr1 = _projMatr1.getMat(), matr2 = _projMatr2.getMat(); Mat matr1 = _projMatr1.getMat(), matr2 = _projMatr2.getMat();
Mat points1 = _projPoints1.getMat(), points2 = _projPoints2.getMat(); Mat points1 = _projPoints1.getMat(), points2 = _projPoints2.getMat();
@ -371,7 +371,7 @@ void cv::triangulatePoints( InputArray _projMatr1, InputArray _projMatr2,
void cv::correctMatches( InputArray _F, InputArray _points1, InputArray _points2, void cv::correctMatches( InputArray _F, InputArray _points1, InputArray _points2,
OutputArray _newPoints1, OutputArray _newPoints2 ) OutputArray _newPoints1, OutputArray _newPoints2 )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat F = _F.getMat(); Mat F = _F.getMat();
Mat points1 = _points1.getMat(), points2 = _points2.getMat(); Mat points1 = _points1.getMat(), points2 = _points2.getMat();

View File

@ -749,15 +749,15 @@ CV_EXPORTS InstrNode* getCurrentNode();
///// General instrumentation ///// General instrumentation
// General OpenCV region instrumentation macro // General OpenCV region instrumentation macro
#define CV_INSTRUMENT_REGION_() CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN) #define CV_INSTRUMENT_REGION_(); CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN)
// Custom OpenCV region instrumentation macro // Custom OpenCV region instrumentation macro
#define CV_INSTRUMENT_REGION_NAME(NAME) CV_INSTRUMENT_REGION_CUSTOM_META(NAME, false, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN) #define CV_INSTRUMENT_REGION_NAME(NAME) CV_INSTRUMENT_REGION_CUSTOM_META(NAME, false, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN)
// Instrumentation for parallel_for_ or other regions which forks and gathers threads // Instrumentation for parallel_for_ or other regions which forks and gathers threads
#define CV_INSTRUMENT_REGION_MT_FORK() CV_INSTRUMENT_REGION_META(__FUNCTION__, true, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN); #define CV_INSTRUMENT_REGION_MT_FORK(); CV_INSTRUMENT_REGION_META(__FUNCTION__, true, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN);
///// IPP instrumentation ///// IPP instrumentation
// Wrapper region instrumentation macro // Wrapper region instrumentation macro
#define CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_IPP) #define CV_INSTRUMENT_REGION_IPP(); CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_IPP)
// Function instrumentation macro // Function instrumentation macro
#define CV_INSTRUMENT_FUN_IPP(FUN, ...) CV_INSTRUMENT_FUN_RT_META(::cv::instr::TYPE_FUN, ::cv::instr::IMPL_IPP, status < 0, FUN, __VA_ARGS__) #define CV_INSTRUMENT_FUN_IPP(FUN, ...) CV_INSTRUMENT_FUN_RT_META(::cv::instr::TYPE_FUN, ::cv::instr::IMPL_IPP, status < 0, FUN, __VA_ARGS__)
// Diagnostic markers // Diagnostic markers
@ -765,7 +765,7 @@ CV_EXPORTS InstrNode* getCurrentNode();
///// OpenCL instrumentation ///// OpenCL instrumentation
// Wrapper region instrumentation macro // Wrapper region instrumentation macro
#define CV_INSTRUMENT_REGION_OPENCL() CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_OPENCL) #define CV_INSTRUMENT_REGION_OPENCL(); CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_OPENCL)
// OpenCL kernel compilation wrapper // OpenCL kernel compilation wrapper
#define CV_INSTRUMENT_REGION_OPENCL_COMPILE(NAME) CV_INSTRUMENT_REGION_META(NAME, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_OPENCL) #define CV_INSTRUMENT_REGION_OPENCL_COMPILE(NAME) CV_INSTRUMENT_REGION_META(NAME, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_OPENCL)
// OpenCL kernel run wrapper // OpenCL kernel run wrapper
@ -775,24 +775,24 @@ CV_EXPORTS InstrNode* getCurrentNode();
#else #else
#define CV_INSTRUMENT_REGION_META(...) #define CV_INSTRUMENT_REGION_META(...)
#define CV_INSTRUMENT_REGION_() CV_TRACE_FUNCTION() #define CV_INSTRUMENT_REGION_(); CV_TRACE_FUNCTION()
#define CV_INSTRUMENT_REGION_NAME(...) CV_TRACE_REGION(__VA_ARGS__) #define CV_INSTRUMENT_REGION_NAME(...) CV_TRACE_REGION(__VA_ARGS__)
#define CV_INSTRUMENT_REGION_MT_FORK() #define CV_INSTRUMENT_REGION_MT_FORK();
#define CV_INSTRUMENT_REGION_IPP() CV__TRACE_REGION_("IPP", CV_TRACE_NS::details::REGION_FLAG_IMPL_IPP) #define CV_INSTRUMENT_REGION_IPP(); CV__TRACE_REGION_("IPP", CV_TRACE_NS::details::REGION_FLAG_IMPL_IPP)
#define CV_INSTRUMENT_FUN_IPP(FUN, ...) ((FUN)(__VA_ARGS__)) #define CV_INSTRUMENT_FUN_IPP(FUN, ...) ((FUN)(__VA_ARGS__))
#define CV_INSTRUMENT_MARK_IPP(...) #define CV_INSTRUMENT_MARK_IPP(...)
#define CV_INSTRUMENT_REGION_OPENCL() CV__TRACE_REGION_("OpenCL", CV_TRACE_NS::details::REGION_FLAG_IMPL_OPENCL) #define CV_INSTRUMENT_REGION_OPENCL(); CV__TRACE_REGION_("OpenCL", CV_TRACE_NS::details::REGION_FLAG_IMPL_OPENCL)
#define CV_INSTRUMENT_REGION_OPENCL_COMPILE(...) #define CV_INSTRUMENT_REGION_OPENCL_COMPILE(...)
#define CV_INSTRUMENT_REGION_OPENCL_RUN(...) #define CV_INSTRUMENT_REGION_OPENCL_RUN(...)
#define CV_INSTRUMENT_MARK_OPENCL(...) #define CV_INSTRUMENT_MARK_OPENCL(...)
#endif #endif
#ifdef __CV_AVX_GUARD #ifdef __CV_AVX_GUARD
#define CV_INSTRUMENT_REGION() __CV_AVX_GUARD CV_INSTRUMENT_REGION_() #define CV_INSTRUMENT_REGION(); __CV_AVX_GUARD CV_INSTRUMENT_REGION_();
#else #else
#define CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION_() #define CV_INSTRUMENT_REGION(); CV_INSTRUMENT_REGION_();
#endif #endif
//! @endcond //! @endcond

View File

@ -369,7 +369,7 @@ static BinaryFuncC* getMinTab()
void cv::bitwise_and(InputArray a, InputArray b, OutputArray c, InputArray mask) void cv::bitwise_and(InputArray a, InputArray b, OutputArray c, InputArray mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::and8u); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::and8u);
binary_op(a, b, c, mask, &f, true, OCL_OP_AND); binary_op(a, b, c, mask, &f, true, OCL_OP_AND);
@ -377,7 +377,7 @@ void cv::bitwise_and(InputArray a, InputArray b, OutputArray c, InputArray mask)
void cv::bitwise_or(InputArray a, InputArray b, OutputArray c, InputArray mask) void cv::bitwise_or(InputArray a, InputArray b, OutputArray c, InputArray mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::or8u); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::or8u);
binary_op(a, b, c, mask, &f, true, OCL_OP_OR); binary_op(a, b, c, mask, &f, true, OCL_OP_OR);
@ -385,7 +385,7 @@ void cv::bitwise_or(InputArray a, InputArray b, OutputArray c, InputArray mask)
void cv::bitwise_xor(InputArray a, InputArray b, OutputArray c, InputArray mask) void cv::bitwise_xor(InputArray a, InputArray b, OutputArray c, InputArray mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::xor8u); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::xor8u);
binary_op(a, b, c, mask, &f, true, OCL_OP_XOR); binary_op(a, b, c, mask, &f, true, OCL_OP_XOR);
@ -393,7 +393,7 @@ void cv::bitwise_xor(InputArray a, InputArray b, OutputArray c, InputArray mask)
void cv::bitwise_not(InputArray a, OutputArray c, InputArray mask) void cv::bitwise_not(InputArray a, OutputArray c, InputArray mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::not8u); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::not8u);
binary_op(a, a, c, mask, &f, true, OCL_OP_NOT); binary_op(a, a, c, mask, &f, true, OCL_OP_NOT);
@ -401,21 +401,21 @@ void cv::bitwise_not(InputArray a, OutputArray c, InputArray mask)
void cv::max( InputArray src1, InputArray src2, OutputArray dst ) void cv::max( InputArray src1, InputArray src2, OutputArray dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
binary_op(src1, src2, dst, noArray(), getMaxTab(), false, OCL_OP_MAX ); binary_op(src1, src2, dst, noArray(), getMaxTab(), false, OCL_OP_MAX );
} }
void cv::min( InputArray src1, InputArray src2, OutputArray dst ) void cv::min( InputArray src1, InputArray src2, OutputArray dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
binary_op(src1, src2, dst, noArray(), getMinTab(), false, OCL_OP_MIN ); binary_op(src1, src2, dst, noArray(), getMinTab(), false, OCL_OP_MIN );
} }
void cv::max(const Mat& src1, const Mat& src2, Mat& dst) void cv::max(const Mat& src1, const Mat& src2, Mat& dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
OutputArray _dst(dst); OutputArray _dst(dst);
binary_op(src1, src2, _dst, noArray(), getMaxTab(), false, OCL_OP_MAX ); binary_op(src1, src2, _dst, noArray(), getMaxTab(), false, OCL_OP_MAX );
@ -423,7 +423,7 @@ void cv::max(const Mat& src1, const Mat& src2, Mat& dst)
void cv::min(const Mat& src1, const Mat& src2, Mat& dst) void cv::min(const Mat& src1, const Mat& src2, Mat& dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
OutputArray _dst(dst); OutputArray _dst(dst);
binary_op(src1, src2, _dst, noArray(), getMinTab(), false, OCL_OP_MIN ); binary_op(src1, src2, _dst, noArray(), getMinTab(), false, OCL_OP_MIN );
@ -431,7 +431,7 @@ void cv::min(const Mat& src1, const Mat& src2, Mat& dst)
void cv::max(const UMat& src1, const UMat& src2, UMat& dst) void cv::max(const UMat& src1, const UMat& src2, UMat& dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
OutputArray _dst(dst); OutputArray _dst(dst);
binary_op(src1, src2, _dst, noArray(), getMaxTab(), false, OCL_OP_MAX ); binary_op(src1, src2, _dst, noArray(), getMaxTab(), false, OCL_OP_MAX );
@ -439,7 +439,7 @@ void cv::max(const UMat& src1, const UMat& src2, UMat& dst)
void cv::min(const UMat& src1, const UMat& src2, UMat& dst) void cv::min(const UMat& src1, const UMat& src2, UMat& dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
OutputArray _dst(dst); OutputArray _dst(dst);
binary_op(src1, src2, _dst, noArray(), getMinTab(), false, OCL_OP_MIN ); binary_op(src1, src2, _dst, noArray(), getMinTab(), false, OCL_OP_MIN );
@ -921,7 +921,7 @@ static BinaryFuncC* getAbsDiffTab()
void cv::add( InputArray src1, InputArray src2, OutputArray dst, void cv::add( InputArray src1, InputArray src2, OutputArray dst,
InputArray mask, int dtype ) InputArray mask, int dtype )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
arithm_op(src1, src2, dst, mask, dtype, getAddTab(), false, 0, OCL_OP_ADD ); arithm_op(src1, src2, dst, mask, dtype, getAddTab(), false, 0, OCL_OP_ADD );
} }
@ -929,7 +929,7 @@ void cv::add( InputArray src1, InputArray src2, OutputArray dst,
void cv::subtract( InputArray _src1, InputArray _src2, OutputArray _dst, void cv::subtract( InputArray _src1, InputArray _src2, OutputArray _dst,
InputArray mask, int dtype ) InputArray mask, int dtype )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
#ifdef HAVE_TEGRA_OPTIMIZATION #ifdef HAVE_TEGRA_OPTIMIZATION
if (tegra::useTegra()) if (tegra::useTegra())
@ -989,7 +989,7 @@ void cv::subtract( InputArray _src1, InputArray _src2, OutputArray _dst,
void cv::absdiff( InputArray src1, InputArray src2, OutputArray dst ) void cv::absdiff( InputArray src1, InputArray src2, OutputArray dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
arithm_op(src1, src2, dst, noArray(), -1, getAbsDiffTab(), false, 0, OCL_OP_ABSDIFF); arithm_op(src1, src2, dst, noArray(), -1, getAbsDiffTab(), false, 0, OCL_OP_ABSDIFF);
} }
@ -1042,7 +1042,7 @@ static BinaryFuncC* getRecipTab()
void cv::multiply(InputArray src1, InputArray src2, void cv::multiply(InputArray src1, InputArray src2,
OutputArray dst, double scale, int dtype) OutputArray dst, double scale, int dtype)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
arithm_op(src1, src2, dst, noArray(), dtype, getMulTab(), arithm_op(src1, src2, dst, noArray(), dtype, getMulTab(),
true, &scale, std::abs(scale - 1.0) < DBL_EPSILON ? OCL_OP_MUL : OCL_OP_MUL_SCALE); true, &scale, std::abs(scale - 1.0) < DBL_EPSILON ? OCL_OP_MUL : OCL_OP_MUL_SCALE);
@ -1051,7 +1051,7 @@ void cv::multiply(InputArray src1, InputArray src2,
void cv::divide(InputArray src1, InputArray src2, void cv::divide(InputArray src1, InputArray src2,
OutputArray dst, double scale, int dtype) OutputArray dst, double scale, int dtype)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
arithm_op(src1, src2, dst, noArray(), dtype, getDivTab(), true, &scale, OCL_OP_DIV_SCALE); arithm_op(src1, src2, dst, noArray(), dtype, getDivTab(), true, &scale, OCL_OP_DIV_SCALE);
} }
@ -1059,7 +1059,7 @@ void cv::divide(InputArray src1, InputArray src2,
void cv::divide(double scale, InputArray src2, void cv::divide(double scale, InputArray src2,
OutputArray dst, int dtype) OutputArray dst, int dtype)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
arithm_op(src2, src2, dst, noArray(), dtype, getRecipTab(), true, &scale, OCL_OP_RECIP_SCALE); arithm_op(src2, src2, dst, noArray(), dtype, getRecipTab(), true, &scale, OCL_OP_RECIP_SCALE);
} }
@ -1088,7 +1088,7 @@ static BinaryFuncC* getAddWeightedTab()
void cv::addWeighted( InputArray src1, double alpha, InputArray src2, void cv::addWeighted( InputArray src1, double alpha, InputArray src2,
double beta, double gamma, OutputArray dst, int dtype ) double beta, double gamma, OutputArray dst, int dtype )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double scalars[] = {alpha, beta, gamma}; double scalars[] = {alpha, beta, gamma};
arithm_op(src1, src2, dst, noArray(), dtype, getAddWeightedTab(), true, scalars, OCL_OP_ADDW); arithm_op(src1, src2, dst, noArray(), dtype, getAddWeightedTab(), true, scalars, OCL_OP_ADDW);
@ -1228,7 +1228,7 @@ static bool ocl_compare(InputArray _src1, InputArray _src2, OutputArray _dst, in
void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op) void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( op == CMP_LT || op == CMP_LE || op == CMP_EQ || CV_Assert( op == CMP_LT || op == CMP_LE || op == CMP_EQ ||
op == CMP_NE || op == CMP_GE || op == CMP_GT ); op == CMP_NE || op == CMP_GE || op == CMP_GT );
@ -1757,7 +1757,7 @@ static bool ocl_inRange( InputArray _src, InputArray _lowerb,
void cv::inRange(InputArray _src, InputArray _lowerb, void cv::inRange(InputArray _src, InputArray _lowerb,
InputArray _upperb, OutputArray _dst) InputArray _upperb, OutputArray _dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(! _src.empty()); CV_Assert(! _src.empty());

View File

@ -3235,7 +3235,7 @@ void scalarToRawData_(const Scalar& s, T * const buf, const int cn, const int un
void scalarToRawData(const Scalar& s, void* _buf, int type, int unroll_to) void scalarToRawData(const Scalar& s, void* _buf, int type, int unroll_to)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const int depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); const int depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
CV_Assert(cn <= 4); CV_Assert(cn <= 4);

View File

@ -267,7 +267,7 @@ void cv::batchDistance( InputArray _src1, InputArray _src2,
int normType, int K, InputArray _mask, int normType, int K, InputArray _mask,
int update, bool crosscheck ) int update, bool crosscheck )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src1 = _src1.getMat(), src2 = _src2.getMat(), mask = _mask.getMat(); Mat src1 = _src1.getMat(), src2 = _src2.getMat(), mask = _mask.getMat();
int type = src1.type(); int type = src1.type();

View File

@ -94,7 +94,7 @@ static MixChannelsFunc getMixchFunc(int depth)
void cv::mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, const int* fromTo, size_t npairs ) void cv::mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, const int* fromTo, size_t npairs )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( npairs == 0 ) if( npairs == 0 )
return; return;
@ -272,7 +272,7 @@ static bool ocl_mixChannels(InputArrayOfArrays _src, InputOutputArrayOfArrays _d
void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst, void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,
const int* fromTo, size_t npairs) const int* fromTo, size_t npairs)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if (npairs == 0 || fromTo == NULL) if (npairs == 0 || fromTo == NULL)
return; return;
@ -305,7 +305,7 @@ void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,
void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst, void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,
const std::vector<int>& fromTo) const std::vector<int>& fromTo)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if (fromTo.empty()) if (fromTo.empty())
return; return;
@ -342,7 +342,7 @@ namespace cv
static bool ipp_extractChannel(const Mat &src, Mat &dst, int channel) static bool ipp_extractChannel(const Mat &src, Mat &dst, int channel)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int srcChannels = src.channels(); int srcChannels = src.channels();
int dstChannels = dst.channels(); int dstChannels = dst.channels();
@ -380,7 +380,7 @@ static bool ipp_extractChannel(const Mat &src, Mat &dst, int channel)
static bool ipp_insertChannel(const Mat &src, Mat &dst, int channel) static bool ipp_insertChannel(const Mat &src, Mat &dst, int channel)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int srcChannels = src.channels(); int srcChannels = src.channels();
int dstChannels = dst.channels(); int dstChannels = dst.channels();
@ -419,7 +419,7 @@ static bool ipp_insertChannel(const Mat &src, Mat &dst, int channel)
void cv::extractChannel(InputArray _src, OutputArray _dst, int coi) void cv::extractChannel(InputArray _src, OutputArray _dst, int coi)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
CV_Assert( 0 <= coi && coi < cn ); CV_Assert( 0 <= coi && coi < cn );
@ -447,7 +447,7 @@ void cv::extractChannel(InputArray _src, OutputArray _dst, int coi)
void cv::insertChannel(InputArray _src, InputOutputArray _dst, int coi) void cv::insertChannel(InputArray _src, InputOutputArray _dst, int coi)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype);

View File

@ -414,7 +414,7 @@ static bool ocl_convertFp16( InputArray _src, OutputArray _dst, int sdepth, int
void cv::Mat::convertTo(OutputArray _dst, int _type, double alpha, double beta) const void cv::Mat::convertTo(OutputArray _dst, int _type, double alpha, double beta) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( empty() ) if( empty() )
{ {
@ -470,7 +470,7 @@ void cv::Mat::convertTo(OutputArray _dst, int _type, double alpha, double beta)
void cv::convertFp16( InputArray _src, OutputArray _dst ) void cv::convertFp16( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int sdepth = _src.depth(), ddepth = 0; int sdepth = _src.depth(), ddepth = 0;
BinaryFunc func = 0; BinaryFunc func = 0;

View File

@ -412,7 +412,7 @@ static bool ocl_convertScaleAbs( InputArray _src, OutputArray _dst, double alpha
void cv::convertScaleAbs( InputArray _src, OutputArray _dst, double alpha, double beta ) void cv::convertScaleAbs( InputArray _src, OutputArray _dst, double alpha, double beta )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(), CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(),
ocl_convertScaleAbs(_src, _dst, alpha, beta)) ocl_convertScaleAbs(_src, _dst, alpha, beta))
@ -540,7 +540,7 @@ static bool ocl_normalize( InputArray _src, InputOutputArray _dst, InputArray _m
void cv::normalize( InputArray _src, InputOutputArray _dst, double a, double b, void cv::normalize( InputArray _src, InputOutputArray _dst, double a, double b,
int norm_type, int rtype, InputArray _mask ) int norm_type, int rtype, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double scale = 1, shift = 0; double scale = 1, shift = 0;
int type = _src.type(), depth = CV_MAT_DEPTH(type); int type = _src.type(), depth = CV_MAT_DEPTH(type);

View File

@ -236,7 +236,7 @@ BinaryFunc getCopyMaskFunc(size_t esz)
/* dst = src */ /* dst = src */
void Mat::copyTo( OutputArray _dst ) const void Mat::copyTo( OutputArray _dst ) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int dtype = _dst.type(); int dtype = _dst.type();
if( _dst.fixedType() && dtype != type() ) if( _dst.fixedType() && dtype != type() )
@ -319,7 +319,7 @@ void Mat::copyTo( OutputArray _dst ) const
static bool ipp_copyTo(const Mat &src, Mat &dst, const Mat &mask) static bool ipp_copyTo(const Mat &src, Mat &dst, const Mat &mask)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
if(mask.channels() > 1 || mask.depth() != CV_8U) if(mask.channels() > 1 || mask.depth() != CV_8U)
return false; return false;
@ -353,7 +353,7 @@ static bool ipp_copyTo(const Mat &src, Mat &dst, const Mat &mask)
void Mat::copyTo( OutputArray _dst, InputArray _mask ) const void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat mask = _mask.getMat(); Mat mask = _mask.getMat();
if( !mask.data ) if( !mask.data )
@ -409,7 +409,7 @@ void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
Mat& Mat::operator = (const Scalar& s) Mat& Mat::operator = (const Scalar& s)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if (this->empty()) if (this->empty())
return *this; return *this;
@ -454,7 +454,7 @@ Mat& Mat::operator = (const Scalar& s)
static bool ipp_Mat_setTo_Mat(Mat &dst, Mat &_val, Mat &mask) static bool ipp_Mat_setTo_Mat(Mat &dst, Mat &_val, Mat &mask)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
if(mask.empty()) if(mask.empty())
return false; return false;
@ -511,7 +511,7 @@ static bool ipp_Mat_setTo_Mat(Mat &dst, Mat &_val, Mat &mask)
Mat& Mat::setTo(InputArray _value, InputArray _mask) Mat& Mat::setTo(InputArray _value, InputArray _mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( empty() ) if( empty() )
return *this; return *this;
@ -702,7 +702,7 @@ static bool ocl_flip(InputArray _src, OutputArray _dst, int flipCode )
static bool ipp_flip(Mat &src, Mat &dst, int flip_mode) static bool ipp_flip(Mat &src, Mat &dst, int flip_mode)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
IppiAxis ippMode; IppiAxis ippMode;
if(flip_mode < 0) if(flip_mode < 0)
@ -735,7 +735,7 @@ static bool ipp_flip(Mat &src, Mat &dst, int flip_mode)
void flip( InputArray _src, OutputArray _dst, int flip_mode ) void flip( InputArray _src, OutputArray _dst, int flip_mode )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _src.dims() <= 2 ); CV_Assert( _src.dims() <= 2 );
Size size = _src.size(); Size size = _src.size();
@ -855,7 +855,7 @@ static bool ocl_repeat(InputArray _src, int ny, int nx, OutputArray _dst)
void repeat(InputArray _src, int ny, int nx, OutputArray _dst) void repeat(InputArray _src, int ny, int nx, OutputArray _dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(_src.getObj() != _dst.getObj()); CV_Assert(_src.getObj() != _dst.getObj());
CV_Assert( _src.dims() <= 2 ); CV_Assert( _src.dims() <= 2 );
@ -1143,7 +1143,7 @@ static bool ipp_copyMakeBorder( Mat &_src, Mat &_dst, int top, int bottom,
int left, int right, int _borderType, const Scalar& value ) int left, int right, int _borderType, const Scalar& value )
{ {
#if defined HAVE_IPP_IW && !IPP_DISABLE_PERF_COPYMAKE #if defined HAVE_IPP_IW && !IPP_DISABLE_PERF_COPYMAKE
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
::ipp::IwiBorderSize borderSize(left, top, right, bottom); ::ipp::IwiBorderSize borderSize(left, top, right, bottom);
::ipp::IwiSize size(_src.cols, _src.rows); ::ipp::IwiSize size(_src.cols, _src.rows);
@ -1174,7 +1174,7 @@ static bool ipp_copyMakeBorder( Mat &_src, Mat &_dst, int top, int bottom,
void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom, void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom,
int left, int right, int borderType, const Scalar& value ) int left, int right, int borderType, const Scalar& value )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( top >= 0 && bottom >= 0 && left >= 0 && right >= 0 ); CV_Assert( top >= 0 && bottom >= 0 && left >= 0 && right >= 0 );

View File

@ -232,7 +232,7 @@ static bool ocl_countNonZero( InputArray _src, int & res )
#if defined HAVE_IPP #if defined HAVE_IPP
static bool ipp_countNonZero( Mat &src, int &res ) static bool ipp_countNonZero( Mat &src, int &res )
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 < 201801 #if IPP_VERSION_X100 < 201801
// Poor performance of SSE42 // Poor performance of SSE42
@ -292,7 +292,7 @@ static bool ipp_countNonZero( Mat &src, int &res )
int cv::countNonZero( InputArray _src ) int cv::countNonZero( InputArray _src )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(), cn = CV_MAT_CN(type); int type = _src.type(), cn = CV_MAT_CN(type);
CV_Assert( cn == 1 ); CV_Assert( cn == 1 );
@ -326,7 +326,7 @@ int cv::countNonZero( InputArray _src )
void cv::findNonZero( InputArray _src, OutputArray _idx ) void cv::findNonZero( InputArray _src, OutputArray _idx )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
CV_Assert( src.type() == CV_8UC1 ); CV_Assert( src.type() == CV_8UC1 );

View File

@ -1752,7 +1752,7 @@ private:
static bool ippi_DFT_C_32F(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, int norm_flag) static bool ippi_DFT_C_32F(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, int norm_flag)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
IppStatus status; IppStatus status;
Ipp8u* pBuffer = 0; Ipp8u* pBuffer = 0;
@ -1808,7 +1808,7 @@ static bool ippi_DFT_C_32F(const uchar * src, size_t src_step, uchar * dst, size
static bool ippi_DFT_R_32F(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, int norm_flag) static bool ippi_DFT_R_32F(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, int norm_flag)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
IppStatus status; IppStatus status;
Ipp8u* pBuffer = 0; Ipp8u* pBuffer = 0;
@ -3314,7 +3314,7 @@ Ptr<DFT2D> DFT2D::create(int width, int height, int depth,
void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows ) void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
#ifdef HAVE_CLAMDFFT #ifdef HAVE_CLAMDFFT
CV_OCL_RUN(ocl::haveAmdFft() && ocl::Device::getDefault().type() != ocl::Device::TYPE_CPU && CV_OCL_RUN(ocl::haveAmdFft() && ocl::Device::getDefault().type() != ocl::Device::TYPE_CPU &&
@ -3364,7 +3364,7 @@ void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows )
void cv::idft( InputArray src, OutputArray dst, int flags, int nonzero_rows ) void cv::idft( InputArray src, OutputArray dst, int flags, int nonzero_rows )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
dft( src, dst, flags | DFT_INVERSE, nonzero_rows ); dft( src, dst, flags | DFT_INVERSE, nonzero_rows );
} }
@ -3529,7 +3529,7 @@ void mulSpectrums_Impl(const T* dataA, const T* dataB, T* dataC, size_t stepA, s
void cv::mulSpectrums( InputArray _srcA, InputArray _srcB, void cv::mulSpectrums( InputArray _srcA, InputArray _srcB,
OutputArray _dst, int flags, bool conjB ) OutputArray _dst, int flags, bool conjB )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_dst.isUMat() && _srcA.dims() <= 2 && _srcB.dims() <= 2, CV_OCL_RUN(_dst.isUMat() && _srcA.dims() <= 2 && _srcB.dims() <= 2,
ocl_mulSpectrums(_srcA, _srcB, _dst, flags, conjB)) ocl_mulSpectrums(_srcA, _srcB, _dst, flags, conjB))
@ -3941,7 +3941,7 @@ static bool DctIPPLoop(const uchar * src, size_t src_step, uchar * dst, size_t d
static bool ippi_DCT_32f(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, bool row) static bool ippi_DCT_32f(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, bool row)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
if(row) if(row)
return DctIPPLoop(src, src_step, dst, dst_step, width, height, inv); return DctIPPLoop(src, src_step, dst, dst_step, width, height, inv);
@ -4236,7 +4236,7 @@ Ptr<DCT2D> DCT2D::create(int width, int height, int depth, int flags)
void cv::dct( InputArray _src0, OutputArray _dst, int flags ) void cv::dct( InputArray _src0, OutputArray _dst, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src0 = _src0.getMat(), src = src0; Mat src0 = _src0.getMat(), src = src0;
int type = src.type(), depth = src.depth(); int type = src.type(), depth = src.depth();
@ -4260,7 +4260,7 @@ void cv::dct( InputArray _src0, OutputArray _dst, int flags )
void cv::idct( InputArray src, OutputArray dst, int flags ) void cv::idct( InputArray src, OutputArray dst, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
dct( src, dst, flags | DCT_INVERSE ); dct( src, dst, flags | DCT_INVERSE );
} }

View File

@ -171,7 +171,7 @@ static bool isDir(const cv::String& path, DIR* dir)
bool cv::utils::fs::isDirectory(const cv::String& path) bool cv::utils::fs::isDirectory(const cv::String& path)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return isDir(path, NULL); return isDir(path, NULL);
} }
@ -270,7 +270,7 @@ static void glob_rec(const cv::String& directory, const cv::String& wildchart, s
void cv::glob(String pattern, std::vector<String>& result, bool recursive) void cv::glob(String pattern, std::vector<String>& result, bool recursive)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
result.clear(); result.clear();
String path, wildchart; String path, wildchart;

View File

@ -228,7 +228,7 @@ double cv::kmeans( InputArray _data, int K,
TermCriteria criteria, int attempts, TermCriteria criteria, int attempts,
int flags, OutputArray _centers ) int flags, OutputArray _centers )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const int SPP_TRIALS = 3; const int SPP_TRIALS = 3;
Mat data0 = _data.getMat(); Mat data0 = _data.getMat();
const bool isrow = data0.rows == 1; const bool isrow = data0.rows == 1;

View File

@ -67,28 +67,28 @@ namespace cv
int LU(float* A, size_t astep, int m, float* b, size_t bstep, int n) int LU(float* A, size_t astep, int m, float* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return hal::LU32f(A, astep, m, b, bstep, n); return hal::LU32f(A, astep, m, b, bstep, n);
} }
int LU(double* A, size_t astep, int m, double* b, size_t bstep, int n) int LU(double* A, size_t astep, int m, double* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return hal::LU64f(A, astep, m, b, bstep, n); return hal::LU64f(A, astep, m, b, bstep, n);
} }
bool Cholesky(float* A, size_t astep, int m, float* b, size_t bstep, int n) bool Cholesky(float* A, size_t astep, int m, float* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return hal::Cholesky32f(A, astep, m, b, bstep, n); return hal::Cholesky32f(A, astep, m, b, bstep, n);
} }
bool Cholesky(double* A, size_t astep, int m, double* b, size_t bstep, int n) bool Cholesky(double* A, size_t astep, int m, double* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return hal::Cholesky64f(A, astep, m, b, bstep, n); return hal::Cholesky64f(A, astep, m, b, bstep, n);
} }
@ -761,7 +761,7 @@ SVBkSb( int m, int n, const double* w, size_t wstep,
double cv::determinant( InputArray _mat ) double cv::determinant( InputArray _mat )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat mat = _mat.getMat(); Mat mat = _mat.getMat();
double result = 0; double result = 0;
@ -839,7 +839,7 @@ double cv::determinant( InputArray _mat )
double cv::invert( InputArray _src, OutputArray _dst, int method ) double cv::invert( InputArray _src, OutputArray _dst, int method )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool result = false; bool result = false;
Mat src = _src.getMat(); Mat src = _src.getMat();
@ -1099,7 +1099,7 @@ double cv::invert( InputArray _src, OutputArray _dst, int method )
bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int method ) bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int method )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool result = true; bool result = true;
Mat src = _src.getMat(), _src2 = _src2arg.getMat(); Mat src = _src.getMat(), _src2 = _src2arg.getMat();
@ -1398,7 +1398,7 @@ bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int meth
bool cv::eigen( InputArray _src, OutputArray _evals, OutputArray _evects ) bool cv::eigen( InputArray _src, OutputArray _evals, OutputArray _evects )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
int type = src.type(); int type = src.type();
@ -1550,14 +1550,14 @@ static void _SVDcompute( InputArray _aarr, OutputArray _w,
void SVD::compute( InputArray a, OutputArray w, OutputArray u, OutputArray vt, int flags ) void SVD::compute( InputArray a, OutputArray w, OutputArray u, OutputArray vt, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
_SVDcompute(a, w, u, vt, flags); _SVDcompute(a, w, u, vt, flags);
} }
void SVD::compute( InputArray a, OutputArray w, int flags ) void SVD::compute( InputArray a, OutputArray w, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
_SVDcompute(a, w, noArray(), noArray(), flags); _SVDcompute(a, w, noArray(), noArray(), flags);
} }
@ -1607,14 +1607,14 @@ void SVD::backSubst( InputArray rhs, OutputArray dst ) const
void cv::SVDecomp(InputArray src, OutputArray w, OutputArray u, OutputArray vt, int flags) void cv::SVDecomp(InputArray src, OutputArray w, OutputArray u, OutputArray vt, int flags)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
SVD::compute(src, w, u, vt, flags); SVD::compute(src, w, u, vt, flags);
} }
void cv::SVBackSubst(InputArray w, InputArray u, InputArray vt, InputArray rhs, OutputArray dst) void cv::SVBackSubst(InputArray w, InputArray u, InputArray vt, InputArray rhs, OutputArray dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
SVD::backSubst(w, u, vt, rhs, dst); SVD::backSubst(w, u, vt, rhs, dst);
} }

View File

@ -906,7 +906,7 @@ public:
// National Institute of Standards and Technology (NIST). // National Institute of Standards and Technology (NIST).
void compute(InputArray src, bool fallbackSymmetric) void compute(InputArray src, bool fallbackSymmetric)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(fallbackSymmetric && isSymmetric(src)) { if(fallbackSymmetric && isSymmetric(src)) {
// Fall back to OpenCV for a symmetric matrix! // Fall back to OpenCV for a symmetric matrix!
@ -944,7 +944,7 @@ public:
void eigenNonSymmetric(InputArray _src, OutputArray _evals, OutputArray _evects) void eigenNonSymmetric(InputArray _src, OutputArray _evals, OutputArray _evects)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
int type = src.type(); int type = src.type();

View File

@ -271,7 +271,7 @@ private:
static bool ipp_lut(Mat &src, Mat &lut, Mat &dst) static bool ipp_lut(Mat &src, Mat &lut, Mat &dst)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int lutcn = lut.channels(); int lutcn = lut.channels();
@ -358,7 +358,7 @@ private:
void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst ) void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int cn = _src.channels(), depth = _src.depth(); int cn = _src.channels(), depth = _src.depth();
int lutcn = _lut.channels(); int lutcn = _lut.channels();

View File

@ -102,7 +102,7 @@ static bool ocl_math_op(InputArray _src1, InputArray _src2, OutputArray _dst, in
\* ************************************************************************** */ \* ************************************************************************** */
float cubeRoot( float value ) float cubeRoot( float value )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
float fr; float fr;
Cv32suf v, m; Cv32suf v, m;
@ -145,7 +145,7 @@ float cubeRoot( float value )
void magnitude( InputArray src1, InputArray src2, OutputArray dst ) void magnitude( InputArray src1, InputArray src2, OutputArray dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = src1.type(), depth = src1.depth(), cn = src1.channels(); int type = src1.type(), depth = src1.depth(), cn = src1.channels();
CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F)); CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F));
@ -181,7 +181,7 @@ void magnitude( InputArray src1, InputArray src2, OutputArray dst )
void phase( InputArray src1, InputArray src2, OutputArray dst, bool angleInDegrees ) void phase( InputArray src1, InputArray src2, OutputArray dst, bool angleInDegrees )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = src1.type(), depth = src1.depth(), cn = src1.channels(); int type = src1.type(), depth = src1.depth(), cn = src1.channels();
CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F)); CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F));
@ -267,7 +267,7 @@ static bool ocl_cartToPolar( InputArray _src1, InputArray _src2,
void cartToPolar( InputArray src1, InputArray src2, void cartToPolar( InputArray src1, InputArray src2,
OutputArray dst1, OutputArray dst2, bool angleInDegrees ) OutputArray dst1, OutputArray dst2, bool angleInDegrees )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(dst1.isUMat() && dst2.isUMat(), CV_OCL_RUN(dst1.isUMat() && dst2.isUMat(),
ocl_cartToPolar(src1, src2, dst1, dst2, angleInDegrees)) ocl_cartToPolar(src1, src2, dst1, dst2, angleInDegrees))
@ -501,7 +501,7 @@ static bool ocl_polarToCart( InputArray _mag, InputArray _angle,
#ifdef HAVE_IPP #ifdef HAVE_IPP
static bool ipp_polarToCart(Mat &mag, Mat &angle, Mat &x, Mat &y) static bool ipp_polarToCart(Mat &mag, Mat &angle, Mat &x, Mat &y)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int depth = angle.depth(); int depth = angle.depth();
if(depth != CV_32F && depth != CV_64F) if(depth != CV_32F && depth != CV_64F)
@ -560,7 +560,7 @@ static bool ipp_polarToCart(Mat &mag, Mat &angle, Mat &x, Mat &y)
void polarToCart( InputArray src1, InputArray src2, void polarToCart( InputArray src1, InputArray src2,
OutputArray dst1, OutputArray dst2, bool angleInDegrees ) OutputArray dst1, OutputArray dst2, bool angleInDegrees )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = src2.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); int type = src2.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
CV_Assert((depth == CV_32F || depth == CV_64F) && (src1.empty() || src1.type() == type)); CV_Assert((depth == CV_32F || depth == CV_64F) && (src1.empty() || src1.type() == type));
@ -663,7 +663,7 @@ void polarToCart( InputArray src1, InputArray src2,
void exp( InputArray _src, OutputArray _dst ) void exp( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(), depth = _src.depth(), cn = _src.channels(); int type = _src.type(), depth = _src.depth(), cn = _src.channels();
CV_Assert( depth == CV_32F || depth == CV_64F ); CV_Assert( depth == CV_32F || depth == CV_64F );
@ -696,7 +696,7 @@ void exp( InputArray _src, OutputArray _dst )
void log( InputArray _src, OutputArray _dst ) void log( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(), depth = _src.depth(), cn = _src.channels(); int type = _src.type(), depth = _src.depth(), cn = _src.channels();
CV_Assert( depth == CV_32F || depth == CV_64F ); CV_Assert( depth == CV_32F || depth == CV_64F );
@ -1202,7 +1202,7 @@ static bool ocl_pow(InputArray _src, double power, OutputArray _dst,
void pow( InputArray _src, double power, OutputArray _dst ) void pow( InputArray _src, double power, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(), depth = CV_MAT_DEPTH(type), int type = _src.type(), depth = CV_MAT_DEPTH(type),
cn = CV_MAT_CN(type), ipower = cvRound(power); cn = CV_MAT_CN(type), ipower = cvRound(power);
@ -1353,7 +1353,7 @@ void pow( InputArray _src, double power, OutputArray _dst )
void sqrt(InputArray a, OutputArray b) void sqrt(InputArray a, OutputArray b)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
cv::pow(a, 0.5, b); cv::pow(a, 0.5, b);
} }
@ -1440,7 +1440,7 @@ check_range_function check_range_functions[] =
bool checkRange(InputArray _src, bool quiet, Point* pt, double minVal, double maxVal) bool checkRange(InputArray _src, bool quiet, Point* pt, double minVal, double maxVal)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
@ -1579,7 +1579,7 @@ static bool ocl_patchNaNs( InputOutputArray _a, float value )
void patchNaNs( InputOutputArray _a, double _val ) void patchNaNs( InputOutputArray _a, double _val )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _a.depth() == CV_32F ); CV_Assert( _a.depth() == CV_32F );
@ -1736,7 +1736,7 @@ CV_IMPL int cvCheckArr( const CvArr* arr, int flags,
int cv::solveCubic( InputArray _coeffs, OutputArray _roots ) int cv::solveCubic( InputArray _coeffs, OutputArray _roots )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const int n0 = 3; const int n0 = 3;
Mat coeffs = _coeffs.getMat(); Mat coeffs = _coeffs.getMat();
@ -1883,7 +1883,7 @@ int cv::solveCubic( InputArray _coeffs, OutputArray _roots )
http://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method */ http://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method */
double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters ) double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
typedef Complex<double> C; typedef Complex<double> C;

View File

@ -13,7 +13,7 @@ namespace cv { namespace hal {
void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(fastAtan32f, cv_hal_fastAtan32f, Y, X, angle, len, angleInDegrees); CALL_HAL(fastAtan32f, cv_hal_fastAtan32f, Y, X, angle, len, angleInDegrees);
@ -23,7 +23,7 @@ void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool ang
void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees) void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(fastAtan64f, cv_hal_fastAtan64f, Y, X, angle, len, angleInDegrees); CALL_HAL(fastAtan64f, cv_hal_fastAtan64f, Y, X, angle, len, angleInDegrees);
@ -34,14 +34,14 @@ void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool
// deprecated // deprecated
void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
fastAtan32f(Y, X, angle, len, angleInDegrees); fastAtan32f(Y, X, angle, len, angleInDegrees);
} }
void magnitude32f(const float* x, const float* y, float* mag, int len) void magnitude32f(const float* x, const float* y, float* mag, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(magnitude32f, cv_hal_magnitude32f, x, y, mag, len); CALL_HAL(magnitude32f, cv_hal_magnitude32f, x, y, mag, len);
// SSE42 performance issues // SSE42 performance issues
@ -53,7 +53,7 @@ void magnitude32f(const float* x, const float* y, float* mag, int len)
void magnitude64f(const double* x, const double* y, double* mag, int len) void magnitude64f(const double* x, const double* y, double* mag, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(magnitude64f, cv_hal_magnitude64f, x, y, mag, len); CALL_HAL(magnitude64f, cv_hal_magnitude64f, x, y, mag, len);
// SSE42 performance issues // SSE42 performance issues
@ -66,7 +66,7 @@ void magnitude64f(const double* x, const double* y, double* mag, int len)
void invSqrt32f(const float* src, float* dst, int len) void invSqrt32f(const float* src, float* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(invSqrt32f, cv_hal_invSqrt32f, src, dst, len); CALL_HAL(invSqrt32f, cv_hal_invSqrt32f, src, dst, len);
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsInvSqrt_32f_A21, src, dst, len) >= 0); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsInvSqrt_32f_A21, src, dst, len) >= 0);
@ -78,7 +78,7 @@ void invSqrt32f(const float* src, float* dst, int len)
void invSqrt64f(const double* src, double* dst, int len) void invSqrt64f(const double* src, double* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(invSqrt64f, cv_hal_invSqrt64f, src, dst, len); CALL_HAL(invSqrt64f, cv_hal_invSqrt64f, src, dst, len);
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsInvSqrt_64f_A50, src, dst, len) >= 0); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsInvSqrt_64f_A50, src, dst, len) >= 0);
@ -90,7 +90,7 @@ void invSqrt64f(const double* src, double* dst, int len)
void sqrt32f(const float* src, float* dst, int len) void sqrt32f(const float* src, float* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(sqrt32f, cv_hal_sqrt32f, src, dst, len); CALL_HAL(sqrt32f, cv_hal_sqrt32f, src, dst, len);
@ -101,7 +101,7 @@ void sqrt32f(const float* src, float* dst, int len)
void sqrt64f(const double* src, double* dst, int len) void sqrt64f(const double* src, double* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(sqrt64f, cv_hal_sqrt64f, src, dst, len); CALL_HAL(sqrt64f, cv_hal_sqrt64f, src, dst, len);
@ -111,7 +111,7 @@ void sqrt64f(const double* src, double* dst, int len)
void exp32f(const float *src, float *dst, int n) void exp32f(const float *src, float *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(exp32f, cv_hal_exp32f, src, dst, n); CALL_HAL(exp32f, cv_hal_exp32f, src, dst, n);
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsExp_32f_A21, src, dst, n) >= 0); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsExp_32f_A21, src, dst, n) >= 0);
@ -122,7 +122,7 @@ void exp32f(const float *src, float *dst, int n)
void exp64f(const double *src, double *dst, int n) void exp64f(const double *src, double *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(exp64f, cv_hal_exp64f, src, dst, n); CALL_HAL(exp64f, cv_hal_exp64f, src, dst, n);
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsExp_64f_A50, src, dst, n) >= 0); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsExp_64f_A50, src, dst, n) >= 0);
@ -133,7 +133,7 @@ void exp64f(const double *src, double *dst, int n)
void log32f(const float *src, float *dst, int n) void log32f(const float *src, float *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(log32f, cv_hal_log32f, src, dst, n); CALL_HAL(log32f, cv_hal_log32f, src, dst, n);
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsLn_32f_A21, src, dst, n) >= 0); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsLn_32f_A21, src, dst, n) >= 0);
@ -144,7 +144,7 @@ void log32f(const float *src, float *dst, int n)
void log64f(const double *src, double *dst, int n) void log64f(const double *src, double *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(log64f, cv_hal_log64f, src, dst, n); CALL_HAL(log64f, cv_hal_log64f, src, dst, n);
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsLn_64f_A50, src, dst, n) >= 0); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsLn_64f_A50, src, dst, n) >= 0);

View File

@ -149,13 +149,13 @@ static void fastAtan32f_(const float *Y, const float *X, float *angle, int len,
void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
fastAtan32f_(Y, X, angle, len, angleInDegrees ); fastAtan32f_(Y, X, angle, len, angleInDegrees );
} }
void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees) void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const int BLKSZ = 128; const int BLKSZ = 128;
float ybuf[BLKSZ], xbuf[BLKSZ], abuf[BLKSZ]; float ybuf[BLKSZ], xbuf[BLKSZ], abuf[BLKSZ];
@ -176,13 +176,13 @@ void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool
// deprecated // deprecated
void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
fastAtan32f(Y, X, angle, len, angleInDegrees); fastAtan32f(Y, X, angle, len, angleInDegrees);
} }
void magnitude32f(const float* x, const float* y, float* mag, int len) void magnitude32f(const float* x, const float* y, float* mag, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int i = 0; int i = 0;
@ -215,7 +215,7 @@ void magnitude32f(const float* x, const float* y, float* mag, int len)
void magnitude64f(const double* x, const double* y, double* mag, int len) void magnitude64f(const double* x, const double* y, double* mag, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int i = 0; int i = 0;
@ -249,7 +249,7 @@ void magnitude64f(const double* x, const double* y, double* mag, int len)
void invSqrt32f(const float* src, float* dst, int len) void invSqrt32f(const float* src, float* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int i = 0; int i = 0;
@ -278,7 +278,7 @@ void invSqrt32f(const float* src, float* dst, int len)
void invSqrt64f(const double* src, double* dst, int len) void invSqrt64f(const double* src, double* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int i = 0; int i = 0;
#if CV_SIMD_64F #if CV_SIMD_64F
@ -305,7 +305,7 @@ void invSqrt64f(const double* src, double* dst, int len)
void sqrt32f(const float* src, float* dst, int len) void sqrt32f(const float* src, float* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int i = 0; int i = 0;
@ -334,7 +334,7 @@ void sqrt32f(const float* src, float* dst, int len)
void sqrt64f(const double* src, double* dst, int len) void sqrt64f(const double* src, double* dst, int len)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int i = 0; int i = 0;
@ -366,7 +366,7 @@ void sqrt64f(const double* src, double* dst, int len)
#if (defined _MSC_VER && _MSC_VER >= 1900) #if (defined _MSC_VER && _MSC_VER >= 1900)
void exp32f(const float *src, float *dst, int n) void exp32f(const float *src, float *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
{ {
@ -376,7 +376,7 @@ void exp32f(const float *src, float *dst, int n)
void exp64f(const double *src, double *dst, int n) void exp64f(const double *src, double *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
{ {
@ -386,7 +386,7 @@ void exp64f(const double *src, double *dst, int n)
void log32f(const float *src, float *dst, int n) void log32f(const float *src, float *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
{ {
@ -395,7 +395,7 @@ void log32f(const float *src, float *dst, int n)
} }
void log64f(const double *src, double *dst, int n) void log64f(const double *src, double *dst, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
{ {
@ -424,7 +424,7 @@ static const double exp_max_val = 3000.*(1 << EXPTAB_SCALE); // log10(DBL_MAX) <
void exp32f( const float *_x, float *y, int n ) void exp32f( const float *_x, float *y, int n )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const float* const expTab_f = cv::details::getExpTab32f(); const float* const expTab_f = cv::details::getExpTab32f();
@ -537,7 +537,7 @@ void exp32f( const float *_x, float *y, int n )
void exp64f( const double *_x, double *y, int n ) void exp64f( const double *_x, double *y, int n )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const double* const expTab = cv::details::getExpTab64f(); const double* const expTab = cv::details::getExpTab64f();
@ -671,7 +671,7 @@ static const double ln_2 = 0.69314718055994530941723212145818;
void log32f( const float *_x, float *y, int n ) void log32f( const float *_x, float *y, int n )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const float* const logTab_f = cv::details::getLogTab32f(); const float* const logTab_f = cv::details::getLogTab32f();
@ -742,7 +742,7 @@ void log32f( const float *_x, float *y, int n )
void log64f( const double *x, double *y, int n ) void log64f( const double *x, double *y, int n )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const double* const logTab = cv::details::getLogTab64f(); const double* const logTab = cv::details::getLogTab64f();

View File

@ -896,7 +896,7 @@ static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
static void gemmImpl( Mat A, Mat B, double alpha, static void gemmImpl( Mat A, Mat B, double alpha,
Mat C, double beta, Mat D, int flags ) Mat C, double beta, Mat D, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const int block_lin_size = 128; const int block_lin_size = 128;
const int block_size = block_lin_size * block_lin_size; const int block_size = block_lin_size * block_lin_size;
@ -2081,7 +2081,7 @@ static TransformFunc getDiagTransformFunc(int depth)
void cv::transform( InputArray _src, OutputArray _dst, InputArray _mtx ) void cv::transform( InputArray _src, OutputArray _dst, InputArray _mtx )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(), m = _mtx.getMat(); Mat src = _src.getMat(), m = _mtx.getMat();
int depth = src.depth(), scn = src.channels(), dcn = m.rows; int depth = src.depth(), scn = src.channels(), dcn = m.rows;
@ -2261,7 +2261,7 @@ perspectiveTransform_64f(const double* src, double* dst, const double* m, int le
void cv::perspectiveTransform( InputArray _src, OutputArray _dst, InputArray _mtx ) void cv::perspectiveTransform( InputArray _src, OutputArray _dst, InputArray _mtx )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(), m = _mtx.getMat(); Mat src = _src.getMat(), m = _mtx.getMat();
int depth = src.depth(), scn = src.channels(), dcn = m.rows-1; int depth = src.depth(), scn = src.channels(), dcn = m.rows-1;
@ -2408,7 +2408,7 @@ static bool ocl_scaleAdd( InputArray _src1, double alpha, InputArray _src2, Outp
void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray _dst ) void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src1.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); int type = _src1.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
CV_Assert( type == _src2.type() ); CV_Assert( type == _src2.type() );
@ -2455,7 +2455,7 @@ void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray
void cv::calcCovarMatrix( const Mat* data, int nsamples, Mat& covar, Mat& _mean, int flags, int ctype ) void cv::calcCovarMatrix( const Mat* data, int nsamples, Mat& covar, Mat& _mean, int flags, int ctype )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert_N( data, nsamples > 0 ); CV_Assert_N( data, nsamples > 0 );
Size size = data[0].size(); Size size = data[0].size();
@ -2497,7 +2497,7 @@ void cv::calcCovarMatrix( const Mat* data, int nsamples, Mat& covar, Mat& _mean,
void cv::calcCovarMatrix( InputArray _src, OutputArray _covar, InputOutputArray _mean, int flags, int ctype ) void cv::calcCovarMatrix( InputArray _src, OutputArray _covar, InputOutputArray _mean, int flags, int ctype )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(_src.kind() == _InputArray::STD_VECTOR_MAT || _src.kind() == _InputArray::STD_ARRAY_MAT) if(_src.kind() == _InputArray::STD_VECTOR_MAT || _src.kind() == _InputArray::STD_ARRAY_MAT)
{ {
@ -2586,7 +2586,7 @@ void cv::calcCovarMatrix( InputArray _src, OutputArray _covar, InputOutputArray
double cv::Mahalanobis( InputArray _v1, InputArray _v2, InputArray _icovar ) double cv::Mahalanobis( InputArray _v1, InputArray _v2, InputArray _icovar )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat v1 = _v1.getMat(), v2 = _v2.getMat(), icovar = _icovar.getMat(); Mat v1 = _v1.getMat(), v2 = _v2.getMat(), icovar = _icovar.getMat();
int type = v1.type(), depth = v1.depth(); int type = v1.type(), depth = v1.depth();
@ -2878,7 +2878,7 @@ typedef void (*MulTransposedFunc)(const Mat& src, Mat& dst, const Mat& delta, do
void cv::mulTransposed( InputArray _src, OutputArray _dst, bool ata, void cv::mulTransposed( InputArray _src, OutputArray _dst, bool ata,
InputArray _delta, double scale, int dtype ) InputArray _delta, double scale, int dtype )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(), delta = _delta.getMat(); Mat src = _src.getMat(), delta = _delta.getMat();
const int gemm_level = 100; // boundary above which GEMM is faster. const int gemm_level = 100; // boundary above which GEMM is faster.
@ -3286,7 +3286,7 @@ static DotProdFunc getDotProdFunc(int depth)
double Mat::dot(InputArray _mat) const double Mat::dot(InputArray _mat) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat mat = _mat.getMat(); Mat mat = _mat.getMat();
int cn = channels(); int cn = channels();

View File

@ -85,7 +85,7 @@ void MatAllocator::copy(UMatData* usrc, UMatData* udst, int dims, const size_t s
const size_t srcofs[], const size_t srcstep[], const size_t srcofs[], const size_t srcstep[],
const size_t dstofs[], const size_t dststep[], bool /*sync*/) const const size_t dstofs[], const size_t dststep[], bool /*sync*/) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(!usrc || !udst) if(!usrc || !udst)
return; return;

View File

@ -72,7 +72,7 @@ LUImpl(_Tp* A, size_t astep, int m, _Tp* b, size_t bstep, int n, _Tp eps)
int LU32f(float* A, size_t astep, int m, float* b, size_t bstep, int n) int LU32f(float* A, size_t astep, int m, float* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int output; int output;
CALL_HAL_RET(LU32f, cv_hal_LU32f, output, A, astep, m, b, bstep, n) CALL_HAL_RET(LU32f, cv_hal_LU32f, output, A, astep, m, b, bstep, n)
@ -83,7 +83,7 @@ int LU32f(float* A, size_t astep, int m, float* b, size_t bstep, int n)
int LU64f(double* A, size_t astep, int m, double* b, size_t bstep, int n) int LU64f(double* A, size_t astep, int m, double* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int output; int output;
CALL_HAL_RET(LU64f, cv_hal_LU64f, output, A, astep, m, b, bstep, n) CALL_HAL_RET(LU64f, cv_hal_LU64f, output, A, astep, m, b, bstep, n)
@ -172,7 +172,7 @@ CholImpl(_Tp* A, size_t astep, int m, _Tp* b, size_t bstep, int n)
bool Cholesky32f(float* A, size_t astep, int m, float* b, size_t bstep, int n) bool Cholesky32f(float* A, size_t astep, int m, float* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool output; bool output;
CALL_HAL_RET(Cholesky32f, cv_hal_Cholesky32f, output, A, astep, m, b, bstep, n) CALL_HAL_RET(Cholesky32f, cv_hal_Cholesky32f, output, A, astep, m, b, bstep, n)
@ -181,7 +181,7 @@ bool Cholesky32f(float* A, size_t astep, int m, float* b, size_t bstep, int n)
bool Cholesky64f(double* A, size_t astep, int m, double* b, size_t bstep, int n) bool Cholesky64f(double* A, size_t astep, int m, double* b, size_t bstep, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool output; bool output;
CALL_HAL_RET(Cholesky64f, cv_hal_Cholesky64f, output, A, astep, m, b, bstep, n) CALL_HAL_RET(Cholesky64f, cv_hal_Cholesky64f, output, A, astep, m, b, bstep, n)
@ -293,7 +293,7 @@ QRImpl(_Tp* A, size_t astep, int m, int n, int k, _Tp* b, size_t bstep, _Tp* hFa
int QR32f(float* A, size_t astep, int m, int n, int k, float* b, size_t bstep, float* hFactors) int QR32f(float* A, size_t astep, int m, int n, int k, float* b, size_t bstep, float* hFactors)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int output; int output;
CALL_HAL_RET(QR32f, cv_hal_QR32f, output, A, astep, m, n, k, b, bstep, hFactors); CALL_HAL_RET(QR32f, cv_hal_QR32f, output, A, astep, m, n, k, b, bstep, hFactors);
@ -303,7 +303,7 @@ int QR32f(float* A, size_t astep, int m, int n, int k, float* b, size_t bstep, f
int QR64f(double* A, size_t astep, int m, int n, int k, double* b, size_t bstep, double* hFactors) int QR64f(double* A, size_t astep, int m, int n, int k, double* b, size_t bstep, double* hFactors)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int output; int output;
CALL_HAL_RET(QR64f, cv_hal_QR64f, output, A, astep, m, n, k, b, bstep, hFactors) CALL_HAL_RET(QR64f, cv_hal_QR64f, output, A, astep, m, n, k, b, bstep, hFactors)

View File

@ -296,7 +296,7 @@ void MatOp::augAssignXor(const MatExpr& expr, Mat& m) const
void MatOp::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const void MatOp::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( this == e2.op ) if( this == e2.op )
{ {
@ -329,7 +329,7 @@ void MatOp::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const
void MatOp::add(const MatExpr& expr1, const Scalar& s, MatExpr& res) const void MatOp::add(const MatExpr& expr1, const Scalar& s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m1; Mat m1;
expr1.op->assign(expr1, m1); expr1.op->assign(expr1, m1);
@ -339,7 +339,7 @@ void MatOp::add(const MatExpr& expr1, const Scalar& s, MatExpr& res) const
void MatOp::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const void MatOp::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( this == e2.op ) if( this == e2.op )
{ {
@ -372,7 +372,7 @@ void MatOp::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const
void MatOp::subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const void MatOp::subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m; Mat m;
expr.op->assign(expr, m); expr.op->assign(expr, m);
@ -382,7 +382,7 @@ void MatOp::subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const
void MatOp::multiply(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double scale) const void MatOp::multiply(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double scale) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( this == e2.op ) if( this == e2.op )
{ {
@ -435,7 +435,7 @@ void MatOp::multiply(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double
void MatOp::multiply(const MatExpr& expr, double s, MatExpr& res) const void MatOp::multiply(const MatExpr& expr, double s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m; Mat m;
expr.op->assign(expr, m); expr.op->assign(expr, m);
@ -445,7 +445,7 @@ void MatOp::multiply(const MatExpr& expr, double s, MatExpr& res) const
void MatOp::divide(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double scale) const void MatOp::divide(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double scale) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( this == e2.op ) if( this == e2.op )
{ {
@ -487,7 +487,7 @@ void MatOp::divide(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double sc
void MatOp::divide(double s, const MatExpr& expr, MatExpr& res) const void MatOp::divide(double s, const MatExpr& expr, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m; Mat m;
expr.op->assign(expr, m); expr.op->assign(expr, m);
@ -497,7 +497,7 @@ void MatOp::divide(double s, const MatExpr& expr, MatExpr& res) const
void MatOp::abs(const MatExpr& expr, MatExpr& res) const void MatOp::abs(const MatExpr& expr, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m; Mat m;
expr.op->assign(expr, m); expr.op->assign(expr, m);
@ -507,7 +507,7 @@ void MatOp::abs(const MatExpr& expr, MatExpr& res) const
void MatOp::transpose(const MatExpr& expr, MatExpr& res) const void MatOp::transpose(const MatExpr& expr, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m; Mat m;
expr.op->assign(expr, m); expr.op->assign(expr, m);
@ -573,7 +573,7 @@ Size MatOp::size(const MatExpr& expr) const
int MatOp::type(const MatExpr& expr) const int MatOp::type(const MatExpr& expr) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return !expr.a.empty() ? expr.a.type() : expr.b.empty() ? expr.b.type() : expr.c.type(); return !expr.a.empty() ? expr.a.type() : expr.b.empty() ? expr.b.type() : expr.c.type();
} }
@ -1023,7 +1023,7 @@ MatExpr operator > (double s, const Mat& a)
MatExpr min(const Mat& a, const Mat& b) MatExpr min(const Mat& a, const Mat& b)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Bin::makeExpr(e, 'm', a, b); MatOp_Bin::makeExpr(e, 'm', a, b);
@ -1032,7 +1032,7 @@ MatExpr min(const Mat& a, const Mat& b)
MatExpr min(const Mat& a, double s) MatExpr min(const Mat& a, double s)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Bin::makeExpr(e, 'n', a, s); MatOp_Bin::makeExpr(e, 'n', a, s);
@ -1041,7 +1041,7 @@ MatExpr min(const Mat& a, double s)
MatExpr min(double s, const Mat& a) MatExpr min(double s, const Mat& a)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Bin::makeExpr(e, 'n', a, s); MatOp_Bin::makeExpr(e, 'n', a, s);
@ -1050,7 +1050,7 @@ MatExpr min(double s, const Mat& a)
MatExpr max(const Mat& a, const Mat& b) MatExpr max(const Mat& a, const Mat& b)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Bin::makeExpr(e, 'M', a, b); MatOp_Bin::makeExpr(e, 'M', a, b);
@ -1059,7 +1059,7 @@ MatExpr max(const Mat& a, const Mat& b)
MatExpr max(const Mat& a, double s) MatExpr max(const Mat& a, double s)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Bin::makeExpr(e, 'N', a, s); MatOp_Bin::makeExpr(e, 'N', a, s);
@ -1068,7 +1068,7 @@ MatExpr max(const Mat& a, double s)
MatExpr max(double s, const Mat& a) MatExpr max(double s, const Mat& a)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Bin::makeExpr(e, 'N', a, s); MatOp_Bin::makeExpr(e, 'N', a, s);
@ -1147,7 +1147,7 @@ MatExpr operator ~(const Mat& a)
MatExpr abs(const Mat& a) MatExpr abs(const Mat& a)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Bin::makeExpr(e, 'a', a, Scalar()); MatOp_Bin::makeExpr(e, 'a', a, Scalar());
@ -1156,7 +1156,7 @@ MatExpr abs(const Mat& a)
MatExpr abs(const MatExpr& e) MatExpr abs(const MatExpr& e)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr en; MatExpr en;
e.op->abs(e, en); e.op->abs(e, en);
@ -1180,7 +1180,7 @@ Size MatExpr::size() const
int MatExpr::type() const int MatExpr::type() const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( isInitializer(*this) ) if( isInitializer(*this) )
return a.type(); return a.type();
@ -1264,7 +1264,7 @@ void MatOp_AddEx::assign(const MatExpr& e, Mat& m, int _type) const
void MatOp_AddEx::add(const MatExpr& e, const Scalar& s, MatExpr& res) const void MatOp_AddEx::add(const MatExpr& e, const Scalar& s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
res = e; res = e;
res.s += s; res.s += s;
@ -1273,7 +1273,7 @@ void MatOp_AddEx::add(const MatExpr& e, const Scalar& s, MatExpr& res) const
void MatOp_AddEx::subtract(const Scalar& s, const MatExpr& e, MatExpr& res) const void MatOp_AddEx::subtract(const Scalar& s, const MatExpr& e, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
res = e; res = e;
res.alpha = -res.alpha; res.alpha = -res.alpha;
@ -1283,7 +1283,7 @@ void MatOp_AddEx::subtract(const Scalar& s, const MatExpr& e, MatExpr& res) cons
void MatOp_AddEx::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_AddEx::multiply(const MatExpr& e, double s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
res = e; res = e;
res.alpha *= s; res.alpha *= s;
@ -1293,7 +1293,7 @@ void MatOp_AddEx::multiply(const MatExpr& e, double s, MatExpr& res) const
void MatOp_AddEx::divide(double s, const MatExpr& e, MatExpr& res) const void MatOp_AddEx::divide(double s, const MatExpr& e, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( isScaled(e) ) if( isScaled(e) )
MatOp_Bin::makeExpr(res, '/', e.a, Mat(), s/e.alpha); MatOp_Bin::makeExpr(res, '/', e.a, Mat(), s/e.alpha);
@ -1304,7 +1304,7 @@ void MatOp_AddEx::divide(double s, const MatExpr& e, MatExpr& res) const
void MatOp_AddEx::transpose(const MatExpr& e, MatExpr& res) const void MatOp_AddEx::transpose(const MatExpr& e, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( isScaled(e) ) if( isScaled(e) )
MatOp_T::makeExpr(res, e.a, e.alpha); MatOp_T::makeExpr(res, e.a, e.alpha);
@ -1314,7 +1314,7 @@ void MatOp_AddEx::transpose(const MatExpr& e, MatExpr& res) const
void MatOp_AddEx::abs(const MatExpr& e, MatExpr& res) const void MatOp_AddEx::abs(const MatExpr& e, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( (!e.b.data || e.beta == 0) && fabs(e.alpha) == 1 ) if( (!e.b.data || e.beta == 0) && fabs(e.alpha) == 1 )
MatOp_Bin::makeExpr(res, 'a', e.a, -e.s*e.alpha); MatOp_Bin::makeExpr(res, 'a', e.a, -e.s*e.alpha);
@ -1376,7 +1376,7 @@ void MatOp_Bin::assign(const MatExpr& e, Mat& m, int _type) const
void MatOp_Bin::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_Bin::multiply(const MatExpr& e, double s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( e.flags == '*' || e.flags == '/' ) if( e.flags == '*' || e.flags == '/' )
{ {
@ -1389,7 +1389,7 @@ void MatOp_Bin::multiply(const MatExpr& e, double s, MatExpr& res) const
void MatOp_Bin::divide(double s, const MatExpr& e, MatExpr& res) const void MatOp_Bin::divide(double s, const MatExpr& e, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( e.flags == '/' && (!e.b.data || e.beta == 0) ) if( e.flags == '/' && (!e.b.data || e.beta == 0) )
MatOp_AddEx::makeExpr(res, e.a, Mat(), s/e.alpha, 0); MatOp_AddEx::makeExpr(res, e.a, Mat(), s/e.alpha, 0);
@ -1446,7 +1446,7 @@ void MatOp_T::assign(const MatExpr& e, Mat& m, int _type) const
void MatOp_T::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_T::multiply(const MatExpr& e, double s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
res = e; res = e;
res.alpha *= s; res.alpha *= s;
@ -1454,7 +1454,7 @@ void MatOp_T::multiply(const MatExpr& e, double s, MatExpr& res) const
void MatOp_T::transpose(const MatExpr& e, MatExpr& res) const void MatOp_T::transpose(const MatExpr& e, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( e.alpha == 1 ) if( e.alpha == 1 )
MatOp_Identity::makeExpr(res, e.a); MatOp_Identity::makeExpr(res, e.a);
@ -1480,7 +1480,7 @@ void MatOp_GEMM::assign(const MatExpr& e, Mat& m, int _type) const
void MatOp_GEMM::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const void MatOp_GEMM::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool i1 = isIdentity(e1), i2 = isIdentity(e2); bool i1 = isIdentity(e1), i2 = isIdentity(e2);
double alpha1 = i1 ? 1 : e1.alpha, alpha2 = i2 ? 1 : e2.alpha; double alpha1 = i1 ? 1 : e1.alpha, alpha2 = i2 ? 1 : e2.alpha;
@ -1499,7 +1499,7 @@ void MatOp_GEMM::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const
void MatOp_GEMM::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const void MatOp_GEMM::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool i1 = isIdentity(e1), i2 = isIdentity(e2); bool i1 = isIdentity(e1), i2 = isIdentity(e2);
double alpha1 = i1 ? 1 : e1.alpha, alpha2 = i2 ? 1 : e2.alpha; double alpha1 = i1 ? 1 : e1.alpha, alpha2 = i2 ? 1 : e2.alpha;
@ -1518,7 +1518,7 @@ void MatOp_GEMM::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) co
void MatOp_GEMM::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_GEMM::multiply(const MatExpr& e, double s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
res = e; res = e;
res.alpha *= s; res.alpha *= s;
@ -1527,7 +1527,7 @@ void MatOp_GEMM::multiply(const MatExpr& e, double s, MatExpr& res) const
void MatOp_GEMM::transpose(const MatExpr& e, MatExpr& res) const void MatOp_GEMM::transpose(const MatExpr& e, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
res = e; res = e;
res.flags = (!(e.flags & CV_GEMM_A_T) ? CV_GEMM_B_T : 0) | res.flags = (!(e.flags & CV_GEMM_A_T) ? CV_GEMM_B_T : 0) |
@ -1608,7 +1608,7 @@ void MatOp_Initializer::assign(const MatExpr& e, Mat& m, int _type) const
void MatOp_Initializer::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_Initializer::multiply(const MatExpr& e, double s, MatExpr& res) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
res = e; res = e;
res.alpha *= s; res.alpha *= s;
@ -1628,7 +1628,7 @@ inline void MatOp_Initializer::makeExpr(MatExpr& res, int method, int ndims, con
MatExpr Mat::t() const MatExpr Mat::t() const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_T::makeExpr(e, *this); MatOp_T::makeExpr(e, *this);
@ -1637,7 +1637,7 @@ MatExpr Mat::t() const
MatExpr Mat::inv(int method) const MatExpr Mat::inv(int method) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Invert::makeExpr(e, method, *this); MatOp_Invert::makeExpr(e, method, *this);
@ -1647,7 +1647,7 @@ MatExpr Mat::inv(int method) const
MatExpr Mat::mul(InputArray m, double scale) const MatExpr Mat::mul(InputArray m, double scale) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
if(m.kind() == _InputArray::EXPR) if(m.kind() == _InputArray::EXPR)
@ -1662,7 +1662,7 @@ MatExpr Mat::mul(InputArray m, double scale) const
MatExpr Mat::zeros(int rows, int cols, int type) MatExpr Mat::zeros(int rows, int cols, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, '0', Size(cols, rows), type); MatOp_Initializer::makeExpr(e, '0', Size(cols, rows), type);
@ -1671,7 +1671,7 @@ MatExpr Mat::zeros(int rows, int cols, int type)
MatExpr Mat::zeros(Size size, int type) MatExpr Mat::zeros(Size size, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, '0', size, type); MatOp_Initializer::makeExpr(e, '0', size, type);
@ -1680,7 +1680,7 @@ MatExpr Mat::zeros(Size size, int type)
MatExpr Mat::zeros(int ndims, const int* sizes, int type) MatExpr Mat::zeros(int ndims, const int* sizes, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, '0', ndims, sizes, type); MatOp_Initializer::makeExpr(e, '0', ndims, sizes, type);
@ -1689,7 +1689,7 @@ MatExpr Mat::zeros(int ndims, const int* sizes, int type)
MatExpr Mat::ones(int rows, int cols, int type) MatExpr Mat::ones(int rows, int cols, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, '1', Size(cols, rows), type); MatOp_Initializer::makeExpr(e, '1', Size(cols, rows), type);
@ -1698,7 +1698,7 @@ MatExpr Mat::ones(int rows, int cols, int type)
MatExpr Mat::ones(Size size, int type) MatExpr Mat::ones(Size size, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, '1', size, type); MatOp_Initializer::makeExpr(e, '1', size, type);
@ -1707,7 +1707,7 @@ MatExpr Mat::ones(Size size, int type)
MatExpr Mat::ones(int ndims, const int* sizes, int type) MatExpr Mat::ones(int ndims, const int* sizes, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, '1', ndims, sizes, type); MatOp_Initializer::makeExpr(e, '1', ndims, sizes, type);
@ -1716,7 +1716,7 @@ MatExpr Mat::ones(int ndims, const int* sizes, int type)
MatExpr Mat::eye(int rows, int cols, int type) MatExpr Mat::eye(int rows, int cols, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, 'I', Size(cols, rows), type); MatOp_Initializer::makeExpr(e, 'I', Size(cols, rows), type);
@ -1725,7 +1725,7 @@ MatExpr Mat::eye(int rows, int cols, int type)
MatExpr Mat::eye(Size size, int type) MatExpr Mat::eye(Size size, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
MatExpr e; MatExpr e;
MatOp_Initializer::makeExpr(e, 'I', size, type); MatOp_Initializer::makeExpr(e, 'I', size, type);

View File

@ -47,7 +47,7 @@ void cv::swap( Mat& a, Mat& b )
void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst) void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( nsrc == 0 || !src ) if( nsrc == 0 || !src )
{ {
@ -75,7 +75,7 @@ void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst)
void cv::hconcat(InputArray src1, InputArray src2, OutputArray dst) void cv::hconcat(InputArray src1, InputArray src2, OutputArray dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src[] = {src1.getMat(), src2.getMat()}; Mat src[] = {src1.getMat(), src2.getMat()};
hconcat(src, 2, dst); hconcat(src, 2, dst);
@ -83,7 +83,7 @@ void cv::hconcat(InputArray src1, InputArray src2, OutputArray dst)
void cv::hconcat(InputArray _src, OutputArray dst) void cv::hconcat(InputArray _src, OutputArray dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
std::vector<Mat> src; std::vector<Mat> src;
_src.getMatVector(src); _src.getMatVector(src);
@ -120,7 +120,7 @@ void cv::vconcat(const Mat* src, size_t nsrc, OutputArray _dst)
void cv::vconcat(InputArray src1, InputArray src2, OutputArray dst) void cv::vconcat(InputArray src1, InputArray src2, OutputArray dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src[] = {src1.getMat(), src2.getMat()}; Mat src[] = {src1.getMat(), src2.getMat()};
vconcat(src, 2, dst); vconcat(src, 2, dst);
@ -128,7 +128,7 @@ void cv::vconcat(InputArray src1, InputArray src2, OutputArray dst)
void cv::vconcat(InputArray _src, OutputArray dst) void cv::vconcat(InputArray _src, OutputArray dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
std::vector<Mat> src; std::vector<Mat> src;
_src.getMatVector(src); _src.getMatVector(src);
@ -179,7 +179,7 @@ static bool ocl_setIdentity( InputOutputArray _m, const Scalar& s )
void cv::setIdentity( InputOutputArray _m, const Scalar& s ) void cv::setIdentity( InputOutputArray _m, const Scalar& s )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _m.dims() <= 2 ); CV_Assert( _m.dims() <= 2 );
@ -226,7 +226,7 @@ void cv::setIdentity( InputOutputArray _m, const Scalar& s )
cv::Scalar cv::trace( InputArray _m ) cv::Scalar cv::trace( InputArray _m )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m = _m.getMat(); Mat m = _m.getMat();
CV_Assert( m.dims <= 2 ); CV_Assert( m.dims <= 2 );
@ -423,7 +423,7 @@ static bool ocl_transpose( InputArray _src, OutputArray _dst )
#ifdef HAVE_IPP #ifdef HAVE_IPP
static bool ipp_transpose( Mat &src, Mat &dst ) static bool ipp_transpose( Mat &src, Mat &dst )
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int type = src.type(); int type = src.type();
typedef IppStatus (CV_STDCALL * IppiTranspose)(const void * pSrc, int srcStep, void * pDst, int dstStep, IppiSize roiSize); typedef IppStatus (CV_STDCALL * IppiTranspose)(const void * pSrc, int srcStep, void * pDst, int dstStep, IppiSize roiSize);
@ -492,7 +492,7 @@ static bool ipp_transpose( Mat &src, Mat &dst )
void cv::transpose( InputArray _src, OutputArray _dst ) void cv::transpose( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(), esz = CV_ELEM_SIZE(type); int type = _src.type(), esz = CV_ELEM_SIZE(type);
CV_Assert( _src.dims() <= 2 && esz <= 32 ); CV_Assert( _src.dims() <= 2 && esz <= 32 );
@ -540,7 +540,7 @@ void cv::transpose( InputArray _src, OutputArray _dst )
void cv::completeSymm( InputOutputArray _m, bool LtoR ) void cv::completeSymm( InputOutputArray _m, bool LtoR )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat m = _m.getMat(); Mat m = _m.getMat();
size_t step = m.step, esz = m.elemSize(); size_t step = m.step, esz = m.elemSize();
@ -964,7 +964,7 @@ static bool ocl_reduce(InputArray _src, OutputArray _dst,
void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype) void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _src.dims() <= 2 ); CV_Assert( _src.dims() <= 2 );
int op0 = op; int op0 = op;
@ -1196,7 +1196,7 @@ static IppSortFunc getSortFunc(int depth, bool sortDescending)
static bool ipp_sort(const Mat& src, Mat& dst, int flags) static bool ipp_sort(const Mat& src, Mat& dst, int flags)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
bool sortRows = (flags & 1) == CV_SORT_EVERY_ROW; bool sortRows = (flags & 1) == CV_SORT_EVERY_ROW;
bool sortDescending = (flags & CV_SORT_DESCENDING) != 0; bool sortDescending = (flags & CV_SORT_DESCENDING) != 0;
@ -1342,7 +1342,7 @@ static IppSortIndexFunc getSortIndexFunc(int depth, bool sortDescending)
static bool ipp_sortIdx( const Mat& src, Mat& dst, int flags ) static bool ipp_sortIdx( const Mat& src, Mat& dst, int flags )
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
bool sortRows = (flags & 1) == SORT_EVERY_ROW; bool sortRows = (flags & 1) == SORT_EVERY_ROW;
bool sortDescending = (flags & SORT_DESCENDING) != 0; bool sortDescending = (flags & SORT_DESCENDING) != 0;
@ -1404,7 +1404,7 @@ typedef void (*SortFunc)(const Mat& src, Mat& dst, int flags);
void cv::sort( InputArray _src, OutputArray _dst, int flags ) void cv::sort( InputArray _src, OutputArray _dst, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
CV_Assert( src.dims <= 2 && src.channels() == 1 ); CV_Assert( src.dims <= 2 && src.channels() == 1 );
@ -1425,7 +1425,7 @@ void cv::sort( InputArray _src, OutputArray _dst, int flags )
void cv::sortIdx( InputArray _src, OutputArray _dst, int flags ) void cv::sortIdx( InputArray _src, OutputArray _dst, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
CV_Assert( src.dims <= 2 && src.channels() == 1 ); CV_Assert( src.dims <= 2 && src.channels() == 1 );

View File

@ -615,7 +615,7 @@ void SparseMat::removeNode(size_t hidx, size_t nidx, size_t previdx)
// //
double norm( const SparseMat& src, int normType ) double norm( const SparseMat& src, int normType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
SparseMatConstIterator it = src.begin(); SparseMatConstIterator it = src.begin();
@ -680,7 +680,7 @@ double norm( const SparseMat& src, int normType )
void minMaxLoc( const SparseMat& src, double* _minval, double* _maxval, int* _minidx, int* _maxidx ) void minMaxLoc( const SparseMat& src, double* _minval, double* _maxval, int* _minidx, int* _maxidx )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
SparseMatConstIterator it = src.begin(); SparseMatConstIterator it = src.begin();
size_t i, N = src.nzcount(), d = src.hdr ? src.hdr->dims : 0; size_t i, N = src.nzcount(), d = src.hdr ? src.hdr->dims : 0;
@ -747,7 +747,7 @@ void minMaxLoc( const SparseMat& src, double* _minval, double* _maxval, int* _mi
void normalize( const SparseMat& src, SparseMat& dst, double a, int norm_type ) void normalize( const SparseMat& src, SparseMat& dst, double a, int norm_type )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double scale = 1; double scale = 1;
if( norm_type == CV_L2 || norm_type == CV_L1 || norm_type == CV_C ) if( norm_type == CV_L2 || norm_type == CV_L1 || norm_type == CV_C )

View File

@ -13,7 +13,7 @@ namespace cv
{ {
static bool ipp_mean( Mat &src, Mat &mask, Scalar &ret ) static bool ipp_mean( Mat &src, Mat &mask, Scalar &ret )
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 >= 700 #if IPP_VERSION_X100 >= 700
size_t total_size = src.total(); size_t total_size = src.total();
@ -106,7 +106,7 @@ static bool ipp_mean( Mat &src, Mat &mask, Scalar &ret )
cv::Scalar cv::mean( InputArray _src, InputArray _mask ) cv::Scalar cv::mean( InputArray _src, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(), mask = _mask.getMat(); Mat src = _src.getMat(), mask = _mask.getMat();
CV_Assert( mask.empty() || mask.type() == CV_8U ); CV_Assert( mask.empty() || mask.type() == CV_8U );
@ -460,7 +460,7 @@ static SumSqrFunc getSumSqrTab(int depth)
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask ) static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask )
{ {
CV_INSTRUMENT_REGION_OPENCL() CV_INSTRUMENT_REGION_OPENCL();
bool haveMask = _mask.kind() != _InputArray::NONE; bool haveMask = _mask.kind() != _InputArray::NONE;
int nz = haveMask ? -1 : (int)_src.total(); int nz = haveMask ? -1 : (int)_src.total();
@ -644,7 +644,7 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv
#ifdef HAVE_IPP #ifdef HAVE_IPP
static bool ipp_meanStdDev(Mat& src, OutputArray _mean, OutputArray _sdv, Mat& mask) static bool ipp_meanStdDev(Mat& src, OutputArray _mean, OutputArray _sdv, Mat& mask)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 >= 700 #if IPP_VERSION_X100 >= 700
int cn = src.channels(); int cn = src.channels();
@ -764,7 +764,7 @@ static bool ipp_meanStdDev(Mat& src, OutputArray _mean, OutputArray _sdv, Mat& m
void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask ) void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(!_src.empty()); CV_Assert(!_src.empty());
CV_Assert( _mask.empty() || _mask.type() == CV_8UC1 ); CV_Assert( _mask.empty() || _mask.type() == CV_8UC1 );

View File

@ -229,7 +229,7 @@ namespace cv {
static bool ipp_merge(const Mat* mv, Mat& dst, int channels) static bool ipp_merge(const Mat* mv, Mat& dst, int channels)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
if(channels != 3 && channels != 4) if(channels != 3 && channels != 4)
return false; return false;
@ -279,7 +279,7 @@ static bool ipp_merge(const Mat* mv, Mat& dst, int channels)
void cv::merge(const Mat* mv, size_t n, OutputArray _dst) void cv::merge(const Mat* mv, size_t n, OutputArray _dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( mv && n > 0 ); CV_Assert( mv && n > 0 );
@ -427,7 +427,7 @@ static bool ocl_merge( InputArrayOfArrays _mv, OutputArray _dst )
void cv::merge(InputArrayOfArrays _mv, OutputArray _dst) void cv::merge(InputArrayOfArrays _mv, OutputArray _dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_mv.isUMatVector() && _dst.isUMat(), CV_OCL_RUN(_mv.isUMatVector() && _dst.isUMat(),
ocl_merge(_mv, _dst)) ocl_merge(_mv, _dst))

View File

@ -579,7 +579,7 @@ typedef IppStatus (*IppMinMaxSelector)(const void* pSrc, int srcStep, IppiSize s
static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minIdx, int* _maxIdx, Mat &mask) static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minIdx, int* _maxIdx, Mat &mask)
{ {
#if IPP_VERSION_X100 >= 700 #if IPP_VERSION_X100 >= 700
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 < 201800 #if IPP_VERSION_X100 < 201800
// cv::minMaxIdx problem with NaN input // cv::minMaxIdx problem with NaN input
@ -746,7 +746,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
double* maxVal, int* minIdx, int* maxIdx, double* maxVal, int* minIdx, int* maxIdx,
InputArray _mask) InputArray _mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
CV_Assert( (cn == 1 && (_mask.empty() || _mask.type() == CV_8U)) || CV_Assert( (cn == 1 && (_mask.empty() || _mask.type() == CV_8U)) ||
@ -818,7 +818,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
void cv::minMaxLoc( InputArray _img, double* minVal, double* maxVal, void cv::minMaxLoc( InputArray _img, double* minVal, double* maxVal,
Point* minLoc, Point* maxLoc, InputArray mask ) Point* minLoc, Point* maxLoc, InputArray mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(_img.dims() <= 2); CV_Assert(_img.dims() <= 2);

View File

@ -496,7 +496,7 @@ static bool ocl_norm( InputArray _src, int normType, InputArray _mask, double &
#ifdef HAVE_IPP #ifdef HAVE_IPP
static bool ipp_norm(Mat &src, int normType, Mat &mask, double &result) static bool ipp_norm(Mat &src, int normType, Mat &mask, double &result)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 >= 700 #if IPP_VERSION_X100 >= 700
size_t total_size = src.total(); size_t total_size = src.total();
@ -625,7 +625,7 @@ static bool ipp_norm(Mat &src, int normType, Mat &mask, double &result)
double cv::norm( InputArray _src, int normType, InputArray _mask ) double cv::norm( InputArray _src, int normType, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
normType &= NORM_TYPE_MASK; normType &= NORM_TYPE_MASK;
CV_Assert( normType == NORM_INF || normType == NORM_L1 || CV_Assert( normType == NORM_INF || normType == NORM_L1 ||
@ -857,7 +857,7 @@ namespace cv
{ {
static bool ipp_norm(InputArray _src1, InputArray _src2, int normType, InputArray _mask, double &result) static bool ipp_norm(InputArray _src1, InputArray _src2, int normType, InputArray _mask, double &result)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 >= 700 #if IPP_VERSION_X100 >= 700
Mat src1 = _src1.getMat(), src2 = _src2.getMat(), mask = _mask.getMat(); Mat src1 = _src1.getMat(), src2 = _src2.getMat(), mask = _mask.getMat();
@ -1087,7 +1087,7 @@ static bool ipp_norm(InputArray _src1, InputArray _src2, int normType, InputArra
double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask ) double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _src1.sameSize(_src2) && _src1.type() == _src2.type() ); CV_Assert( _src1.sameSize(_src2) && _src1.type() == _src2.type() );
@ -1253,7 +1253,7 @@ cv::Hamming::ResultType cv::Hamming::operator()( const unsigned char* a, const u
double cv::PSNR(InputArray _src1, InputArray _src2) double cv::PSNR(InputArray _src1, InputArray _src2)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
//Input arrays must have depth CV_8U //Input arrays must have depth CV_8U
CV_Assert( _src1.depth() == CV_8U && _src2.depth() == CV_8U ); CV_Assert( _src1.depth() == CV_8U && _src2.depth() == CV_8U );

View File

@ -3091,7 +3091,7 @@ bool Kernel::run(int dims, size_t _globalsize[], size_t _localsize[],
bool Kernel::Impl::run(int dims, size_t globalsize[], size_t localsize[], bool Kernel::Impl::run(int dims, size_t globalsize[], size_t localsize[],
bool sync, int64* timeNS, const Queue& q) bool sync, int64* timeNS, const Queue& q)
{ {
CV_INSTRUMENT_REGION_OPENCL_RUN(name.c_str()); CV_INSTRUMENT_REGION_OPENCL_RUN(name.c_str(););
if (!handle || isInProgress) if (!handle || isInProgress)
return false; return false;

View File

@ -312,7 +312,7 @@ namespace
cv::instr::InstrTLSStruct *pInstrTLS = &cv::instr::getInstrumentTLSStruct(); cv::instr::InstrTLSStruct *pInstrTLS = &cv::instr::getInstrumentTLSStruct();
pInstrTLS->pCurrentNode = ctx.pThreadRoot; // Initialize TLS node for thread pInstrTLS->pCurrentNode = ctx.pThreadRoot; // Initialize TLS node for thread
} }
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
#endif #endif
// propagate main thread state // propagate main thread state
@ -466,7 +466,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body,
CV_TRACE_ARG_VALUE(nstripes, "nstripes", (int64)nstripes); CV_TRACE_ARG_VALUE(nstripes, "nstripes", (int64)nstripes);
#endif #endif
CV_INSTRUMENT_REGION_MT_FORK() CV_INSTRUMENT_REGION_MT_FORK();
if (range.empty()) if (range.empty())
return; return;

View File

@ -352,7 +352,7 @@ Mat PCA::backProject(InputArray data) const
void cv::PCACompute(InputArray data, InputOutputArray mean, void cv::PCACompute(InputArray data, InputOutputArray mean,
OutputArray eigenvectors, int maxComponents) OutputArray eigenvectors, int maxComponents)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
PCA pca; PCA pca;
pca(data, mean, 0, maxComponents); pca(data, mean, 0, maxComponents);
@ -364,7 +364,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean,
OutputArray eigenvectors, OutputArray eigenvalues, OutputArray eigenvectors, OutputArray eigenvalues,
int maxComponents) int maxComponents)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
PCA pca; PCA pca;
pca(data, mean, 0, maxComponents); pca(data, mean, 0, maxComponents);
@ -376,7 +376,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean,
void cv::PCACompute(InputArray data, InputOutputArray mean, void cv::PCACompute(InputArray data, InputOutputArray mean,
OutputArray eigenvectors, double retainedVariance) OutputArray eigenvectors, double retainedVariance)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
PCA pca; PCA pca;
pca(data, mean, 0, retainedVariance); pca(data, mean, 0, retainedVariance);
@ -388,7 +388,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean,
OutputArray eigenvectors, OutputArray eigenvalues, OutputArray eigenvectors, OutputArray eigenvalues,
double retainedVariance) double retainedVariance)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
PCA pca; PCA pca;
pca(data, mean, 0, retainedVariance); pca(data, mean, 0, retainedVariance);
@ -400,7 +400,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean,
void cv::PCAProject(InputArray data, InputArray mean, void cv::PCAProject(InputArray data, InputArray mean,
InputArray eigenvectors, OutputArray result) InputArray eigenvectors, OutputArray result)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
PCA pca; PCA pca;
pca.mean = mean.getMat(); pca.mean = mean.getMat();
@ -411,7 +411,7 @@ void cv::PCAProject(InputArray data, InputArray mean,
void cv::PCABackProject(InputArray data, InputArray mean, void cv::PCABackProject(InputArray data, InputArray mean,
InputArray eigenvectors, OutputArray result) InputArray eigenvectors, OutputArray result)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
PCA pca; PCA pca;
pca.mean = mean.getMat(); pca.mean = mean.getMat();

View File

@ -56,7 +56,7 @@ FileStorage::~FileStorage()
bool FileStorage::open(const String& filename, int flags, const String& encoding) bool FileStorage::open(const String& filename, int flags, const String& encoding)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
release(); release();
fs.reset(cvOpenFileStorage( filename.c_str(), 0, flags, fs.reset(cvOpenFileStorage( filename.c_str(), 0, flags,

View File

@ -781,14 +781,14 @@ void cv::setRNGSeed(int seed)
void cv::randu(InputOutputArray dst, InputArray low, InputArray high) void cv::randu(InputOutputArray dst, InputArray low, InputArray high)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
theRNG().fill(dst, RNG::UNIFORM, low, high); theRNG().fill(dst, RNG::UNIFORM, low, high);
} }
void cv::randn(InputOutputArray dst, InputArray mean, InputArray stddev) void cv::randn(InputOutputArray dst, InputArray mean, InputArray stddev)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
theRNG().fill(dst, RNG::NORMAL, mean, stddev); theRNG().fill(dst, RNG::NORMAL, mean, stddev);
} }
@ -836,7 +836,7 @@ typedef void (*RandShuffleFunc)( Mat& dst, RNG& rng, double iterFactor );
void cv::randShuffle( InputOutputArray _dst, double iterFactor, RNG* _rng ) void cv::randShuffle( InputOutputArray _dst, double iterFactor, RNG* _rng )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
RandShuffleFunc tab[] = RandShuffleFunc tab[] =
{ {

View File

@ -237,7 +237,7 @@ namespace cv {
static bool ipp_split(const Mat& src, Mat* mv, int channels) static bool ipp_split(const Mat& src, Mat* mv, int channels)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
if(channels != 3 && channels != 4) if(channels != 3 && channels != 4)
return false; return false;
@ -287,7 +287,7 @@ static bool ipp_split(const Mat& src, Mat* mv, int channels)
void cv::split(const Mat& src, Mat* mv) void cv::split(const Mat& src, Mat* mv)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int k, depth = src.depth(), cn = src.channels(); int k, depth = src.depth(), cn = src.channels();
if( cn == 1 ) if( cn == 1 )
@ -387,7 +387,7 @@ static bool ocl_split( InputArray _m, OutputArrayOfArrays _mv )
void cv::split(InputArray _m, OutputArrayOfArrays _mv) void cv::split(InputArray _m, OutputArrayOfArrays _mv)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_m.dims() <= 2 && _mv.isUMatVector(), CV_OCL_RUN(_m.dims() <= 2 && _mv.isUMatVector(),
ocl_split(_m, _mv)) ocl_split(_m, _mv))

View File

@ -11,7 +11,7 @@ namespace cv { namespace hal {
int normHamming(const uchar* a, int n) int normHamming(const uchar* a, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_CPU_DISPATCH(normHamming, (a, n), CV_CPU_DISPATCH(normHamming, (a, n),
CV_CPU_DISPATCH_MODES_ALL); CV_CPU_DISPATCH_MODES_ALL);
@ -19,7 +19,7 @@ int normHamming(const uchar* a, int n)
int normHamming(const uchar* a, const uchar* b, int n) int normHamming(const uchar* a, const uchar* b, int n)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_CPU_DISPATCH(normHamming, (a, b, n), CV_CPU_DISPATCH(normHamming, (a, b, n),
CV_CPU_DISPATCH_MODES_ALL); CV_CPU_DISPATCH_MODES_ALL);

View File

@ -541,7 +541,7 @@ bool ocl_sum( InputArray _src, Scalar & res, int sum_op, InputArray _mask,
#ifdef HAVE_IPP #ifdef HAVE_IPP
static bool ipp_sum(Mat &src, Scalar &_res) static bool ipp_sum(Mat &src, Scalar &_res)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 >= 700 #if IPP_VERSION_X100 >= 700
int cn = src.channels(); int cn = src.channels();
@ -597,7 +597,7 @@ static bool ipp_sum(Mat &src, Scalar &_res)
cv::Scalar cv::sum( InputArray _src ) cv::Scalar cv::sum( InputArray _src )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
#if defined HAVE_OPENCL || defined HAVE_IPP #if defined HAVE_OPENCL || defined HAVE_IPP
Scalar _res; Scalar _res;

View File

@ -65,7 +65,7 @@ size_t KeyPoint::hash() const
void KeyPoint::convert(const std::vector<KeyPoint>& keypoints, std::vector<Point2f>& points2f, void KeyPoint::convert(const std::vector<KeyPoint>& keypoints, std::vector<Point2f>& points2f,
const std::vector<int>& keypointIndexes) const std::vector<int>& keypointIndexes)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( keypointIndexes.empty() ) if( keypointIndexes.empty() )
{ {
@ -93,7 +93,7 @@ void KeyPoint::convert(const std::vector<KeyPoint>& keypoints, std::vector<Point
void KeyPoint::convert( const std::vector<Point2f>& points2f, std::vector<KeyPoint>& keypoints, void KeyPoint::convert( const std::vector<Point2f>& points2f, std::vector<KeyPoint>& keypoints,
float size, float response, int octave, int class_id ) float size, float response, int octave, int class_id )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
keypoints.resize(points2f.size()); keypoints.resize(points2f.size());
for( size_t i = 0; i < points2f.size(); i++ ) for( size_t i = 0; i < points2f.size(); i++ )

View File

@ -872,7 +872,7 @@ void UMat::ndoffset(size_t* ofs) const
void UMat::copyTo(OutputArray _dst) const void UMat::copyTo(OutputArray _dst) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int dtype = _dst.type(); int dtype = _dst.type();
if( _dst.fixedType() && dtype != type() ) if( _dst.fixedType() && dtype != type() )
@ -918,7 +918,7 @@ void UMat::copyTo(OutputArray _dst) const
void UMat::copyTo(OutputArray _dst, InputArray _mask) const void UMat::copyTo(OutputArray _dst, InputArray _mask) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( _mask.empty() ) if( _mask.empty() )
{ {
@ -967,7 +967,7 @@ void UMat::copyTo(OutputArray _dst, InputArray _mask) const
void UMat::convertTo(OutputArray _dst, int _type, double alpha, double beta) const void UMat::convertTo(OutputArray _dst, int _type, double alpha, double beta) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool noScale = std::fabs(alpha - 1) < DBL_EPSILON && std::fabs(beta) < DBL_EPSILON; bool noScale = std::fabs(alpha - 1) < DBL_EPSILON && std::fabs(beta) < DBL_EPSILON;
int stype = type(), cn = CV_MAT_CN(stype); int stype = type(), cn = CV_MAT_CN(stype);
@ -1032,7 +1032,7 @@ void UMat::convertTo(OutputArray _dst, int _type, double alpha, double beta) con
UMat& UMat::setTo(InputArray _value, InputArray _mask) UMat& UMat::setTo(InputArray _value, InputArray _mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
bool haveMask = !_mask.empty(); bool haveMask = !_mask.empty();
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
@ -1172,7 +1172,7 @@ static bool ocl_dot( InputArray _src1, InputArray _src2, double & res )
double UMat::dot(InputArray m) const double UMat::dot(InputArray m) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(m.sameSize(*this) && m.type() == type()); CV_Assert(m.sameSize(*this) && m.type() == type());

View File

@ -87,7 +87,7 @@ cv::String join(const cv::String& base, const cv::String& path)
bool exists(const cv::String& path) bool exists(const cv::String& path)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
#if defined _WIN32 || defined WINCE #if defined _WIN32 || defined WINCE
BOOL status = TRUE; BOOL status = TRUE;
@ -150,7 +150,7 @@ CV_EXPORTS void remove_all(const cv::String& path)
cv::String getcwd() cv::String getcwd()
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
cv::AutoBuffer<char, 4096> buf; cv::AutoBuffer<char, 4096> buf;
#if defined WIN32 || defined _WIN32 || defined WINCE #if defined WIN32 || defined _WIN32 || defined WINCE
#ifdef WINRT #ifdef WINRT
@ -185,7 +185,7 @@ cv::String getcwd()
bool createDirectory(const cv::String& path) bool createDirectory(const cv::String& path)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
#if defined WIN32 || defined _WIN32 || defined WINCE #if defined WIN32 || defined _WIN32 || defined WINCE
#ifdef WINRT #ifdef WINRT
wchar_t wpath[MAX_PATH]; wchar_t wpath[MAX_PATH];

View File

@ -7936,7 +7936,7 @@ static void OAST_9_16(InputArray _img, std::vector<KeyPoint>& keypoints, int thr
void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression) void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16); AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16);
} }
@ -7950,7 +7950,7 @@ public:
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(_image.empty()) if(_image.empty())
{ {
@ -8013,7 +8013,7 @@ Ptr<AgastFeatureDetector> AgastFeatureDetector::create( int threshold, bool nonm
void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression, int type) void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
std::vector<KeyPoint> kpts; std::vector<KeyPoint> kpts;

View File

@ -167,7 +167,7 @@ namespace cv
OutputArray descriptors, OutputArray descriptors,
bool useProvidedKeypoints) CV_OVERRIDE bool useProvidedKeypoints) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( ! image.empty() ); CV_Assert( ! image.empty() );

View File

@ -89,7 +89,7 @@ BOWKMeansTrainer::BOWKMeansTrainer( int _clusterCount, const TermCriteria& _term
Mat BOWKMeansTrainer::cluster() const Mat BOWKMeansTrainer::cluster() const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( !descriptors.empty() ); CV_Assert( !descriptors.empty() );
@ -108,7 +108,7 @@ BOWKMeansTrainer::~BOWKMeansTrainer()
Mat BOWKMeansTrainer::cluster( const Mat& _descriptors ) const Mat BOWKMeansTrainer::cluster( const Mat& _descriptors ) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat labels, vocabulary; Mat labels, vocabulary;
kmeans( _descriptors, clusterCount, labels, termcrit, attempts, flags, vocabulary ); kmeans( _descriptors, clusterCount, labels, termcrit, attempts, flags, vocabulary );
@ -143,7 +143,7 @@ const Mat& BOWImgDescriptorExtractor::getVocabulary() const
void BOWImgDescriptorExtractor::compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray imgDescriptor, void BOWImgDescriptorExtractor::compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray imgDescriptor,
std::vector<std::vector<int> >* pointIdxsOfClusters, Mat* descriptors ) std::vector<std::vector<int> >* pointIdxsOfClusters, Mat* descriptors )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
imgDescriptor.release(); imgDescriptor.release();
@ -174,7 +174,7 @@ int BOWImgDescriptorExtractor::descriptorType() const
void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, OutputArray _imgDescriptor, std::vector<std::vector<int> >* pointIdxsOfClusters ) void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, OutputArray _imgDescriptor, std::vector<std::vector<int> >* pointIdxsOfClusters )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( !vocabulary.empty() ); CV_Assert( !vocabulary.empty() );
CV_Assert(!keypointDescriptors.empty()); CV_Assert(!keypointDescriptors.empty());

View File

@ -190,7 +190,7 @@ void SimpleBlobDetectorImpl::write( cv::FileStorage& fs ) const
void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImage, std::vector<Center> &centers) const void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImage, std::vector<Center> &centers) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat image = _image.getMat(), binaryImage = _binaryImage.getMat(); Mat image = _image.getMat(), binaryImage = _binaryImage.getMat();
CV_UNUSED(image); CV_UNUSED(image);
@ -308,7 +308,7 @@ void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImag
void SimpleBlobDetectorImpl::detect(InputArray image, std::vector<cv::KeyPoint>& keypoints, InputArray mask) void SimpleBlobDetectorImpl::detect(InputArray image, std::vector<cv::KeyPoint>& keypoints, InputArray mask)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
keypoints.clear(); keypoints.clear();
CV_Assert(params.minRepeatability != 0); CV_Assert(params.minRepeatability != 0);

View File

@ -91,7 +91,7 @@ static inline void _drawKeypoint( InputOutputArray img, const KeyPoint& p, const
void drawKeypoints( InputArray image, const std::vector<KeyPoint>& keypoints, InputOutputArray outImage, void drawKeypoints( InputArray image, const std::vector<KeyPoint>& keypoints, InputOutputArray outImage,
const Scalar& _color, int flags ) const Scalar& _color, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( !(flags & DrawMatchesFlags::DRAW_OVER_OUTIMG) ) if( !(flags & DrawMatchesFlags::DRAW_OVER_OUTIMG) )
{ {

View File

@ -179,7 +179,7 @@ void EllipticKeyPoint::calcProjection( const Mat_<double>& H, EllipticKeyPoint&
void EllipticKeyPoint::convert( const std::vector<KeyPoint>& src, std::vector<EllipticKeyPoint>& dst ) void EllipticKeyPoint::convert( const std::vector<KeyPoint>& src, std::vector<EllipticKeyPoint>& dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( !src.empty() ) if( !src.empty() )
{ {
@ -196,7 +196,7 @@ void EllipticKeyPoint::convert( const std::vector<KeyPoint>& src, std::vector<El
void EllipticKeyPoint::convert( const std::vector<EllipticKeyPoint>& src, std::vector<KeyPoint>& dst ) void EllipticKeyPoint::convert( const std::vector<EllipticKeyPoint>& src, std::vector<KeyPoint>& dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( !src.empty() ) if( !src.empty() )
{ {
@ -460,7 +460,7 @@ void cv::evaluateFeatureDetector( const Mat& img1, const Mat& img2, const Mat& H
float& repeatability, int& correspCount, float& repeatability, int& correspCount,
const Ptr<FeatureDetector>& _fdetector ) const Ptr<FeatureDetector>& _fdetector )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Ptr<FeatureDetector> fdetector(_fdetector); Ptr<FeatureDetector> fdetector(_fdetector);
std::vector<KeyPoint> *keypoints1, *keypoints2, buf1, buf2; std::vector<KeyPoint> *keypoints1, *keypoints2, buf1, buf2;
@ -498,7 +498,7 @@ void cv::computeRecallPrecisionCurve( const std::vector<std::vector<DMatch> >& m
const std::vector<std::vector<uchar> >& correctMatches1to2Mask, const std::vector<std::vector<uchar> >& correctMatches1to2Mask,
std::vector<Point2f>& recallPrecisionCurve ) std::vector<Point2f>& recallPrecisionCurve )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( matches1to2.size() == correctMatches1to2Mask.size() ); CV_Assert( matches1to2.size() == correctMatches1to2Mask.size() );
@ -534,7 +534,7 @@ void cv::computeRecallPrecisionCurve( const std::vector<std::vector<DMatch> >& m
float cv::getRecall( const std::vector<Point2f>& recallPrecisionCurve, float l_precision ) float cv::getRecall( const std::vector<Point2f>& recallPrecisionCurve, float l_precision )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int nearestPointIndex = getNearestPoint( recallPrecisionCurve, l_precision ); int nearestPointIndex = getNearestPoint( recallPrecisionCurve, l_precision );
@ -548,7 +548,7 @@ float cv::getRecall( const std::vector<Point2f>& recallPrecisionCurve, float l_p
int cv::getNearestPoint( const std::vector<Point2f>& recallPrecisionCurve, float l_precision ) int cv::getNearestPoint( const std::vector<Point2f>& recallPrecisionCurve, float l_precision )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int nearestPointIndex = -1; int nearestPointIndex = -1;

View File

@ -474,7 +474,7 @@ static inline int hal_FAST(cv::Mat& src, std::vector<KeyPoint>& keypoints, int t
void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression, int type) void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression, int type)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_img.isUMat() && type == FastFeatureDetector::TYPE_9_16, CV_OCL_RUN(_img.isUMat() && type == FastFeatureDetector::TYPE_9_16,
ocl_FAST(_img, keypoints, threshold, nonmax_suppression, 10000)); ocl_FAST(_img, keypoints, threshold, nonmax_suppression, 10000));
@ -509,7 +509,7 @@ void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool
void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression) void FAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, bool nonmax_suppression)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
FAST(_img, keypoints, threshold, nonmax_suppression, FastFeatureDetector::TYPE_9_16); FAST(_img, keypoints, threshold, nonmax_suppression, FastFeatureDetector::TYPE_9_16);
} }
@ -524,7 +524,7 @@ public:
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(_image.empty()) if(_image.empty())
{ {

View File

@ -60,7 +60,7 @@ void Feature2D::detect( InputArray image,
std::vector<KeyPoint>& keypoints, std::vector<KeyPoint>& keypoints,
InputArray mask ) InputArray mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( image.empty() ) if( image.empty() )
{ {
@ -75,7 +75,7 @@ void Feature2D::detect( InputArrayOfArrays _images,
std::vector<std::vector<KeyPoint> >& keypoints, std::vector<std::vector<KeyPoint> >& keypoints,
InputArrayOfArrays _masks ) InputArrayOfArrays _masks )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
vector<Mat> images, masks; vector<Mat> images, masks;
@ -106,7 +106,7 @@ void Feature2D::compute( InputArray image,
std::vector<KeyPoint>& keypoints, std::vector<KeyPoint>& keypoints,
OutputArray descriptors ) OutputArray descriptors )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( image.empty() ) if( image.empty() )
{ {
@ -120,7 +120,7 @@ void Feature2D::compute( InputArrayOfArrays _images,
std::vector<std::vector<KeyPoint> >& keypoints, std::vector<std::vector<KeyPoint> >& keypoints,
OutputArrayOfArrays _descriptors ) OutputArrayOfArrays _descriptors )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( !_descriptors.needed() ) if( !_descriptors.needed() )
return; return;
@ -149,7 +149,7 @@ void Feature2D::detectAndCompute( InputArray, InputArray,
OutputArray, OutputArray,
bool ) bool )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Error(Error::StsNotImplemented, ""); CV_Error(Error::StsNotImplemented, "");
} }

View File

@ -78,7 +78,7 @@ public:
void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE void detect( InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask ) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(_image.empty()) if(_image.empty())
{ {

View File

@ -110,7 +110,7 @@ namespace cv
OutputArray descriptors, OutputArray descriptors,
bool useProvidedKeypoints) CV_OVERRIDE bool useProvidedKeypoints) CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
cv::Mat img = image.getMat(); cv::Mat img = image.getMat();
if (img.channels() > 1) if (img.channels() > 1)

View File

@ -44,7 +44,7 @@ AKAZEFeatures::AKAZEFeatures(const AKAZEOptions& options) : options_(options) {
* @brief This method allocates the memory for the nonlinear diffusion evolution * @brief This method allocates the memory for the nonlinear diffusion evolution
*/ */
void AKAZEFeatures::Allocate_Memory_Evolution(void) { void AKAZEFeatures::Allocate_Memory_Evolution(void) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
float rfactor = 0.0f; float rfactor = 0.0f;
int level_height = 0, level_width = 0; int level_height = 0, level_width = 0;
@ -127,7 +127,7 @@ static inline int getGaussianKernelSize(float sigma) {
static inline void static inline void
nld_step_scalar_one_lane(const Mat& Lt, const Mat& Lf, Mat& Lstep, float step_size, int row_begin, int row_end) nld_step_scalar_one_lane(const Mat& Lt, const Mat& Lf, Mat& Lstep, float step_size, int row_begin, int row_end)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
/* The labeling scheme for this five star stencil: /* The labeling scheme for this five star stencil:
[ a ] [ a ]
[ -1 c +1 ] [ -1 c +1 ]
@ -277,7 +277,7 @@ ocl_non_linear_diffusion_step(InputArray Lt_, InputArray Lf_, OutputArray Lstep_
static inline void static inline void
non_linear_diffusion_step(InputArray Lt_, InputArray Lf_, OutputArray Lstep_, float step_size) non_linear_diffusion_step(InputArray Lt_, InputArray Lf_, OutputArray Lstep_, float step_size)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Lstep_.create(Lt_.size(), Lt_.type()); Lstep_.create(Lt_.size(), Lt_.type());
@ -302,7 +302,7 @@ non_linear_diffusion_step(InputArray Lt_, InputArray Lf_, OutputArray Lstep_, fl
static inline float static inline float
compute_kcontrast(InputArray Lx_, InputArray Ly_, float perc, int nbins) compute_kcontrast(InputArray Lx_, InputArray Ly_, float perc, int nbins)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(nbins > 2); CV_Assert(nbins > 2);
CV_Assert(!Lx_.empty()); CV_Assert(!Lx_.empty());
@ -379,7 +379,7 @@ ocl_pm_g2(InputArray Lx_, InputArray Ly_, OutputArray Lflow_, float kcontrast)
static inline void static inline void
compute_diffusivity(InputArray Lx, InputArray Ly, OutputArray Lflow, float kcontrast, int diffusivity) compute_diffusivity(InputArray Lx, InputArray Ly, OutputArray Lflow, float kcontrast, int diffusivity)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Lflow.create(Lx.size(), Lx.type()); Lflow.create(Lx.size(), Lx.type());
@ -432,7 +432,7 @@ static inline void
create_nonlinear_scale_space(InputArray image, const AKAZEOptions &options, create_nonlinear_scale_space(InputArray image, const AKAZEOptions &options,
const std::vector<std::vector<float > > &tsteps_evolution, std::vector<Evolution<MatType> > &evolution) const std::vector<std::vector<float > > &tsteps_evolution, std::vector<Evolution<MatType> > &evolution)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(evolution.size() > 0); CV_Assert(evolution.size() > 0);
// convert input to grayscale float image if needed // convert input to grayscale float image if needed
@ -575,7 +575,7 @@ ocl_compute_determinant(InputArray Lxx_, InputArray Lxy_, InputArray Lyy_,
static inline void compute_determinant(InputArray Lxx_, InputArray Lxy_, InputArray Lyy_, static inline void compute_determinant(InputArray Lxx_, InputArray Lxy_, InputArray Lyy_,
OutputArray Ldet_, float sigma) OutputArray Ldet_, float sigma)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Ldet_.create(Lxx_.size(), Lxx_.type()); Ldet_.create(Lxx_.size(), Lxx_.type());
@ -647,7 +647,7 @@ private:
*/ */
static inline void static inline void
Compute_Determinant_Hessian_Response(UMatPyramid &evolution) { Compute_Determinant_Hessian_Response(UMatPyramid &evolution) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
DeterminantHessianResponse<UMat> body (evolution); DeterminantHessianResponse<UMat> body (evolution);
body(Range(0, (int)evolution.size())); body(Range(0, (int)evolution.size()));
@ -660,7 +660,7 @@ Compute_Determinant_Hessian_Response(UMatPyramid &evolution) {
*/ */
static inline void static inline void
Compute_Determinant_Hessian_Response(Pyramid &evolution) { Compute_Determinant_Hessian_Response(Pyramid &evolution) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
parallel_for_(Range(0, (int)evolution.size()), DeterminantHessianResponse<Mat>(evolution)); parallel_for_(Range(0, (int)evolution.size()), DeterminantHessianResponse<Mat>(evolution));
} }
@ -673,7 +673,7 @@ Compute_Determinant_Hessian_Response(Pyramid &evolution) {
*/ */
void AKAZEFeatures::Feature_Detection(std::vector<KeyPoint>& kpts) void AKAZEFeatures::Feature_Detection(std::vector<KeyPoint>& kpts)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
kpts.clear(); kpts.clear();
std::vector<Mat> keypoints_by_layers; std::vector<Mat> keypoints_by_layers;
@ -791,7 +791,7 @@ private:
*/ */
void AKAZEFeatures::Find_Scale_Space_Extrema(std::vector<Mat>& keypoints_by_layers) void AKAZEFeatures::Find_Scale_Space_Extrema(std::vector<Mat>& keypoints_by_layers)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
keypoints_by_layers.resize(evolution_.size()); keypoints_by_layers.resize(evolution_.size());
@ -872,7 +872,7 @@ void AKAZEFeatures::Find_Scale_Space_Extrema(std::vector<Mat>& keypoints_by_laye
void AKAZEFeatures::Do_Subpixel_Refinement( void AKAZEFeatures::Do_Subpixel_Refinement(
std::vector<Mat>& keypoints_by_layers, std::vector<KeyPoint>& output_keypoints) std::vector<Mat>& keypoints_by_layers, std::vector<KeyPoint>& output_keypoints)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
for (size_t i = 0; i < keypoints_by_layers.size(); i++) { for (size_t i = 0; i < keypoints_by_layers.size(); i++) {
const MEvolution &e = evolution_[i]; const MEvolution &e = evolution_[i];
@ -1185,7 +1185,7 @@ private:
*/ */
void AKAZEFeatures::Compute_Descriptors(std::vector<KeyPoint>& kpts, OutputArray descriptors) void AKAZEFeatures::Compute_Descriptors(std::vector<KeyPoint>& kpts, OutputArray descriptors)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
for(size_t i = 0; i < kpts.size(); i++) for(size_t i = 0; i < kpts.size(); i++)
{ {
@ -1466,7 +1466,7 @@ private:
*/ */
void AKAZEFeatures::Compute_Keypoints_Orientation(std::vector<KeyPoint>& kpts) const void AKAZEFeatures::Compute_Keypoints_Orientation(std::vector<KeyPoint>& kpts) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
parallel_for_(Range(0, (int)kpts.size()), ComputeKeypointOrientation(kpts, evolution_)); parallel_for_(Range(0, (int)kpts.size()), ComputeKeypointOrientation(kpts, evolution_));
} }

View File

@ -123,7 +123,7 @@ void pm_g1(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) {
* @param k Contrast factor parameter * @param k Contrast factor parameter
*/ */
void pm_g2(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) { void pm_g2(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
_dst.create(_Lx.size(), _Lx.type()); _dst.create(_Lx.size(), _Lx.type());
Mat Lx = _Lx.getMat(); Mat Lx = _Lx.getMat();
@ -227,7 +227,7 @@ void charbonnier_diffusivity(InputArray _Lx, InputArray _Ly, OutputArray _dst, f
* @return k contrast factor * @return k contrast factor
*/ */
float compute_k_percentile(const cv::Mat& img, float perc, float gscale, int nbins, int ksize_x, int ksize_y) { float compute_k_percentile(const cv::Mat& img, float perc, float gscale, int nbins, int ksize_x, int ksize_y) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int nbin = 0, nelements = 0, nthreshold = 0, k = 0; int nbin = 0, nelements = 0, nthreshold = 0, k = 0;
float kperc = 0.0, modg = 0.0; float kperc = 0.0, modg = 0.0;
@ -326,7 +326,7 @@ void compute_scharr_derivatives(const cv::Mat& src, cv::Mat& dst, int xorder, in
* @param scale_ Scale factor or derivative size * @param scale_ Scale factor or derivative size
*/ */
void compute_derivative_kernels(cv::OutputArray _kx, cv::OutputArray _ky, int dx, int dy, int scale) { void compute_derivative_kernels(cv::OutputArray _kx, cv::OutputArray _ky, int dx, int dy, int scale) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int ksize = 3 + 2 * (scale - 1); int ksize = 3 + 2 * (scale - 1);
@ -424,7 +424,7 @@ private:
* dL_by_ds = d(c dL_by_dx)_by_dx + d(c dL_by_dy)_by_dy * dL_by_ds = d(c dL_by_dx)_by_dx + d(c dL_by_dy)_by_dy
*/ */
void nld_step_scalar(cv::Mat& Ld, const cv::Mat& c, cv::Mat& Lstep, float stepsize) { void nld_step_scalar(cv::Mat& Ld, const cv::Mat& c, cv::Mat& Lstep, float stepsize) {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
cv::parallel_for_(cv::Range(1, Lstep.rows - 1), Nld_Step_Scalar_Invoker(Ld, c, Lstep, stepsize), (double)Ld.total()/(1 << 16)); cv::parallel_for_(cv::Range(1, Lstep.rows - 1), Nld_Step_Scalar_Invoker(Ld, c, Lstep, stepsize), (double)Ld.total()/(1 << 16));

View File

@ -156,7 +156,7 @@ private:
void KeyPointsFilter::runByPixelsMask( std::vector<KeyPoint>& keypoints, const Mat& mask ) void KeyPointsFilter::runByPixelsMask( std::vector<KeyPoint>& keypoints, const Mat& mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( mask.empty() ) if( mask.empty() )
return; return;

View File

@ -576,7 +576,7 @@ void DescriptorMatcher::train()
void DescriptorMatcher::match( InputArray queryDescriptors, InputArray trainDescriptors, void DescriptorMatcher::match( InputArray queryDescriptors, InputArray trainDescriptors,
std::vector<DMatch>& matches, InputArray mask ) const std::vector<DMatch>& matches, InputArray mask ) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Ptr<DescriptorMatcher> tempMatcher = clone(true); Ptr<DescriptorMatcher> tempMatcher = clone(true);
tempMatcher->add(trainDescriptors); tempMatcher->add(trainDescriptors);
@ -587,7 +587,7 @@ void DescriptorMatcher::knnMatch( InputArray queryDescriptors, InputArray trainD
std::vector<std::vector<DMatch> >& matches, int knn, std::vector<std::vector<DMatch> >& matches, int knn,
InputArray mask, bool compactResult ) const InputArray mask, bool compactResult ) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Ptr<DescriptorMatcher> tempMatcher = clone(true); Ptr<DescriptorMatcher> tempMatcher = clone(true);
tempMatcher->add(trainDescriptors); tempMatcher->add(trainDescriptors);
@ -598,7 +598,7 @@ void DescriptorMatcher::radiusMatch( InputArray queryDescriptors, InputArray tra
std::vector<std::vector<DMatch> >& matches, float maxDistance, InputArray mask, std::vector<std::vector<DMatch> >& matches, float maxDistance, InputArray mask,
bool compactResult ) const bool compactResult ) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Ptr<DescriptorMatcher> tempMatcher = clone(true); Ptr<DescriptorMatcher> tempMatcher = clone(true);
tempMatcher->add(trainDescriptors); tempMatcher->add(trainDescriptors);
@ -607,7 +607,7 @@ void DescriptorMatcher::radiusMatch( InputArray queryDescriptors, InputArray tra
void DescriptorMatcher::match( InputArray queryDescriptors, std::vector<DMatch>& matches, InputArrayOfArrays masks ) void DescriptorMatcher::match( InputArray queryDescriptors, std::vector<DMatch>& matches, InputArrayOfArrays masks )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
std::vector<std::vector<DMatch> > knnMatches; std::vector<std::vector<DMatch> > knnMatches;
knnMatch( queryDescriptors, knnMatches, 1, masks, true /*compactResult*/ ); knnMatch( queryDescriptors, knnMatches, 1, masks, true /*compactResult*/ );
@ -639,7 +639,7 @@ void DescriptorMatcher::checkMasks( InputArrayOfArrays _masks, int queryDescript
void DescriptorMatcher::knnMatch( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int knn, void DescriptorMatcher::knnMatch( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, int knn,
InputArrayOfArrays masks, bool compactResult ) InputArrayOfArrays masks, bool compactResult )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( empty() || queryDescriptors.empty() ) if( empty() || queryDescriptors.empty() )
return; return;
@ -655,7 +655,7 @@ void DescriptorMatcher::knnMatch( InputArray queryDescriptors, std::vector<std::
void DescriptorMatcher::radiusMatch( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance, void DescriptorMatcher::radiusMatch( InputArray queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
InputArrayOfArrays masks, bool compactResult ) InputArrayOfArrays masks, bool compactResult )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
matches.clear(); matches.clear();
if( empty() || queryDescriptors.empty() ) if( empty() || queryDescriptors.empty() )
@ -1151,7 +1151,7 @@ void FlannBasedMatcher::clear()
void FlannBasedMatcher::train() void FlannBasedMatcher::train()
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( !flannIndex || mergedDescriptors.size() < addedDescCount ) if( !flannIndex || mergedDescriptors.size() < addedDescCount )
{ {
@ -1407,7 +1407,7 @@ void FlannBasedMatcher::convertToDMatches( const DescriptorCollection& collectio
void FlannBasedMatcher::knnMatchImpl( InputArray _queryDescriptors, std::vector<std::vector<DMatch> >& matches, int knn, void FlannBasedMatcher::knnMatchImpl( InputArray _queryDescriptors, std::vector<std::vector<DMatch> >& matches, int knn,
InputArrayOfArrays /*masks*/, bool /*compactResult*/ ) InputArrayOfArrays /*masks*/, bool /*compactResult*/ )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat queryDescriptors = _queryDescriptors.getMat(); Mat queryDescriptors = _queryDescriptors.getMat();
Mat indices( queryDescriptors.rows, knn, CV_32SC1 ); Mat indices( queryDescriptors.rows, knn, CV_32SC1 );
@ -1420,7 +1420,7 @@ void FlannBasedMatcher::knnMatchImpl( InputArray _queryDescriptors, std::vector<
void FlannBasedMatcher::radiusMatchImpl( InputArray _queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance, void FlannBasedMatcher::radiusMatchImpl( InputArray _queryDescriptors, std::vector<std::vector<DMatch> >& matches, float maxDistance,
InputArrayOfArrays /*masks*/, bool /*compactResult*/ ) InputArrayOfArrays /*masks*/, bool /*compactResult*/ )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat queryDescriptors = _queryDescriptors.getMat(); Mat queryDescriptors = _queryDescriptors.getMat();
const int count = mergedDescriptors.size(); // TODO do count as param? const int count = mergedDescriptors.size(); // TODO do count as param?

View File

@ -1036,7 +1036,7 @@ extractMSER_8uC3( const Mat& src,
void MSER_Impl::detectRegions( InputArray _src, vector<vector<Point> >& msers, vector<Rect>& bboxes ) void MSER_Impl::detectRegions( InputArray _src, vector<vector<Point> >& msers, vector<Rect>& bboxes )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
@ -1074,7 +1074,7 @@ void MSER_Impl::detectRegions( InputArray _src, vector<vector<Point> >& msers, v
void MSER_Impl::detect( InputArray _image, vector<KeyPoint>& keypoints, InputArray _mask ) void MSER_Impl::detect( InputArray _image, vector<KeyPoint>& keypoints, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
vector<Rect> bboxes; vector<Rect> bboxes;
vector<vector<Point> > msers; vector<vector<Point> > msers;

View File

@ -957,7 +957,7 @@ void ORB_Impl::detectAndCompute( InputArray _image, InputArray _mask,
std::vector<KeyPoint>& keypoints, std::vector<KeyPoint>& keypoints,
OutputArray _descriptors, bool useProvidedKeypoints ) OutputArray _descriptors, bool useProvidedKeypoints )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(patchSize >= 2); CV_Assert(patchSize >= 2);

View File

@ -365,7 +365,7 @@ Index::Index(InputArray _data, const IndexParams& params, flann_distance_t _dist
void Index::build(InputArray _data, const IndexParams& params, flann_distance_t _distType) void Index::build(InputArray _data, const IndexParams& params, flann_distance_t _distType)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
release(); release();
algo = getParam<flann_algorithm_t>(params, "algorithm", FLANN_INDEX_LINEAR); algo = getParam<flann_algorithm_t>(params, "algorithm", FLANN_INDEX_LINEAR);
@ -435,7 +435,7 @@ Index::~Index()
void Index::release() void Index::release()
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( !index ) if( !index )
return; return;
@ -570,7 +570,7 @@ static void createIndicesDists(OutputArray _indices, OutputArray _dists,
void Index::knnSearch(InputArray _query, OutputArray _indices, void Index::knnSearch(InputArray _query, OutputArray _indices,
OutputArray _dists, int knn, const SearchParams& params) OutputArray _dists, int knn, const SearchParams& params)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat query = _query.getMat(), indices, dists; Mat query = _query.getMat(), indices, dists;
int dtype = distType == FLANN_DIST_HAMMING ? CV_32S : CV_32F; int dtype = distType == FLANN_DIST_HAMMING ? CV_32S : CV_32F;
@ -614,7 +614,7 @@ int Index::radiusSearch(InputArray _query, OutputArray _indices,
OutputArray _dists, double radius, int maxResults, OutputArray _dists, double radius, int maxResults,
const SearchParams& params) const SearchParams& params)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat query = _query.getMat(), indices, dists; Mat query = _query.getMat(), indices, dists;
int dtype = distType == FLANN_DIST_HAMMING ? CV_32S : CV_32F; int dtype = distType == FLANN_DIST_HAMMING ? CV_32S : CV_32F;
@ -679,7 +679,7 @@ template<typename Distance> void saveIndex(const Index* index0, const void* inde
void Index::save(const String& filename) const void Index::save(const String& filename) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
FILE* fout = fopen(filename.c_str(), "wb"); FILE* fout = fopen(filename.c_str(), "wb");
if (fout == NULL) if (fout == NULL)

View File

@ -170,7 +170,7 @@ namespace cv
{ {
static bool ipp_accumulate(InputArray _src, InputOutputArray _dst, InputArray _mask) static bool ipp_accumulate(InputArray _src, InputOutputArray _dst, InputArray _mask)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype);
@ -307,7 +307,7 @@ static bool openvx_accumulate(InputArray _src, InputOutputArray _dst, InputArray
void cv::accumulate( InputArray _src, InputOutputArray _dst, InputArray _mask ) void cv::accumulate( InputArray _src, InputOutputArray _dst, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype);
@ -345,7 +345,7 @@ namespace cv
{ {
static bool ipp_accumulate_square(InputArray _src, InputOutputArray _dst, InputArray _mask) static bool ipp_accumulate_square(InputArray _src, InputOutputArray _dst, InputArray _mask)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype);
@ -406,7 +406,7 @@ static bool ipp_accumulate_square(InputArray _src, InputOutputArray _dst, InputA
void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _mask ) void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype);
@ -444,7 +444,7 @@ namespace cv
static bool ipp_accumulate_product(InputArray _src1, InputArray _src2, static bool ipp_accumulate_product(InputArray _src1, InputArray _src2,
InputOutputArray _dst, InputArray _mask) InputOutputArray _dst, InputArray _mask)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int stype = _src1.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src1.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype);
@ -511,7 +511,7 @@ static bool ipp_accumulate_product(InputArray _src1, InputArray _src2,
void cv::accumulateProduct( InputArray _src1, InputArray _src2, void cv::accumulateProduct( InputArray _src1, InputArray _src2,
InputOutputArray _dst, InputArray _mask ) InputOutputArray _dst, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src1.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src1.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype);
@ -547,7 +547,7 @@ namespace cv
static bool ipp_accumulate_weighted( InputArray _src, InputOutputArray _dst, static bool ipp_accumulate_weighted( InputArray _src, InputOutputArray _dst,
double alpha, InputArray _mask ) double alpha, InputArray _mask )
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype);
@ -611,7 +611,7 @@ static bool ipp_accumulate_weighted( InputArray _src, InputOutputArray _dst,
void cv::accumulateWeighted( InputArray _src, InputOutputArray _dst, void cv::accumulateWeighted( InputArray _src, InputOutputArray _dst,
double alpha, InputArray _mask ) double alpha, InputArray _mask )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype);
int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype);

View File

@ -675,7 +675,7 @@ approxPolyDP_( const Point_<T>* src_contour, int count0, Point_<T>* dst_contour,
void cv::approxPolyDP( InputArray _curve, OutputArray _approxCurve, void cv::approxPolyDP( InputArray _curve, OutputArray _approxCurve,
double epsilon, bool closed ) double epsilon, bool closed )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat curve = _curve.getMat(); Mat curve = _curve.getMat();
int npoints = curve.checkVector(2), depth = curve.depth(); int npoints = curve.checkVector(2), depth = curve.depth();

View File

@ -375,7 +375,7 @@ static bool ocl_blendLinear( InputArray _src1, InputArray _src2, InputArray _wei
void cv::blendLinear( InputArray _src1, InputArray _src2, InputArray _weights1, InputArray _weights2, OutputArray _dst ) void cv::blendLinear( InputArray _src1, InputArray _src2, InputArray _weights1, InputArray _weights2, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src1.type(), depth = CV_MAT_DEPTH(type); int type = _src1.type(), depth = CV_MAT_DEPTH(type);
Size size = _src1.size(); Size size = _src1.size();

View File

@ -58,7 +58,7 @@ namespace cv
static bool ipp_Canny(const Mat& src , const Mat& dx_, const Mat& dy_, Mat& dst, float low, float high, bool L2gradient, int aperture_size) static bool ipp_Canny(const Mat& src , const Mat& dx_, const Mat& dy_, Mat& dst, float low, float high, bool L2gradient, int aperture_size)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_DISABLE_PERF_CANNY_MT #if IPP_DISABLE_PERF_CANNY_MT
if(cv::getNumThreads()>1) if(cv::getNumThreads()>1)
@ -139,7 +139,7 @@ template <bool useCustomDeriv>
static bool ocl_Canny(InputArray _src, const UMat& dx_, const UMat& dy_, OutputArray _dst, float low_thresh, float high_thresh, static bool ocl_Canny(InputArray _src, const UMat& dx_, const UMat& dy_, OutputArray _dst, float low_thresh, float high_thresh,
int aperture_size, bool L2gradient, int cn, const Size & size) int aperture_size, bool L2gradient, int cn, const Size & size)
{ {
CV_INSTRUMENT_REGION_OPENCL() CV_INSTRUMENT_REGION_OPENCL();
UMat map; UMat map;
@ -942,7 +942,7 @@ void Canny( InputArray _src, OutputArray _dst,
double low_thresh, double high_thresh, double low_thresh, double high_thresh,
int aperture_size, bool L2gradient ) int aperture_size, bool L2gradient )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _src.depth() == CV_8U ); CV_Assert( _src.depth() == CV_8U );
@ -1056,7 +1056,7 @@ void Canny( InputArray _dx, InputArray _dy, OutputArray _dst,
double low_thresh, double high_thresh, double low_thresh, double high_thresh,
bool L2gradient ) bool L2gradient )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(_dx.dims() == 2); CV_Assert(_dx.dims() == 2);
CV_Assert(_dx.type() == CV_16SC1 || _dx.type() == CV_16SC3); CV_Assert(_dx.type() == CV_16SC1 || _dx.type() == CV_16SC3);

View File

@ -346,7 +346,7 @@ namespace
void CLAHE_Impl::apply(cv::InputArray _src, cv::OutputArray _dst) void CLAHE_Impl::apply(cv::InputArray _src, cv::OutputArray _dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _src.type() == CV_8UC1 || _src.type() == CV_16UC1 ); CV_Assert( _src.type() == CV_8UC1 || _src.type() == CV_16UC1 );

View File

@ -176,7 +176,7 @@ void cvtColorTwoPlane( InputArray _ysrc, InputArray _uvsrc, OutputArray _dst, in
void cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) void cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(!_src.empty()); CV_Assert(!_src.empty());

View File

@ -1239,7 +1239,7 @@ void cvtBGRtoHSV(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int scn, bool swapBlue, bool isFullRange, bool isHSV) int depth, int scn, bool swapBlue, bool isFullRange, bool isHSV)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoHSV, cv_hal_cvtBGRtoHSV, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isFullRange, isHSV); CALL_HAL(cvtBGRtoHSV, cv_hal_cvtBGRtoHSV, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isFullRange, isHSV);
@ -1326,7 +1326,7 @@ void cvtHSVtoBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int dcn, bool swapBlue, bool isFullRange, bool isHSV) int depth, int dcn, bool swapBlue, bool isFullRange, bool isHSV)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtHSVtoBGR, cv_hal_cvtHSVtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isFullRange, isHSV); CALL_HAL(cvtHSVtoBGR, cv_hal_cvtHSVtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isFullRange, isHSV);

View File

@ -4094,7 +4094,7 @@ void cvtBGRtoXYZ(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int scn, bool swapBlue) int depth, int scn, bool swapBlue)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoXYZ, cv_hal_cvtBGRtoXYZ, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue); CALL_HAL(cvtBGRtoXYZ, cv_hal_cvtBGRtoXYZ, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue);
@ -4145,7 +4145,7 @@ void cvtXYZtoBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int dcn, bool swapBlue) int depth, int dcn, bool swapBlue)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtXYZtoBGR, cv_hal_cvtXYZtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue); CALL_HAL(cvtXYZtoBGR, cv_hal_cvtXYZtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue);
@ -4197,7 +4197,7 @@ void cvtBGRtoLab(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int scn, bool swapBlue, bool isLab, bool srgb) int depth, int scn, bool swapBlue, bool isLab, bool srgb)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoLab, cv_hal_cvtBGRtoLab, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isLab, srgb); CALL_HAL(cvtBGRtoLab, cv_hal_cvtBGRtoLab, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isLab, srgb);
@ -4294,7 +4294,7 @@ void cvtLabtoBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int dcn, bool swapBlue, bool isLab, bool srgb) int depth, int dcn, bool swapBlue, bool isLab, bool srgb)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtLabtoBGR, cv_hal_cvtLabtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isLab, srgb); CALL_HAL(cvtLabtoBGR, cv_hal_cvtLabtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isLab, srgb);

View File

@ -1371,7 +1371,7 @@ void cvtBGRtoBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int scn, int dcn, bool swapBlue) int depth, int scn, int dcn, bool swapBlue)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoBGR, cv_hal_cvtBGRtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, scn, dcn, swapBlue); CALL_HAL(cvtBGRtoBGR, cv_hal_cvtBGRtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, scn, dcn, swapBlue);
@ -1434,7 +1434,7 @@ void cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int scn, bool swapBlue, int greenBits) int scn, bool swapBlue, int greenBits)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoBGR5x5, cv_hal_cvtBGRtoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, greenBits); CALL_HAL(cvtBGRtoBGR5x5, cv_hal_cvtBGRtoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, greenBits);
@ -1447,7 +1447,7 @@ void cvtBGR5x5toBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int dcn, bool swapBlue, int greenBits) int dcn, bool swapBlue, int greenBits)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGR5x5toBGR, cv_hal_cvtBGR5x5toBGR, src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, greenBits); CALL_HAL(cvtBGR5x5toBGR, cv_hal_cvtBGR5x5toBGR, src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, greenBits);
@ -1460,7 +1460,7 @@ void cvtBGRtoGray(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int scn, bool swapBlue) int depth, int scn, bool swapBlue)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoGray, cv_hal_cvtBGRtoGray, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue); CALL_HAL(cvtBGRtoGray, cv_hal_cvtBGRtoGray, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue);
@ -1509,7 +1509,7 @@ void cvtGraytoBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int dcn) int depth, int dcn)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtGraytoBGR, cv_hal_cvtGraytoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn); CALL_HAL(cvtGraytoBGR, cv_hal_cvtGraytoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn);
@ -1558,7 +1558,7 @@ void cvtBGR5x5toGray(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int greenBits) int greenBits)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGR5x5toGray, cv_hal_cvtBGR5x5toGray, src_data, src_step, dst_data, dst_step, width, height, greenBits); CALL_HAL(cvtBGR5x5toGray, cv_hal_cvtBGR5x5toGray, src_data, src_step, dst_data, dst_step, width, height, greenBits);
CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, RGB5x52Gray(greenBits)); CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, RGB5x52Gray(greenBits));
@ -1570,7 +1570,7 @@ void cvtGraytoBGR5x5(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int greenBits) int greenBits)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtGraytoBGR5x5, cv_hal_cvtGraytoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, greenBits); CALL_HAL(cvtGraytoBGR5x5, cv_hal_cvtGraytoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, greenBits);
CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, Gray2RGB5x5(greenBits)); CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, Gray2RGB5x5(greenBits));
@ -1580,7 +1580,7 @@ void cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_step,
uchar * dst_data, size_t dst_step, uchar * dst_data, size_t dst_step,
int width, int height) int width, int height)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtRGBAtoMultipliedRGBA, cv_hal_cvtRGBAtoMultipliedRGBA, src_data, src_step, dst_data, dst_step, width, height); CALL_HAL(cvtRGBAtoMultipliedRGBA, cv_hal_cvtRGBAtoMultipliedRGBA, src_data, src_step, dst_data, dst_step, width, height);
@ -1600,7 +1600,7 @@ void cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_step,
uchar * dst_data, size_t dst_step, uchar * dst_data, size_t dst_step,
int width, int height) int width, int height)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtMultipliedRGBAtoRGBA, cv_hal_cvtMultipliedRGBAtoRGBA, src_data, src_step, dst_data, dst_step, width, height); CALL_HAL(cvtMultipliedRGBAtoRGBA, cv_hal_cvtMultipliedRGBAtoRGBA, src_data, src_step, dst_data, dst_step, width, height);
CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, mRGBA2RGBA<uchar>()); CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, mRGBA2RGBA<uchar>());

View File

@ -2268,7 +2268,7 @@ void cvtBGRtoYUV(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int scn, bool swapBlue, bool isCbCr) int depth, int scn, bool swapBlue, bool isCbCr)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoYUV, cv_hal_cvtBGRtoYUV, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isCbCr); CALL_HAL(cvtBGRtoYUV, cv_hal_cvtBGRtoYUV, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isCbCr);
@ -2321,7 +2321,7 @@ void cvtYUVtoBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int depth, int dcn, bool swapBlue, bool isCbCr) int depth, int dcn, bool swapBlue, bool isCbCr)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtYUVtoBGR, cv_hal_cvtYUVtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isCbCr); CALL_HAL(cvtYUVtoBGR, cv_hal_cvtYUVtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isCbCr);
@ -2410,7 +2410,7 @@ void cvtThreePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
int dst_width, int dst_height, int dst_width, int dst_height,
int dcn, bool swapBlue, int uIdx) int dcn, bool swapBlue, int uIdx)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtThreePlaneYUVtoBGR, cv_hal_cvtThreePlaneYUVtoBGR, src_data, src_step, dst_data, dst_step, dst_width, dst_height, dcn, swapBlue, uIdx); CALL_HAL(cvtThreePlaneYUVtoBGR, cv_hal_cvtThreePlaneYUVtoBGR, src_data, src_step, dst_data, dst_step, dst_width, dst_height, dcn, swapBlue, uIdx);
const uchar* u = src_data + src_step * static_cast<size_t>(dst_height); const uchar* u = src_data + src_step * static_cast<size_t>(dst_height);
@ -2437,7 +2437,7 @@ void cvtBGRtoThreePlaneYUV(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int scn, bool swapBlue, int uIdx) int scn, bool swapBlue, int uIdx)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtBGRtoThreePlaneYUV, cv_hal_cvtBGRtoThreePlaneYUV, src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, uIdx); CALL_HAL(cvtBGRtoThreePlaneYUV, cv_hal_cvtBGRtoThreePlaneYUV, src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, uIdx);
uchar * uv_data = dst_data + dst_step * height; uchar * uv_data = dst_data + dst_step * height;
@ -2460,7 +2460,7 @@ void cvtOnePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
int width, int height, int width, int height,
int dcn, bool swapBlue, int uIdx, int ycn) int dcn, bool swapBlue, int uIdx, int ycn)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CALL_HAL(cvtOnePlaneYUVtoBGR, cv_hal_cvtOnePlaneYUVtoBGR, src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, uIdx, ycn); CALL_HAL(cvtOnePlaneYUVtoBGR, cv_hal_cvtOnePlaneYUVtoBGR, src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, uIdx, ycn);
int blueIdx = swapBlue ? 2 : 0; int blueIdx = swapBlue ? 2 : 0;

View File

@ -507,7 +507,7 @@ namespace colormap
void ColorMap::operator()(InputArray _src, OutputArray _dst) const void ColorMap::operator()(InputArray _src, OutputArray _dst) const
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if(_lut.total() != 256) if(_lut.total() != 256)
CV_Error(Error::StsAssert, "cv::LUT only supports tables of size 256."); CV_Error(Error::StsAssert, "cv::LUT only supports tables of size 256.");

View File

@ -1877,7 +1877,7 @@ cvFindContours( void* img, CvMemStorage* storage,
void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours, void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours,
OutputArray _hierarchy, int mode, int method, Point offset ) OutputArray _hierarchy, int mode, int method, Point offset )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
// Sanity check: output must be of type vector<vector<Point>> // Sanity check: output must be of type vector<vector<Point>>
CV_Assert((_contours.kind() == _InputArray::STD_VECTOR_VECTOR || _contours.kind() == _InputArray::STD_VECTOR_MAT || CV_Assert((_contours.kind() == _InputArray::STD_VECTOR_VECTOR || _contours.kind() == _InputArray::STD_VECTOR_MAT ||
@ -1942,7 +1942,7 @@ void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours,
void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours, void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours,
int mode, int method, Point offset) int mode, int method, Point offset)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
findContours(_image, _contours, noArray(), mode, method, offset); findContours(_image, _contours, noArray(), mode, method, offset);
} }

View File

@ -128,7 +128,7 @@ struct CHullCmpPoints
void convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool returnPoints ) void convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool returnPoints )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert(_points.getObj() != _hull.getObj()); CV_Assert(_points.getObj() != _hull.getObj());
Mat points = _points.getMat(); Mat points = _points.getMat();
@ -267,7 +267,7 @@ void convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool ret
void convexityDefects( InputArray _points, InputArray _hull, OutputArray _defects ) void convexityDefects( InputArray _points, InputArray _hull, OutputArray _defects )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat points = _points.getMat(); Mat points = _points.getMat();
int i, j = 0, npoints = points.checkVector(2, CV_32S); int i, j = 0, npoints = points.checkVector(2, CV_32S);

View File

@ -493,7 +493,7 @@ namespace cv
static bool ipp_cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType ) static bool ipp_cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType )
{ {
#if IPP_VERSION_X100 >= 800 #if IPP_VERSION_X100 >= 800
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
Mat src = _src.getMat(); Mat src = _src.getMat();
_dst.create( src.size(), CV_32FC1 ); _dst.create( src.size(), CV_32FC1 );
@ -565,7 +565,7 @@ static bool ipp_cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockS
void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType ) void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(), CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(),
ocl_cornerMinEigenValVecs(_src, _dst, blockSize, ksize, 0.0, borderType, MINEIGENVAL)) ocl_cornerMinEigenValVecs(_src, _dst, blockSize, ksize, 0.0, borderType, MINEIGENVAL))
@ -594,7 +594,7 @@ namespace cv
static bool ipp_cornerHarris( Mat &src, Mat &dst, int blockSize, int ksize, double k, int borderType ) static bool ipp_cornerHarris( Mat &src, Mat &dst, int blockSize, int ksize, double k, int borderType )
{ {
#if IPP_VERSION_X100 >= 810 #if IPP_VERSION_X100 >= 810
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
{ {
int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
@ -649,7 +649,7 @@ static bool ipp_cornerHarris( Mat &src, Mat &dst, int blockSize, int ksize, doub
void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksize, double k, int borderType ) void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksize, double k, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(), CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(),
ocl_cornerMinEigenValVecs(_src, _dst, blockSize, ksize, k, borderType, HARRIS)) ocl_cornerMinEigenValVecs(_src, _dst, blockSize, ksize, k, borderType, HARRIS))
@ -672,7 +672,7 @@ void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksi
void cv::cornerEigenValsAndVecs( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType ) void cv::cornerEigenValsAndVecs( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
Size dsz = _dst.size(); Size dsz = _dst.size();
@ -687,7 +687,7 @@ void cv::cornerEigenValsAndVecs( InputArray _src, OutputArray _dst, int blockSiz
void cv::preCornerDetect( InputArray _src, OutputArray _dst, int ksize, int borderType ) void cv::preCornerDetect( InputArray _src, OutputArray _dst, int ksize, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = _src.type(); int type = _src.type();
CV_Assert( type == CV_8UC1 || type == CV_32FC1 ); CV_Assert( type == CV_8UC1 || type == CV_32FC1 );

View File

@ -44,7 +44,7 @@
void cv::cornerSubPix( InputArray _image, InputOutputArray _corners, void cv::cornerSubPix( InputArray _image, InputOutputArray _corners,
Size win, Size zeroZone, TermCriteria criteria ) Size win, Size zeroZone, TermCriteria criteria )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const int MAX_ITERS = 100; const int MAX_ITERS = 100;
int win_w = win.width * 2 + 1, win_h = win.height * 2 + 1; int win_w = win.width * 2 + 1, win_h = win.height * 2 + 1;

View File

@ -1661,7 +1661,7 @@ static void Bayer2RGB_EdgeAware_T(const Mat& src, Mat& dst, int code)
void cv::demosaicing(InputArray _src, OutputArray _dst, int code, int dcn) void cv::demosaicing(InputArray _src, OutputArray _dst, int code, int dcn)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(), dst; Mat src = _src.getMat(), dst;
Size sz = src.size(); Size sz = src.size();

View File

@ -267,7 +267,7 @@ namespace cv
static bool ipp_Deriv(InputArray _src, OutputArray _dst, int dx, int dy, int ksize, double scale, double delta, int borderType) static bool ipp_Deriv(InputArray _src, OutputArray _dst, int dx, int dy, int ksize, double scale, double delta, int borderType)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
::ipp::IwiSize size(_src.size().width, _src.size().height); ::ipp::IwiSize size(_src.size().width, _src.size().height);
IppDataType srcType = ippiGetDataType(_src.depth()); IppDataType srcType = ippiGetDataType(_src.depth());
@ -414,7 +414,7 @@ static bool ocl_sepFilter3x3_8UC1(InputArray _src, OutputArray _dst, int ddepth,
void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
int ksize, double scale, double delta, int borderType ) int ksize, double scale, double delta, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype);
if (ddepth < 0) if (ddepth < 0)
@ -466,7 +466,7 @@ void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
void cv::Scharr( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, void cv::Scharr( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
double scale, double delta, int borderType ) double scale, double delta, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype);
if (ddepth < 0) if (ddepth < 0)
@ -714,7 +714,7 @@ namespace cv
static bool ipp_Laplacian(InputArray _src, OutputArray _dst, int ksize, double scale, double delta, int borderType) static bool ipp_Laplacian(InputArray _src, OutputArray _dst, int ksize, double scale, double delta, int borderType)
{ {
#ifdef HAVE_IPP_IW #ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
::ipp::IwiSize size(_src.size().width, _src.size().height); ::ipp::IwiSize size(_src.size().width, _src.size().height);
IppDataType srcType = ippiGetDataType(_src.depth()); IppDataType srcType = ippiGetDataType(_src.depth());
@ -783,7 +783,7 @@ static bool ipp_Laplacian(InputArray _src, OutputArray _dst, int ksize, double s
void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize, void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize,
double scale, double delta, int borderType ) double scale, double delta, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype);
if (ddepth < 0) if (ddepth < 0)

View File

@ -685,7 +685,7 @@ namespace cv
{ {
static void distanceTransform_L1_8U(InputArray _src, OutputArray _dst) static void distanceTransform_L1_8U(InputArray _src, OutputArray _dst)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(); Mat src = _src.getMat();
@ -716,7 +716,7 @@ static void distanceTransform_L1_8U(InputArray _src, OutputArray _dst)
void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labels, void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labels,
int distType, int maskSize, int labelType ) int distType, int maskSize, int labelType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat src = _src.getMat(), labels; Mat src = _src.getMat(), labels;
bool need_labels = _labels.needed(); bool need_labels = _labels.needed();
@ -858,7 +858,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
void cv::distanceTransform( InputArray _src, OutputArray _dst, void cv::distanceTransform( InputArray _src, OutputArray _dst,
int distanceType, int maskSize, int dstType) int distanceType, int maskSize, int dstType)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if (distanceType == CV_DIST_L1 && dstType==CV_8U) if (distanceType == CV_DIST_L1 && dstType==CV_8U)
distanceTransform_L1_8U(_src, _dst); distanceTransform_L1_8U(_src, _dst);

View File

@ -91,7 +91,7 @@ bool clipLine( Size img_size, Point& pt1, Point& pt2 )
bool clipLine( Size2l img_size, Point2l& pt1, Point2l& pt2 ) bool clipLine( Size2l img_size, Point2l& pt1, Point2l& pt2 )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int c1, c2; int c1, c2;
int64 right = img_size.width-1, bottom = img_size.height-1; int64 right = img_size.width-1, bottom = img_size.height-1;
@ -146,7 +146,7 @@ bool clipLine( Size2l img_size, Point2l& pt1, Point2l& pt2 )
bool clipLine( Rect img_rect, Point& pt1, Point& pt2 ) bool clipLine( Rect img_rect, Point& pt1, Point& pt2 )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Point tl = img_rect.tl(); Point tl = img_rect.tl();
pt1 -= tl; pt2 -= tl; pt1 -= tl; pt2 -= tl;
@ -959,7 +959,7 @@ void ellipse2Poly( Point2d center, Size2d axes, int angle,
int arc_start, int arc_end, int arc_start, int arc_end,
int delta, std::vector<Point2d>& pts ) int delta, std::vector<Point2d>& pts )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
float alpha, beta; float alpha, beta;
int i; int i;
@ -1801,7 +1801,7 @@ void drawMarker(Mat& img, Point position, const Scalar& color, int markerType, i
void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color, void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color,
int thickness, int line_type, int shift ) int thickness, int line_type, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
@ -1819,7 +1819,7 @@ void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color,
void arrowedLine(InputOutputArray img, Point pt1, Point pt2, const Scalar& color, void arrowedLine(InputOutputArray img, Point pt1, Point pt2, const Scalar& color,
int thickness, int line_type, int shift, double tipLength) int thickness, int line_type, int shift, double tipLength)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
const double tipSize = norm(pt1-pt2)*tipLength; // Factor to normalize the size of the tip depending on the length of the arrow const double tipSize = norm(pt1-pt2)*tipLength; // Factor to normalize the size of the tip depending on the length of the arrow
@ -1840,7 +1840,7 @@ void rectangle( InputOutputArray _img, Point pt1, Point pt2,
const Scalar& color, int thickness, const Scalar& color, int thickness,
int lineType, int shift ) int lineType, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
@ -1873,7 +1873,7 @@ void rectangle( Mat& img, Rect rec,
const Scalar& color, int thickness, const Scalar& color, int thickness,
int lineType, int shift ) int lineType, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( 0 <= shift && shift <= XY_SHIFT ); CV_Assert( 0 <= shift && shift <= XY_SHIFT );
if( rec.area() > 0 ) if( rec.area() > 0 )
@ -1885,7 +1885,7 @@ void rectangle( Mat& img, Rect rec,
void circle( InputOutputArray _img, Point center, int radius, void circle( InputOutputArray _img, Point center, int radius,
const Scalar& color, int thickness, int line_type, int shift ) const Scalar& color, int thickness, int line_type, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
@ -1917,7 +1917,7 @@ void ellipse( InputOutputArray _img, Point center, Size axes,
double angle, double start_angle, double end_angle, double angle, double start_angle, double end_angle,
const Scalar& color, int thickness, int line_type, int shift ) const Scalar& color, int thickness, int line_type, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
@ -1947,7 +1947,7 @@ void ellipse( InputOutputArray _img, Point center, Size axes,
void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color, void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color,
int thickness, int lineType) int thickness, int lineType)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
@ -1975,7 +1975,7 @@ void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color,
void fillConvexPoly( Mat& img, const Point* pts, int npts, void fillConvexPoly( Mat& img, const Point* pts, int npts,
const Scalar& color, int line_type, int shift ) const Scalar& color, int line_type, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( !pts || npts <= 0 ) if( !pts || npts <= 0 )
return; return;
@ -1995,7 +1995,7 @@ void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours,
const Scalar& color, int line_type, const Scalar& color, int line_type,
int shift, Point offset ) int shift, Point offset )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( line_type == CV_AA && img.depth() != CV_8U ) if( line_type == CV_AA && img.depth() != CV_8U )
line_type = 8; line_type = 8;
@ -2025,7 +2025,7 @@ void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours,
void polylines( Mat& img, const Point* const* pts, const int* npts, int ncontours, bool isClosed, void polylines( Mat& img, const Point* const* pts, const int* npts, int ncontours, bool isClosed,
const Scalar& color, int thickness, int line_type, int shift ) const Scalar& color, int thickness, int line_type, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if( line_type == CV_AA && img.depth() != CV_8U ) if( line_type == CV_AA && img.depth() != CV_8U )
line_type = 8; line_type = 8;
@ -2265,7 +2265,7 @@ void putText( InputOutputArray _img, const String& text, Point org,
int thickness, int line_type, bool bottomLeftOrigin ) int thickness, int line_type, bool bottomLeftOrigin )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if ( text.empty() ) if ( text.empty() )
{ {
@ -2375,7 +2375,7 @@ double getFontScaleFromHeight(const int fontFace, const int pixelHeight, const i
void cv::fillConvexPoly(InputOutputArray _img, InputArray _points, void cv::fillConvexPoly(InputOutputArray _img, InputArray _points,
const Scalar& color, int lineType, int shift) const Scalar& color, int lineType, int shift)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(), points = _points.getMat(); Mat img = _img.getMat(), points = _points.getMat();
CV_Assert(points.checkVector(2, CV_32S) >= 0); CV_Assert(points.checkVector(2, CV_32S) >= 0);
@ -2386,7 +2386,7 @@ void cv::fillConvexPoly(InputOutputArray _img, InputArray _points,
void cv::fillPoly(InputOutputArray _img, InputArrayOfArrays pts, void cv::fillPoly(InputOutputArray _img, InputArrayOfArrays pts,
const Scalar& color, int lineType, int shift, Point offset) const Scalar& color, int lineType, int shift, Point offset)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
int i, ncontours = (int)pts.total(); int i, ncontours = (int)pts.total();
@ -2412,7 +2412,7 @@ void cv::polylines(InputOutputArray _img, InputArrayOfArrays pts,
bool isClosed, const Scalar& color, bool isClosed, const Scalar& color,
int thickness, int lineType, int shift ) int thickness, int lineType, int shift )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
bool manyContours = pts.kind() == _InputArray::STD_VECTOR_VECTOR || bool manyContours = pts.kind() == _InputArray::STD_VECTOR_VECTOR ||
@ -2476,7 +2476,7 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours,
int lineType, InputArray _hierarchy, int lineType, InputArray _hierarchy,
int maxLevel, Point offset ) int maxLevel, Point offset )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat image = _image.getMat(), hierarchy = _hierarchy.getMat(); Mat image = _image.getMat(), hierarchy = _hierarchy.getMat();
CvMat _cimage = cvMat(image); CvMat _cimage = cvMat(image);

View File

@ -1151,7 +1151,7 @@ float cv::EMD( InputArray _signature1, InputArray _signature2,
int distType, InputArray _cost, int distType, InputArray _cost,
float* lowerBound, OutputArray _flow ) float* lowerBound, OutputArray _flow )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat signature1 = _signature1.getMat(), signature2 = _signature2.getMat(); Mat signature1 = _signature1.getMat(), signature2 = _signature2.getMat();
Mat cost = _cost.getMat(), flow; Mat cost = _cost.getMat(), flow;

View File

@ -363,7 +363,7 @@ void cv::goodFeaturesToTrack( InputArray _image, OutputArray _corners,
InputArray _mask, int blockSize, int gradientSize, InputArray _mask, int blockSize, int gradientSize,
bool useHarrisDetector, double harrisK ) bool useHarrisDetector, double harrisK )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( qualityLevel > 0 && minDistance >= 0 && maxCorners >= 0 ); CV_Assert( qualityLevel > 0 && minDistance >= 0 && maxCorners >= 0 );
CV_Assert( _mask.empty() || (_mask.type() == CV_8UC1 && _mask.sameSize(_image)) ); CV_Assert( _mask.empty() || (_mask.type() == CV_8UC1 && _mask.sameSize(_image)) );

View File

@ -383,7 +383,7 @@ int FilterEngine::proceed( const uchar* src, int srcstep, int count,
void FilterEngine::apply(const Mat& src, Mat& dst, const Size & wsz, const Point & ofs) void FilterEngine::apply(const Mat& src, Mat& dst, const Size & wsz, const Point & ofs)
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( src.type() == srcType && dst.type() == dstType ); CV_Assert( src.type() == srcType && dst.type() == dstType );
@ -1426,7 +1426,7 @@ private:
mutable int bufsz; mutable int bufsz;
int ippiOperator(const uchar* _src, uchar* _dst, int width, int cn) const int ippiOperator(const uchar* _src, uchar* _dst, int width, int cn) const
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
int _ksize = kernel.rows + kernel.cols - 1; int _ksize = kernel.rows + kernel.cols - 1;
if ((1 != cn && 3 != cn) || width < _ksize*8) if ((1 != cn && 3 != cn) || width < _ksize*8)
@ -4895,7 +4895,7 @@ void cv::filter2D( InputArray _src, OutputArray _dst, int ddepth,
InputArray _kernel, Point anchor0, InputArray _kernel, Point anchor0,
double delta, int borderType ) double delta, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2, CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2,
ocl_filter2D(_src, _dst, ddepth, _kernel, anchor0, delta, borderType)) ocl_filter2D(_src, _dst, ddepth, _kernel, anchor0, delta, borderType))
@ -4926,7 +4926,7 @@ void cv::sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
InputArray _kernelX, InputArray _kernelY, Point anchor, InputArray _kernelX, InputArray _kernelY, Point anchor,
double delta, int borderType ) double delta, int borderType )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2 && (size_t)_src.rows() > _kernelY.total() && (size_t)_src.cols() > _kernelX.total(), CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2 && (size_t)_src.rows() > _kernelY.total() && (size_t)_src.cols() > _kernelX.total(),
ocl_sepFilter2D(_src, _dst, ddepth, _kernelX, _kernelY, anchor, delta, borderType)) ocl_sepFilter2D(_src, _dst, ddepth, _kernelX, _kernelY, anchor, delta, borderType))

View File

@ -459,7 +459,7 @@ int cv::floodFill( InputOutputArray _image, InputOutputArray _mask,
Point seedPoint, Scalar newVal, Rect* rect, Point seedPoint, Scalar newVal, Rect* rect,
Scalar loDiff, Scalar upDiff, int flags ) Scalar loDiff, Scalar upDiff, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
ConnectedComp comp; ConnectedComp comp;
std::vector<FFillSegment> buffer; std::vector<FFillSegment> buffer;
@ -630,7 +630,7 @@ int cv::floodFill( InputOutputArray _image, Point seedPoint,
Scalar newVal, Rect* rect, Scalar newVal, Rect* rect,
Scalar loDiff, Scalar upDiff, int flags ) Scalar loDiff, Scalar upDiff, int flags )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
return floodFill(_image, Mat(), seedPoint, newVal, rect, loDiff, upDiff, flags); return floodFill(_image, Mat(), seedPoint, newVal, rect, loDiff, upDiff, flags);
} }

View File

@ -419,7 +419,7 @@ namespace
void GeneralizedHoughBallardImpl::calcHist() void GeneralizedHoughBallardImpl::calcHist()
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( imageEdges_.type() == CV_8UC1 ); CV_Assert( imageEdges_.type() == CV_8UC1 );
CV_Assert( imageDx_.type() == CV_32FC1 && imageDx_.size() == imageSize_); CV_Assert( imageDx_.type() == CV_32FC1 && imageDx_.size() == imageSize_);

View File

@ -94,7 +94,7 @@ cvBoxPoints( CvBox2D box, CvPoint2D32f pt[4] )
double cv::pointPolygonTest( InputArray _contour, Point2f pt, bool measureDist ) double cv::pointPolygonTest( InputArray _contour, Point2f pt, bool measureDist )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double result = 0; double result = 0;
Mat contour = _contour.getMat(); Mat contour = _contour.getMat();
@ -506,7 +506,7 @@ static int intersectConvexConvex_( const Point2f* P, int n, const Point2f* Q, in
float cv::intersectConvexConvex( InputArray _p1, InputArray _p2, OutputArray _p12, bool handleNested ) float cv::intersectConvexConvex( InputArray _p1, InputArray _p2, OutputArray _p12, bool handleNested )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat p1 = _p1.getMat(), p2 = _p2.getMat(); Mat p1 = _p1.getMat(), p2 = _p2.getMat();
CV_Assert( p1.depth() == CV_32S || p1.depth() == CV_32F ); CV_Assert( p1.depth() == CV_32S || p1.depth() == CV_32F );

View File

@ -531,7 +531,7 @@ void cv::grabCut( InputArray _img, InputOutputArray _mask, Rect rect,
InputOutputArray _bgdModel, InputOutputArray _fgdModel, InputOutputArray _bgdModel, InputOutputArray _fgdModel,
int iterCount, int mode ) int iterCount, int mode )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat img = _img.getMat(); Mat img = _img.getMat();
Mat& mask = _mask.getMatRef(); Mat& mask = _mask.getMatRef();

View File

@ -661,7 +661,7 @@ public:
virtual void operator() (const Range & range) const CV_OVERRIDE virtual void operator() (const Range & range) const CV_OVERRIDE
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
if(!m_ok) if(!m_ok)
return; return;
@ -813,7 +813,7 @@ namespace cv
{ {
static bool ipp_calchist(const Mat &image, Mat &hist, int histSize, const float** ranges, bool uniform, bool accumulate) static bool ipp_calchist(const Mat &image, Mat &hist, int histSize, const float** ranges, bool uniform, bool accumulate)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
#if IPP_VERSION_X100 < 201801 #if IPP_VERSION_X100 < 201801
// No SSE42 optimization for uniform 32f // No SSE42 optimization for uniform 32f
@ -862,7 +862,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
InputArray _mask, OutputArray _hist, int dims, const int* histSize, InputArray _mask, OutputArray _hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate ) const float** ranges, bool uniform, bool accumulate )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OVX_RUN( CV_OVX_RUN(
images && histSize && images && histSize &&
@ -1172,7 +1172,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
InputArray _mask, SparseMat& hist, int dims, const int* histSize, InputArray _mask, SparseMat& hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate ) const float** ranges, bool uniform, bool accumulate )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat mask = _mask.getMat(); Mat mask = _mask.getMat();
calcHist( images, nimages, channels, mask, hist, dims, histSize, calcHist( images, nimages, channels, mask, hist, dims, histSize,
@ -1186,7 +1186,7 @@ void cv::calcHist( InputArrayOfArrays images, const std::vector<int>& channels,
const std::vector<float>& ranges, const std::vector<float>& ranges,
bool accumulate ) bool accumulate )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(images.total() == 1 && channels.size() == 1 && images.channels(0) == 1 && CV_OCL_RUN(images.total() == 1 && channels.size() == 1 && images.channels(0) == 1 &&
channels[0] == 0 && images.isUMatVector() && mask.empty() && !accumulate && channels[0] == 0 && images.isUMatVector() && mask.empty() && !accumulate &&
@ -1519,7 +1519,7 @@ void cv::calcBackProject( const Mat* images, int nimages, const int* channels,
InputArray _hist, OutputArray _backProject, InputArray _hist, OutputArray _backProject,
const float** ranges, double scale, bool uniform ) const float** ranges, double scale, bool uniform )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat hist = _hist.getMat(); Mat hist = _hist.getMat();
std::vector<uchar*> ptrs; std::vector<uchar*> ptrs;
@ -1688,7 +1688,7 @@ void cv::calcBackProject( const Mat* images, int nimages, const int* channels,
const SparseMat& hist, OutputArray _backProject, const SparseMat& hist, OutputArray _backProject,
const float** ranges, double scale, bool uniform ) const float** ranges, double scale, bool uniform )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
std::vector<uchar*> ptrs; std::vector<uchar*> ptrs;
std::vector<int> deltas; std::vector<int> deltas;
@ -1868,7 +1868,7 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha
const std::vector<float>& ranges, const std::vector<float>& ranges,
double scale ) double scale )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
if (hist.dims() <= 2) if (hist.dims() <= 2)
{ {
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
@ -1923,7 +1923,7 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector<int>& cha
double cv::compareHist( InputArray _H1, InputArray _H2, int method ) double cv::compareHist( InputArray _H1, InputArray _H2, int method )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat H1 = _H1.getMat(), H2 = _H2.getMat(); Mat H1 = _H1.getMat(), H2 = _H2.getMat();
const Mat* arrays[] = {&H1, &H2, 0}; const Mat* arrays[] = {&H1, &H2, 0};
@ -2131,7 +2131,7 @@ double cv::compareHist( InputArray _H1, InputArray _H2, int method )
double cv::compareHist( const SparseMat& H1, const SparseMat& H2, int method ) double cv::compareHist( const SparseMat& H1, const SparseMat& H2, int method )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
double result = 0; double result = 0;
int i, dims = H1.dims(); int i, dims = H1.dims();
@ -3329,7 +3329,7 @@ static bool openvx_equalize_hist(Mat srcMat, Mat dstMat)
void cv::equalizeHist( InputArray _src, OutputArray _dst ) void cv::equalizeHist( InputArray _src, OutputArray _dst )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _src.type() == CV_8UC1 ); CV_Assert( _src.type() == CV_8UC1 );

View File

@ -895,7 +895,7 @@ void HoughLines( InputArray _image, OutputArray lines,
double rho, double theta, int threshold, double rho, double theta, int threshold,
double srn, double stn, double min_theta, double max_theta ) double srn, double stn, double min_theta, double max_theta )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = CV_32FC2; int type = CV_32FC2;
if (lines.fixedType()) if (lines.fixedType())
@ -918,7 +918,7 @@ void HoughLinesP(InputArray _image, OutputArray _lines,
double rho, double theta, int threshold, double rho, double theta, int threshold,
double minLineLength, double maxGap ) double minLineLength, double maxGap )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_OCL_RUN(_image.isUMat() && _lines.isUMat(), CV_OCL_RUN(_image.isUMat() && _lines.isUMat(),
ocl_HoughLinesP(_image, _lines, rho, theta, threshold, minLineLength, maxGap)); ocl_HoughLinesP(_image, _lines, rho, theta, threshold, minLineLength, maxGap));
@ -1724,7 +1724,7 @@ static void HoughCircles( InputArray _image, OutputArray _circles,
int minRadius, int maxRadius, int minRadius, int maxRadius,
int maxCircles, double param3 ) int maxCircles, double param3 )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int type = CV_32FC3; int type = CV_32FC3;
if( _circles.fixedType() ) if( _circles.fixedType() )

View File

@ -67,7 +67,7 @@ typedef IppStatus (CV_STDCALL* ippiSetFunc)(const void*, void *, int, IppiSize);
template <int channels, typename Type> template <int channels, typename Type>
bool IPPSetSimple(cv::Scalar value, void *dataPointer, int step, IppiSize &size, ippiSetFunc func) bool IPPSetSimple(cv::Scalar value, void *dataPointer, int step, IppiSize &size, ippiSetFunc func)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
Type values[channels]; Type values[channels];
for( int i = 0; i < channels; i++ ) for( int i = 0; i < channels; i++ )
@ -77,7 +77,7 @@ bool IPPSetSimple(cv::Scalar value, void *dataPointer, int step, IppiSize &size,
static bool IPPSet(const cv::Scalar &value, void *dataPointer, int step, IppiSize &size, int channels, int depth) static bool IPPSet(const cv::Scalar &value, void *dataPointer, int step, IppiSize &size, int channels, int depth)
{ {
CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_IPP();
if( channels == 1 ) if( channels == 1 )
{ {
@ -1670,7 +1670,7 @@ void cv::remap( InputArray _src, OutputArray _dst,
InputArray _map1, InputArray _map2, InputArray _map1, InputArray _map2,
int interpolation, int borderType, const Scalar& borderValue ) int interpolation, int borderType, const Scalar& borderValue )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
static RemapNNFunc nn_tab[] = static RemapNNFunc nn_tab[] =
{ {
@ -1832,7 +1832,7 @@ void cv::convertMaps( InputArray _map1, InputArray _map2,
OutputArray _dstmap1, OutputArray _dstmap2, OutputArray _dstmap1, OutputArray _dstmap2,
int dstm1type, bool nninterpolate ) int dstm1type, bool nninterpolate )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat map1 = _map1.getMat(), map2 = _map2.getMat(), dstmap1, dstmap2; Mat map1 = _map1.getMat(), map2 = _map2.getMat(), dstmap1, dstmap2;
Size size = map1.size(); Size size = map1.size();
@ -2590,7 +2590,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
InputArray _M0, Size dsize, InputArray _M0, Size dsize,
int flags, int borderType, const Scalar& borderValue ) int flags, int borderType, const Scalar& borderValue )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
int interpolation = flags & INTER_MAX; int interpolation = flags & INTER_MAX;
CV_Assert( _src.channels() <= 4 || (interpolation != INTER_LANCZOS4 && CV_Assert( _src.channels() <= 4 || (interpolation != INTER_LANCZOS4 &&
@ -2854,7 +2854,7 @@ public:
} }
} }
IppStatus status = CV_INSTRUMENT_FUN_IPP(func,(src.ptr(), srcsize, (int)src.step[0], srcroi, dst.ptr(), (int)dst.step[0], dstroi, coeffs, mode)); IppStatus status = CV_INSTRUMENT_FUN_IPP(func,(src.ptr();, srcsize, (int)src.step[0], srcroi, dst.ptr(), (int)dst.step[0], dstroi, coeffs, mode));
if (status != ippStsNoErr) if (status != ippStsNoErr)
*ok = false; *ok = false;
else else
@ -2898,7 +2898,7 @@ void warpPerspectve(int src_type,
void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0, void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
Size dsize, int flags, int borderType, const Scalar& borderValue ) Size dsize, int flags, int borderType, const Scalar& borderValue )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
CV_Assert( _src.total() > 0 ); CV_Assert( _src.total() > 0 );
@ -2996,7 +2996,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
cv::Mat cv::getRotationMatrix2D( Point2f center, double angle, double scale ) cv::Mat cv::getRotationMatrix2D( Point2f center, double angle, double scale )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
angle *= CV_PI/180; angle *= CV_PI/180;
double alpha = std::cos(angle)*scale; double alpha = std::cos(angle)*scale;
@ -3041,7 +3041,7 @@ cv::Mat cv::getRotationMatrix2D( Point2f center, double angle, double scale )
*/ */
cv::Mat cv::getPerspectiveTransform( const Point2f src[], const Point2f dst[] ) cv::Mat cv::getPerspectiveTransform( const Point2f src[], const Point2f dst[] )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat M(3, 3, CV_64F), X(8, 1, CV_64F, M.ptr()); Mat M(3, 3, CV_64F), X(8, 1, CV_64F, M.ptr());
double a[8][8], b[8]; double a[8][8], b[8];

View File

@ -49,7 +49,7 @@ namespace cv
int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion ) int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
// L2 metric // L2 metric
const float samePointEps = std::max(1e-16f, 1e-6f * (float)std::max(rect1.size.area(), rect2.size.area())); const float samePointEps = std::max(1e-16f, 1e-6f * (float)std::max(rect1.size.area(), rect2.size.area()));

View File

@ -596,7 +596,7 @@ static void fitLine3D( Point3f * points, int count, int dist,
void cv::fitLine( InputArray _points, OutputArray _line, int distType, void cv::fitLine( InputArray _points, OutputArray _line, int distType,
double param, double reps, double aeps ) double param, double reps, double aeps )
{ {
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION();
Mat points = _points.getMat(); Mat points = _points.getMat();

Some files were not shown because too many files have changed in this diff Show More