Merge branch '2.4'
This commit is contained in:
@@ -56,7 +56,7 @@ template<typename T> struct MinOp
|
||||
typedef T type1;
|
||||
typedef T type2;
|
||||
typedef T rtype;
|
||||
T operator ()(T a, T b) const { return std::min(a, b); }
|
||||
T operator ()(const T a, const T b) const { return std::min(a, b); }
|
||||
};
|
||||
|
||||
template<typename T> struct MaxOp
|
||||
@@ -64,7 +64,7 @@ template<typename T> struct MaxOp
|
||||
typedef T type1;
|
||||
typedef T type2;
|
||||
typedef T rtype;
|
||||
T operator ()(T a, T b) const { return std::max(a, b); }
|
||||
T operator ()(const T a, const T b) const { return std::max(a, b); }
|
||||
};
|
||||
|
||||
#undef CV_MIN_8U
|
||||
@@ -72,8 +72,8 @@ template<typename T> struct MaxOp
|
||||
#define CV_MIN_8U(a,b) ((a) - CV_FAST_CAST_8U((a) - (b)))
|
||||
#define CV_MAX_8U(a,b) ((a) + CV_FAST_CAST_8U((b) - (a)))
|
||||
|
||||
template<> inline uchar MinOp<uchar>::operator ()(uchar a, uchar b) const { return CV_MIN_8U(a, b); }
|
||||
template<> inline uchar MaxOp<uchar>::operator ()(uchar a, uchar b) const { return CV_MAX_8U(a, b); }
|
||||
template<> inline uchar MinOp<uchar>::operator ()(const uchar a, const uchar b) const { return CV_MIN_8U(a, b); }
|
||||
template<> inline uchar MaxOp<uchar>::operator ()(const uchar a, const uchar b) const { return CV_MAX_8U(a, b); }
|
||||
|
||||
struct MorphRowNoVec
|
||||
{
|
||||
|
@@ -252,6 +252,11 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result,
|
||||
_result.create(corrSize, CV_32F);
|
||||
Mat result = _result.getMat();
|
||||
|
||||
#ifdef HAVE_TEGRA_OPTIMIZATION
|
||||
if (tegra::matchTemplate(img, templ, result, method))
|
||||
return;
|
||||
#endif
|
||||
|
||||
int cn = img.channels();
|
||||
crossCorr( img, templ, result, result.size(), result.type(), Point(0,0), 0, 0);
|
||||
|
||||
|
@@ -47,11 +47,15 @@ CV_IMPL CvSeq* cvPointSeqFromMat( int seq_kind, const CvArr* arr,
|
||||
CV_Assert( arr != 0 && contour_header != 0 && block != 0 );
|
||||
|
||||
int eltype;
|
||||
CvMat hdr;
|
||||
CvMat* mat = (CvMat*)arr;
|
||||
|
||||
if( !CV_IS_MAT( mat ))
|
||||
CV_Error( CV_StsBadArg, "Input array is not a valid matrix" );
|
||||
|
||||
if( CV_MAT_CN(mat->type) == 1 && mat->width == 2 )
|
||||
mat = cvReshape(mat, &hdr, 2);
|
||||
|
||||
eltype = CV_MAT_TYPE( mat->type );
|
||||
if( eltype != CV_32SC2 && eltype != CV_32FC2 )
|
||||
CV_Error( CV_StsUnsupportedFormat,
|
||||
|
Reference in New Issue
Block a user