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

Function normalizing_tform

dlib/image_processing/shape_predictor.h:201–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 // ------------------------------------------------------------------------------------
200
201 inline point_transform_affine normalizing_tform (
202 const rectangle& rect
203 )
204 /*!
205 ensures
206 - returns a transform that maps rect.tl_corner() to (0,0) and rect.br_corner()
207 to (1,1).
208 !*/
209 {
210 std::vector<vector<float,2> > from_points, to_points;
211 from_points.push_back(rect.tl_corner()); to_points.push_back(point(0,0));
212 from_points.push_back(rect.tr_corner()); to_points.push_back(point(1,0));
213 from_points.push_back(rect.br_corner()); to_points.push_back(point(1,1));
214 return find_affine_transform(from_points, to_points);
215 }
216
217 // ------------------------------------------------------------------------------------
218

Callers 2

normalized_partsFunction · 0.85
object_to_shapeMethod · 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