mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
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:
parent
47ae5f14f5
commit
b1851e2f16
@ -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…
Reference in New Issue
Block a user