00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #pragma once
00018 #include <cv.h>
00019 #include <cvaux.h>
00020 #include <iostream>
00021 #include <stdlib.h>
00022 using namespace std;
00023 #include <highgui.h>
00024 #include "Image.h"
00025 #include "PointList.h"
00026 #include "Matrix.h"
00027 #include "Node.h"
00028 #include "Waldo.h"
00029 #include "global.h"
00030 #include "Grid.h"
00031 #include "Step.h"
00032 #include <vector>
00033 #define DIST(x) (hypot(x.rise,x.run))
00034
00035 class Triple;
00036 namespace Recognition{
00037 class Image;
00038
00042 class Points{
00043 private:
00045 Node * findCandidate(const Step &,const Step &);
00047 int addRow(Grid &grid,const int bound,int &thresh,int &colSize,const int rowSize,Image &img);
00049 int addCol(Grid &grid,const int bound,int &thresh,const int colSize,int &rowSize,Image &img);
00051 int addEdge(Grid &grid,const int bound,const int thresh,int &colSize,int &rowSize,Step &,Step &,Step &,Step &,Image &img);
00053 int addEdge(Grid &grid,const int bound,int thresh,int &colSize,int &rowSize,Image &img);
00055 int templateCorner(int data[13][13]);
00057 int collectMaxima(IplImage *img,int);
00060 int highestBorder(const IplImage *img,
00061 uchar* tl, uchar* tr,
00062 uchar* bl, uchar* br);
00064 PointList * toPoints(vector<Triple> &in, Image &img);
00065
00066 public:
00067 PointList list;
00068 Points(void);
00069 ~Points(void);
00071 void verify(Image &);
00073 int findPossible(Image &,int);
00075 void reduce(int);
00079 int fitGrid(int,int,Image &);
00080 };
00081 }