Commit e5ffbf94 authored by Andrey Kamaev's avatar Andrey Kamaev

Fix stream output operator for Vec<uchar,n>

This fixes output for 8U and 8S vector depths.
They were mistakenly printed as characters instead of numbers.
parent 64847325
......@@ -3873,10 +3873,21 @@ template<typename _Tp> inline std::ostream& operator<<(std::ostream& out, const
template<typename _Tp, int n> inline std::ostream& operator<<(std::ostream& out, const Vec<_Tp, n>& vec)
{
out << "[";
for (int i = 0; i < n - 1; ++i) {
out << vec[i] << ", ";
if(Vec<_Tp, n>::depth < CV_32F)
{
for (int i = 0; i < n - 1; ++i) {
out << (int)vec[i] << ", ";
}
out << (int)vec[n-1] << "]";
}
else
{
for (int i = 0; i < n - 1; ++i) {
out << vec[i] << ", ";
}
out << vec[n-1] << "]";
}
out << vec[n-1] << "]";
return out;
}
......
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