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:
@@ -365,6 +365,8 @@ getQuadrangleSubPix_8u32f_CnR( const uchar* src, size_t src_step, Size src_size,
|
||||
void cv::getRectSubPix( InputArray _image, Size patchSize, Point2f center,
|
||||
OutputArray _patch, int patchType )
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
Mat image = _image.getMat();
|
||||
int depth = image.depth(), cn = image.channels();
|
||||
int ddepth = patchType < 0 ? depth : CV_MAT_DEPTH(patchType);
|
||||
@@ -387,15 +389,15 @@ void cv::getRectSubPix( InputArray _image, Size patchSize, Point2f center,
|
||||
IppiPoint_32f icenter = {center.x, center.y};
|
||||
IppiSize src_size={image.cols, image.rows}, win_size={patch.cols, patch.rows};
|
||||
int srctype = image.type();
|
||||
ippiGetRectSubPixFunc ippfunc =
|
||||
ippiGetRectSubPixFunc ippiCopySubpixIntersect =
|
||||
srctype == CV_8UC1 && ddepth == CV_8U ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_8u_C1R :
|
||||
srctype == CV_8UC1 && ddepth == CV_32F ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_8u32f_C1R :
|
||||
srctype == CV_32FC1 && ddepth == CV_32F ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_32f_C1R : 0;
|
||||
|
||||
if( ippfunc)
|
||||
if( ippiCopySubpixIntersect)
|
||||
{
|
||||
if (ippfunc(image.ptr(), (int)image.step, src_size, patch.ptr(),
|
||||
(int)patch.step, win_size, icenter, &minpt, &maxpt) >= 0 )
|
||||
if (CV_INSTRUMENT_FUN_IPP(ippiCopySubpixIntersect, image.ptr(), (int)image.step, src_size, patch.ptr(),
|
||||
(int)patch.step, win_size, icenter, &minpt, &maxpt) >= 0)
|
||||
{
|
||||
CV_IMPL_ADD(CV_IMPL_IPP);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user