| 776 | |
| 777 | template <typename T> |
| 778 | void test_find_similarity_transform() |
| 779 | { |
| 780 | print_spinner(); |
| 781 | std::vector<dlib::vector<T,2> > from_points, to_points; |
| 782 | |
| 783 | from_points.push_back(dlib::vector<T,2>(0,0)); |
| 784 | from_points.push_back(dlib::vector<T,2>(0,1)); |
| 785 | from_points.push_back(dlib::vector<T,2>(1,0)); |
| 786 | |
| 787 | to_points.push_back(dlib::vector<T,2>(8,0)); |
| 788 | to_points.push_back(dlib::vector<T,2>(6,0)); |
| 789 | to_points.push_back(dlib::vector<T,2>(8,2)); |
| 790 | |
| 791 | point_transform_affine tform = find_similarity_transform(from_points, to_points); |
| 792 | |
| 793 | for (unsigned long i = 0; i < from_points.size(); ++i) |
| 794 | { |
| 795 | DLIB_TEST(length(tform(from_points[i]) - to_points[i]) < 1e-14); |
| 796 | } |
| 797 | } |
| 798 | |
| 799 | template <typename T> |
| 800 | void test_find_similarity_transform2() |
nothing calls this directly
no test coverage detected