1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Instrumentation for OpenCV API regions and IPP functions;

This commit is contained in:
Pavel Vlasov
2016-08-18 09:53:00 +03:00
parent 680ca88ce0
commit 30a6cee2fe
133 changed files with 1691 additions and 456 deletions
+6
View File
@@ -102,6 +102,8 @@ protected:
void AffineTransformerImpl::warpImage(InputArray transformingImage, OutputArray output,
int flags, int borderMode, const Scalar& borderValue) const
{
CV_INSTRUMENT_REGION()
CV_Assert(!affineMat.empty());
warpAffine(transformingImage, output, affineMat, transformingImage.getMat().size(), flags, borderMode, borderValue);
}
@@ -183,6 +185,8 @@ static Mat _localAffineEstimate(const std::vector<Point2f>& shape1, const std::v
void AffineTransformerImpl::estimateTransformation(InputArray _pts1, InputArray _pts2, std::vector<DMatch>& _matches)
{
CV_INSTRUMENT_REGION()
Mat pts1 = _pts1.getMat();
Mat pts2 = _pts2.getMat();
CV_Assert((pts1.channels()==2) && (pts1.cols>0) && (pts2.channels()==2) && (pts2.cols>0));
@@ -228,6 +232,8 @@ void AffineTransformerImpl::estimateTransformation(InputArray _pts1, InputArray
float AffineTransformerImpl::applyTransformation(InputArray inPts, OutputArray outPts)
{
CV_INSTRUMENT_REGION()
Mat pts1 = inPts.getMat();
CV_Assert((pts1.channels()==2) && (pts1.cols>0));
+2
View File
@@ -787,6 +787,8 @@ float EmdL1::compuTotalFlow()
float cv::EMDL1(InputArray _signature1, InputArray _signature2)
{
CV_INSTRUMENT_REGION()
Mat signature1 = _signature1.getMat(), signature2 = _signature2.getMat();
EmdL1 emdl1;
return emdl1.getEMDL1(signature1, signature2);
+2
View File
@@ -129,6 +129,8 @@ static float _apply(const Mat &set1, const Mat &set2, int distType, double propR
float HausdorffDistanceExtractorImpl::computeDistance(InputArray contour1, InputArray contour2)
{
CV_INSTRUMENT_REGION()
Mat set1=contour1.getMat(), set2=contour2.getMat();
if (set1.type() != CV_32F)
set1.convertTo(set1, CV_32F);
+8
View File
@@ -125,6 +125,8 @@ protected:
void NormHistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix)
{
CV_INSTRUMENT_REGION()
// size of the costMatrix with dummies //
Mat descriptors1=_descriptors1.getMat();
Mat descriptors2=_descriptors2.getMat();
@@ -251,6 +253,8 @@ protected:
void EMDHistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix)
{
CV_INSTRUMENT_REGION()
// size of the costMatrix with dummies //
Mat descriptors1=_descriptors1.getMat();
Mat descriptors2=_descriptors2.getMat();
@@ -373,6 +377,8 @@ protected:
void ChiHistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix)
{
CV_INSTRUMENT_REGION()
// size of the costMatrix with dummies //
Mat descriptors1=_descriptors1.getMat();
Mat descriptors2=_descriptors2.getMat();
@@ -490,6 +496,8 @@ protected:
void EMDL1HistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix)
{
CV_INSTRUMENT_REGION()
// size of the costMatrix with dummies //
Mat descriptors1=_descriptors1.getMat();
Mat descriptors2=_descriptors2.getMat();
+4
View File
@@ -186,6 +186,8 @@ protected:
float ShapeContextDistanceExtractorImpl::computeDistance(InputArray contour1, InputArray contour2)
{
CV_INSTRUMENT_REGION()
// Checking //
Mat sset1=contour1.getMat(), sset2=contour2.getMat(), set1, set2;
if (set1.type() != CV_32F)
@@ -492,6 +494,8 @@ void SCDMatcher::matchDescriptors(cv::Mat &descriptors1, cv::Mat &descriptors2,
void SCDMatcher::buildCostMatrix(const cv::Mat &descriptors1, const cv::Mat &descriptors2,
cv::Mat &costMatrix, cv::Ptr<cv::HistogramCostExtractor> &comparer) const
{
CV_INSTRUMENT_REGION()
comparer->buildCostMatrix(descriptors1, descriptors2, costMatrix);
}
+6
View File
@@ -146,6 +146,8 @@ static Point2f _applyTransformation(const Mat &shapeRef, const Point2f point, co
void ThinPlateSplineShapeTransformerImpl::warpImage(InputArray transformingImage, OutputArray output,
int flags, int borderMode, const Scalar& borderValue) const
{
CV_INSTRUMENT_REGION()
CV_Assert(tpsComputed==true);
Mat theinput = transformingImage.getMat();
@@ -166,6 +168,8 @@ void ThinPlateSplineShapeTransformerImpl::warpImage(InputArray transformingImage
float ThinPlateSplineShapeTransformerImpl::applyTransformation(InputArray inPts, OutputArray outPts)
{
CV_INSTRUMENT_REGION()
CV_Assert(tpsComputed);
Mat pts1 = inPts.getMat();
CV_Assert((pts1.channels()==2) && (pts1.cols>0));
@@ -189,6 +193,8 @@ float ThinPlateSplineShapeTransformerImpl::applyTransformation(InputArray inPts,
void ThinPlateSplineShapeTransformerImpl::estimateTransformation(InputArray _pts1, InputArray _pts2,
std::vector<DMatch>& _matches )
{
CV_INSTRUMENT_REGION()
Mat pts1 = _pts1.getMat();
Mat pts2 = _pts2.getMat();
CV_Assert((pts1.channels()==2) && (pts1.cols>0) && (pts2.channels()==2) && (pts2.cols>0));