fixed ocl_arithm_op; fix for 3-channel images is needed

This commit is contained in:
Ilya Lavrenov
2013-11-21 23:25:17 +04:00
parent 684ff70308
commit 9d23a0cb81
6 changed files with 109 additions and 88 deletions

View File

@@ -2340,31 +2340,6 @@ CV_EXPORTS MatExpr max(double s, const Mat& a);
CV_EXPORTS MatExpr abs(const Mat& m);
CV_EXPORTS MatExpr abs(const MatExpr& e);
namespace traits {
template <typename T>
struct GetMatForRead
{
};
template <>
struct GetMatForRead<Mat>
{
static const Mat get(const Mat& m) { return m; }
};
template <>
struct GetMatForRead<UMat>
{
static const Mat get(const UMat& m) { return m.getMat(ACCESS_READ); }
};
} // namespace traits
template <typename T>
const Mat getMatForRead(const T& mat)
{
return traits::GetMatForRead<T>::get(mat);
}
} // cv
#include "opencv2/core/mat.inl.hpp"