00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __GT2004EdgeSpecialist_h_
00009 #define __GT2004EdgeSpecialist_h_
00010
00011 #include "Representations/Perception/Image.h"
00012 #include "Representations/Perception/LinesPercept.h"
00013 #include "Representations/Perception/EdgesPercept.h"
00014 #include "Tools/Math/Geometry.h"
00015 #include "Tools/Math/Matrix2x2.h"
00016
00017
00018
00019
00020 class GT2004EdgeSpecialist
00021 {
00022 public:
00023 GT2004EdgeSpecialist();
00024
00025
00026 void reset();
00027
00028
00029 void resetLine();
00030
00031
00032 void checkPoint(
00033 Vector2<int> point,
00034 colorClass color,
00035 const CameraMatrix& cameraMatrix,
00036 const CameraMatrix& prevCameraMatrix,
00037 const Image& image
00038 );
00039
00040
00041 void addCandidate(
00042 Vector2<int> point,
00043 const Image& image
00044 );
00045
00046
00047 void getEdgesPercept(
00048 EdgesPercept& percept,
00049 const CameraMatrix& cameraMatrix,
00050 const CameraMatrix& prevCameraMatrix,
00051 const Image& image
00052 );
00053
00054 private:
00055
00056 bool greenBefore;
00057 bool whiteBefore;
00058 int numberOfContinuousNoColor;
00059 Vector2<int> lastGreen, lastGreenField;
00060 Vector2<int> lastWhite, lastWhiteField;
00061
00062 enum {maxNumberOfEdgePoints = 200};
00063 struct EdgePoint
00064 {
00065 Vector2<int> offset;
00066 Geometry::Line line;
00067 int weight;
00068 int belongsToLineNo;
00069 };
00070 EdgePoint edgePoints[maxNumberOfEdgePoints];
00071 int numOfEdgePoints;
00072 double gradientThreshold;
00073 double normDistance;
00074 double normProjection;
00075 double multipleAverageDistance;
00076 Matrix2x2<double> referenceChange;
00077 };
00078
00079 #endif// __EdgeSpecialist_h_
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095