MCPcopy Create free account
hub / github.com/davisking/dlib / test_find_similarity_transform2

Function test_find_similarity_transform2

dlib/test/geometry.cpp:800–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 6

print_spinnerFunction · 0.85
vector<T,2>Class · 0.85
lengthFunction · 0.50
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected