projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47ae5f1
)
Add support to print `cv::UMat`.
author
Fangjun KUANG
<csukuangfj@gmail.com>
Mon, 20 Feb 2017 15:22:46 +0000
(16:22 +0100)
committer
GitHub
<noreply@github.com>
Mon, 20 Feb 2017 15:22:46 +0000
(16:22 +0100)
Now a user can use `std::cout` to print an object of `cv::UMat` just like `cv::Mat`.
modules/core/include/opencv2/core/cvstd.inl.hpp
patch
|
blob
|
history
diff --git
a/modules/core/include/opencv2/core/cvstd.inl.hpp
b/modules/core/include/opencv2/core/cvstd.inl.hpp
index
876def8
..
d08b72b
100644
(file)
--- a/
modules/core/include/opencv2/core/cvstd.inl.hpp
+++ b/
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);
}
+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)
{