| 798 | |
| 799 | template <typename T> |
| 800 | void test_find_similarity_transform2() |
| 801 | { |
| 802 | print_spinner(); |
| 803 | std::vector<dlib::vector<T,2> > from_points, to_points; |
| 804 | |
| 805 | from_points.push_back(dlib::vector<T,2>(0,0)); |
| 806 | from_points.push_back(dlib::vector<T,2>(0,1)); |
| 807 | |
| 808 | to_points.push_back(dlib::vector<T,2>(8,0)); |
| 809 | to_points.push_back(dlib::vector<T,2>(6,0)); |
| 810 | |
| 811 | point_transform_affine tform = find_similarity_transform(from_points, to_points); |
| 812 | |
| 813 | for (unsigned long i = 0; i < from_points.size(); ++i) |
| 814 | { |
| 815 | DLIB_TEST(length(tform(from_points[i]) - to_points[i]) < 1e-14); |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | |
| 820 | // ---------------------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected