|
|
|
@ -1128,7 +1128,6 @@ static void resizeGeneric_( const Mat& src, Mat& dst, |
|
|
|
|
if( k0 < ksize ) |
|
|
|
|
hresize( srows + k0, rows + k0, ksize - k0, xofs, alpha, |
|
|
|
|
ssize.width, dsize.width, cn, xmin, xmax ); |
|
|
|
|
|
|
|
|
|
vresize( (const WT**)rows, (T*)(dst.data + dst.step*dy), beta, dsize.width ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1320,6 +1319,30 @@ typedef void (*ResizeAreaFunc)( const Mat& src, Mat& dst, |
|
|
|
|
void cv::resize( InputArray _src, OutputArray _dst, Size dsize, |
|
|
|
|
double inv_scale_x, double inv_scale_y, int interpolation ) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_TEGRA_OPTIMIZATION |
|
|
|
|
Mat src1 = _src.getMat(); |
|
|
|
|
Size ssize1 = src1.size(); |
|
|
|
|
|
|
|
|
|
int wSrc = ssize1.width; |
|
|
|
|
int hSrc = ssize1.height; |
|
|
|
|
if (hSrc < 1) |
|
|
|
|
return; |
|
|
|
|
int wDst = dsize.width; |
|
|
|
|
int hDst = dsize.height; |
|
|
|
|
_dst.create(dsize, src1.type()); |
|
|
|
|
Mat dst1 = _dst.getMat(); |
|
|
|
|
unsigned int *bSrc = (unsigned int*)(src1.data); |
|
|
|
|
unsigned int *bDst = (unsigned int*)dst1.data; |
|
|
|
|
if(src1.channels()==1){
|
|
|
|
|
tegra::stretch1(bSrc, bDst, wSrc, hSrc, wDst, hDst); |
|
|
|
|
return; |
|
|
|
|
}
|
|
|
|
|
if(src1.channels()==4){ |
|
|
|
|
tegra::stretch4(bSrc, bDst, wSrc, hSrc, wDst, hDst); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
static ResizeFunc linear_tab[] = |
|
|
|
|
{ |
|
|
|
|
resizeGeneric_< |
|
|
|
@ -3123,6 +3146,7 @@ cv::Mat cv::getPerspectiveTransform( const Point2f src[], const Point2f dst[] ) |
|
|
|
|
* where: |
|
|
|
|
* cij - matrix coefficients |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
cv::Mat cv::getAffineTransform( const Point2f src[], const Point2f dst[] ) |
|
|
|
|
{ |
|
|
|
|
Mat M(2, 3, CV_64F), X(6, 1, CV_64F, M.data); |
|
|
|
@ -3187,7 +3211,6 @@ void cv::invertAffineTransform(InputArray _matM, OutputArray __iM) |
|
|
|
|
CV_Error( CV_StsUnsupportedFormat, "" ); |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cv::Mat cv::getPerspectiveTransform(InputArray _src, InputArray _dst) |
|
|
|
|
{ |
|
|
|
|
Mat src = _src.getMat(), dst = _dst.getMat(); |
|
|
|
@ -3202,7 +3225,6 @@ cv::Mat cv::getAffineTransform(InputArray _src, InputArray _dst) |
|
|
|
|
return getAffineTransform((const Point2f*)src.data, (const Point2f*)dst.data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CV_IMPL void |
|
|
|
|
cvResize( const CvArr* srcarr, CvArr* dstarr, int method ) |
|
|
|
|
{ |
|
|
|
|