mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 22:19:14 +08:00
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.
This commit is contained in:
parent
3fbaabc866
commit
a8a208e0fe
@ -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…
Reference in New Issue
Block a user