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.
pull/8170/merge
Fangjun KUANG 8 years ago committed by Alexander Alekhin
parent 3fbaabc866
commit a8a208e0fe
  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);
}
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)
{

Loading…
Cancel
Save