added test for trajectories and fixed bug with float type

This commit is contained in:
Anatoly Baksheev
2014-01-08 19:43:20 +04:00
parent 64566e6178
commit 25b417e8b2
9 changed files with 128 additions and 105 deletions

View File

@@ -221,6 +221,22 @@ namespace cv
return scalars;
}
};
inline vtkSmartPointer<vtkMatrix4x4> vtkmatrix(const cv::Matx44d &matrix)
{
vtkSmartPointer<vtkMatrix4x4> vtk_matrix = vtkSmartPointer<vtkMatrix4x4>::New();
vtk_matrix->DeepCopy(matrix.val);
return vtk_matrix;
}
inline Color vtkcolor(const Color& color)
{
Color scaled_color = color * (1.0/255.0);
std::swap(scaled_color[0], scaled_color[2]);
return scaled_color;
}
template<typename _Tp> inline _Tp normalized(const _Tp& v) { return v * 1/norm(v); }
}
}