Add support to print `cv::UMat`.

Now a user can use `std::cout` to print an object of `cv::UMat` just like `cv::Mat`.
pull/8228/head
Fangjun KUANG 8 years ago committed by GitHub
parent 47ae5f14f5
commit b1851e2f16
  1. 6
      modules/core/include/opencv2/core/cvstd.inl.hpp

@ -183,6 +183,12 @@ std::ostream& operator << (std::ostream& out, const Mat& mtx)
return out << Formatter::get()->format(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 template<typename _Tp> static inline
std::ostream& operator << (std::ostream& out, const std::vector<Point_<_Tp> >& vec) std::ostream& operator << (std::ostream& out, const std::vector<Point_<_Tp> >& vec)
{ {

Loading…
Cancel
Save