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

Function unnormalizing_tform

dlib/image_processing/shape_predictor.h:219–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217 // ------------------------------------------------------------------------------------
218
219 inline point_transform_affine unnormalizing_tform (
220 const rectangle& rect
221 )
222 /*!
223 ensures
224 - returns a transform that maps (0,0) to rect.tl_corner() and (1,1) to
225 rect.br_corner().
226 !*/
227 {
228 std::vector<vector<float,2> > from_points, to_points;
229 to_points.push_back(rect.tl_corner()); from_points.push_back(point(0,0));
230 to_points.push_back(rect.tr_corner()); from_points.push_back(point(1,0));
231 to_points.push_back(rect.br_corner()); from_points.push_back(point(1,1));
232 return find_affine_transform(from_points, to_points);
233 }
234
235 // ------------------------------------------------------------------------------------
236

Callers 2

operator()Method · 0.85

Calls 6

find_affine_transformFunction · 0.85
pointClass · 0.50
push_backMethod · 0.45
tl_cornerMethod · 0.45
tr_cornerMethod · 0.45
br_cornerMethod · 0.45

Tested by

no test coverage detected