Commit a8a208e0 authored by Fangjun KUANG's avatar Fangjun KUANG Committed by Alexander Alekhin

Merge pull request #8208 from csukuangfj:complex_support

Add support for printing out cv::Complex. (#8208)

* Add support for printing out cv::Complex.

* Conform to the format of std::complex.

* Remove extra spaces.

* Remove extra spaces.
parent 3fbaabc8
......@@ -183,6 +183,12 @@ std::ostream& operator << (std::ostream& out, const Mat& mtx)
return out << Formatter::get()->format(mtx);
}
template<typename _Tp> static inline
std::ostream& operator << (std::ostream& out, const Complex<_Tp>& c)
{
return out << "(" << c.re << "," << c.im << ")";
}
template<typename _Tp> static inline
std::ostream& operator << (std::ostream& out, const std::vector<Point_<_Tp> >& vec)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment