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

Method test_point_transforms

dlib/test/fhog.cpp:120–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 }
119
120 void test_point_transforms()
121 {
122 dlib::rand rnd;
123 for (int iter = 0; iter < 100; ++iter)
124 {
125 for (int cell_size = 1; cell_size < 10; ++cell_size)
126 {
127 print_spinner();
128 for (long i = -10; i <= 10; ++i)
129 {
130 for (long j = -10; j <= 10; ++j)
131 {
132 for (long k = -10; k <= 10; ++k)
133 {
134 for (long l = -10; l <= 10; ++l)
135 {
136 rectangle rect(point(i,j), point(k,l));
137 const int rows = rnd.get_random_32bit_number()%11+1;
138 const int cols = rnd.get_random_32bit_number()%11+1;
139 DLIB_TEST_MSG(rect == image_to_fhog(fhog_to_image(rect,cell_size,rows,cols),cell_size,rows,cols),
140 " rows: "<< rows <<
141 " cols: "<< cols <<
142 " cell_size: "<< cell_size <<
143 " rect: "<< rect <<
144 " irect: "<<fhog_to_image(rect,cell_size,rows,cols) <<
145 " frect: "<< image_to_fhog(fhog_to_image(rect,cell_size,rows,cols),cell_size,rows,cols)
146 );
147 }
148 }
149 }
150 }
151 }
152 }
153 }
154
155
156 void perform_test (

Callers

nothing calls this directly

Calls 5

print_spinnerFunction · 0.85
image_to_fhogFunction · 0.85
fhog_to_imageFunction · 0.85
pointClass · 0.50

Tested by

no test coverage detected