mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Instrumentation for OpenCV API regions and IPP functions;
This commit is contained in:
@@ -147,6 +147,8 @@ void GainCompensator::feed(const std::vector<Point> &corners, const std::vector<
|
||||
|
||||
void GainCompensator::apply(int index, Point /*corner*/, InputOutputArray image, InputArray /*mask*/)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
multiply(image, gains_(index, 0), image);
|
||||
}
|
||||
|
||||
@@ -225,6 +227,8 @@ void BlocksGainCompensator::feed(const std::vector<Point> &corners, const std::v
|
||||
|
||||
void BlocksGainCompensator::apply(int index, Point /*corner*/, InputOutputArray _image, InputArray /*mask*/)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
CV_Assert(_image.type() == CV_8UC3);
|
||||
|
||||
UMat u_gain_map;
|
||||
|
||||
@@ -144,6 +144,8 @@ private:
|
||||
|
||||
void CpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo& matches_info)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
CV_Assert(features1.descriptors.type() == features2.descriptors.type());
|
||||
CV_Assert(features2.descriptors.depth() == CV_8U || features2.descriptors.depth() == CV_32F);
|
||||
|
||||
@@ -212,6 +214,8 @@ void CpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &feat
|
||||
#ifdef HAVE_OPENCV_CUDAFEATURES2D
|
||||
void GpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo& matches_info)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
matches_info.matches.clear();
|
||||
|
||||
ensureSizeIsEnough(features1.descriptors.size(), features1.descriptors.type(), descriptors1_);
|
||||
@@ -581,6 +585,8 @@ BestOf2NearestMatcher::BestOf2NearestMatcher(bool try_use_gpu, float match_conf,
|
||||
void BestOf2NearestMatcher::match(const ImageFeatures &features1, const ImageFeatures &features2,
|
||||
MatchesInfo &matches_info)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
(*impl_)(features1, features2, matches_info);
|
||||
|
||||
// Check if it makes sense to find homography
|
||||
|
||||
@@ -203,6 +203,8 @@ void DpSeamFinder::process(
|
||||
const Mat &image1, const Mat &image2, Point tl1, Point tl2,
|
||||
Mat &mask1, Mat &mask2)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
CV_Assert(image1.size() == mask1.size());
|
||||
CV_Assert(image2.size() == mask2.size());
|
||||
|
||||
|
||||
@@ -93,12 +93,16 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
|
||||
|
||||
Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
return estimateTransform(images, std::vector<std::vector<Rect> >());
|
||||
}
|
||||
|
||||
|
||||
Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images, const std::vector<std::vector<Rect> > &rois)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
images.getUMatVector(imgs_);
|
||||
rois_ = rois;
|
||||
|
||||
@@ -117,12 +121,16 @@ Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images, const st
|
||||
|
||||
Stitcher::Status Stitcher::composePanorama(OutputArray pano)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
return composePanorama(std::vector<UMat>(), pano);
|
||||
}
|
||||
|
||||
|
||||
Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArray pano)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
LOGLN("Warping images (auxiliary)... ");
|
||||
|
||||
std::vector<UMat> imgs;
|
||||
@@ -365,6 +373,8 @@ Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArra
|
||||
|
||||
Stitcher::Status Stitcher::stitch(InputArrayOfArrays images, OutputArray pano)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Status status = estimateTransform(images);
|
||||
if (status != OK)
|
||||
return status;
|
||||
@@ -374,6 +384,8 @@ Stitcher::Status Stitcher::stitch(InputArrayOfArrays images, OutputArray pano)
|
||||
|
||||
Stitcher::Status Stitcher::stitch(InputArrayOfArrays images, const std::vector<std::vector<Rect> > &rois, OutputArray pano)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Status status = estimateTransform(images, rois);
|
||||
if (status != OK)
|
||||
return status;
|
||||
@@ -539,6 +551,8 @@ Stitcher::Status Stitcher::estimateCameraParams()
|
||||
|
||||
Ptr<Stitcher> createStitcher(bool try_use_gpu)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Ptr<Stitcher> stitcher = makePtr<Stitcher>();
|
||||
stitcher->setRegistrationResol(0.6);
|
||||
stitcher->setSeamEstimationResol(0.1);
|
||||
|
||||
@@ -65,6 +65,8 @@ void Timelapser::initialize(const std::vector<Point> &corners, const std::vector
|
||||
|
||||
void Timelapser::process(InputArray _img, InputArray /*_mask*/, Point tl)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
dst_.setTo(Scalar::all(0));
|
||||
|
||||
Mat img = _img.getMat();
|
||||
|
||||
Reference in New Issue
Block a user