optimized cv::normalize in case of mask

This commit is contained in:
Ilya Lavrenov
2014-05-29 17:46:34 +04:00
parent d156f5af6d
commit 17956a5ae5
6 changed files with 167 additions and 9 deletions

View File

@@ -2051,6 +2051,23 @@ void _InputArray::copyTo(const _OutputArray& arr) const
CV_Error(Error::StsNotImplemented, "");
}
void _InputArray::copyTo(const _OutputArray& arr, const _InputArray & mask) const
{
int k = kind();
if( k == NONE )
arr.release();
else if( k == MAT || k == MATX || k == STD_VECTOR )
{
Mat m = getMat();
m.copyTo(arr, mask);
}
else if( k == UMAT )
((UMat*)obj)->copyTo(arr, mask);
else
CV_Error(Error::StsNotImplemented, "");
}
bool _OutputArray::fixedSize() const
{
return (flags & FIXED_SIZE) == FIXED_SIZE;