#include "main.h" #include "pointset.h" main() { int numpoints; // read canonical faces cin >> numpoints; pointset canon_face(numpoints); canon_face.read_points(); // compute canonical face's centroid and scale canon_face.compute_centroid(); double canon_scale = canon_face.compute_scale_factor(); canon_face.translate(-canon_face.get_xcen(),-canon_face.get_ycen()); canon_face.scale(80.0/canon_scale); // read input face cin >> numpoints; pointset to_norm(numpoints); to_norm.read_points(); // compute input face's centroid and scale to_norm.compute_centroid(); double to_normx = to_norm.get_xcen(); double to_normy = to_norm.get_ycen(); double to_norm_scale = to_norm.compute_scale_factor(); to_norm.translate(-to_normx, -to_normy); to_norm.scale(80.0/to_norm_scale); // normalize pointset normed(numpoints); normed = canon_face.procrustes(to_norm); normed.prn_points(); }