#include "stemplate.h" #define VEC2POINT(x) cvPoint( (int)round((x)[0]), (int)round((x)[1]) ) using namespace std; void SplineTemplate::addPoint(int x, int y) { s.setPoint(vec3d((double)x,(double)y,0)); } void SplineTemplate::setTemplate() { // Center at the origin s += -s.findCentroid(); d.points.clear(); // Make derived same dimension for (int i=0;i