Add support to print cv::UMat.

Now a user can use `std::cout` to print an object of `cv::UMat` just like `cv::Mat`.
This commit is contained in:
Fangjun KUANG 2017-02-20 16:22:46 +01:00 committed by GitHub
parent 47ae5f14f5
commit b1851e2f16

View File

@ -183,6 +183,12 @@ std::ostream& operator << (std::ostream& out, const Mat& mtx)
return out << Formatter::get()->format(mtx);
}
static inline
std::ostream& operator << (std::ostream& out, const UMat& m)
{
return out << m.getMat(ACCESS_READ);
}
template<typename _Tp> static inline
std::ostream& operator << (std::ostream& out, const std::vector<Point_<_Tp> >& vec)
{