1 #ifndef LUMILESPROCESSOR
2 #define LUMILESPROCESSOR
7 typedef std:vector<Point> PointVector;
11 OrientedPoint LuMilesProcessors::step(
const PointVector& src,
const PointVector& dest){
12 assert(src.size()==dest.size());
13 unsigned int size=dest.size();
14 double smx=0, smy=0, dmx=0, dmy=0;
15 for (PointVector::const_iterator it=src.begin(); it!=src.end(); it++){
22 for (PointVector::const_iterator it=dest.begin(); it!=dest.end(); it++){
31 for (
unsigned int i=0; i<size(); i++){
32 sxx+=(src[i].x-smx)*(dest[i].x-dmx);
33 sxy+=(src[i].x-smx)*(dest[i].y-dmy);
34 syx+=(src[i].y-smy)*(dest[i].x-dmx);
35 syy+=(src[i].y-smy)*(dest[i].y-dmy);
37 double omega=atan2(sxy-syx,sxx+syy);
39 dmx-smx*cos(omega)+smx*sin(omega)),
40 dmy-smx*sin(omega)-smy*cos(omega)),
45 int main(
int argc, conat
char ** argv){