Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/ImageProcessor/RasterImageProcessor/REnemySpecialist.cpp

Go to the documentation of this file.
00001 // REnemySpecialist.cpp: Implementierung der Klasse REnemySpecialist.
00002 //                                                            
00003 //////////////////////////////////////////////////////////////////////                  
00004 #include "REnemySpecialist.h"                                       
00005 #include <algorithm>                                              
00006 #include <stdlib.h>                                               
00007 #include <time.h>                                               
00008 #include <list>                                                     
00009 #include <bitset>                                             
00010 #include "Tools/RingBuffer.h"                           
00011 using namespace std;
00012 
00013 typedef list<list<RasterSpecialist::LinePair> > SegmentList;
00014                                                               
00015 //////////////////////////////////////////////////////////////////////                                
00016 // Konstruktion/Destruktion                                             
00017 //////////////////////////////////////////////////////////////////////
00018 
00019 REnemySpecialist::REnemySpecialist(RasterImageProcessor &processor,RasterStrategy &strat):
00020   RasterSpecialist(processor),lines(200),columns(30)
00021 {
00022     strategy = &strat;
00023     preScanNeeded = true;
00024     postScanNeeded = true;
00025 }
00026 
00027 REnemySpecialist::~REnemySpecialist()
00028 {
00029 }
00030 
00031 void REnemySpecialist::executePostProcessing()
00032 {
00033   if (lines.size()==0) // keine linePairs? => keine Gegner...
00034   return; // also auch keine Segmentierung nötig
00035 
00036   // segment image first (each segment is a list of LinePairs)
00037   // Konvertierung von vector<LinePair> nach list<LinePair>   
00038   vector<list<LinePair> > v;
00039   list<LinePair> linesList;
00040 
00041   vector<LinePair>::iterator ite = lines.begin();
00042   while(ite != lines.end()){
00043     linesList.push_back(*ite);
00044     ite++;
00045   }
00046 
00047   // list<LinePair> linesList jetzt gefüllt mit Werten aus vector<LinePair> lines 
00048         createSegmentsFromLines2(linesList,v,-2,6);
00049   // in  vector<list<LinePair>> v stehen jetzt Segmente als Listen von LinePairs
00050 
00051       for (unsigned s = 0; s < v.size();s++) { // Schleife über Segmente
00052     //OUTPUT(idText,text,"processing segment number "<< s);
00053     // calculateValidity
00054       int counterRed=0;
00055     int counterBlue=0;
00056     int counterGray=0;
00057     int counterOrange=0;
00058     
00059     list <LinePair>::iterator it = v[s].begin();
00060 
00061     
00062     // Preprocessing zur späteren Berechnung der enemyValidity bzw. zur Entscheidung ob Daten überhaupt gut genug für Percept
00063     while(it != v[s].end())
00064     {
00065          LinePair b = *it;
00066      for (unsigned i=1;i<10;i++) {
00067              if (getColor(b.v1.x+((b.v2.x-b.v1.x)*i)/10,b.v1.y)==red)
00068          {
00069             //DOT(imageProcessor_obstacles,b.v1.x+((b.v2.x-b.v1.x)*i)/10,b.v1.y,Drawings::ps_solid, Drawings::pink);
00070             counterRed++;
00071          }
00072          else
00073          if (getColor(b.v1.x+((b.v2.x-b.v1.x)*i)/10,b.v1.y)==gray)
00074          {
00075             counterGray++;
00076          }
00077          else
00078          if (getColor(b.v1.x+((b.v2.x-b.v1.x)*i)/10,b.v1.y)==blue)
00079          {
00080              //DOT(imageProcessor_obstacles,b.v1.x+((b.v2.x-b.v1.x)*i)/10,b.v1.y,Drawings::ps_solid, Drawings::skyblue);
00081            counterBlue++;
00082          }
00083          else
00084          if (getColor(b.v1.x+((b.v2.x-b.v1.x)*i)/10,b.v1.y)==orange)
00085          {
00086              counterOrange++;
00087          }
00088      }
00089      it++;
00090     }
00091       // Entscheidung basierend auf counters, ob Daten gut genug für ein PlayerPercept
00092     if (((counterOrange<counterBlue)||(counterOrange<counterRed))&&((counterRed>=2)||(counterBlue>=2))&&(v[s].size()>3)) // zuviel Orange im Segment? oder überhaupt keine Trikots erkannt? => dann generiere auch keine Percepts
00093       {
00094        // calculateFarestPoint: berechnet entferntesten Punkt eines Segments zum Horizont
00095        Vector2<int> pointOnField=calculateFarestPointFastCOG(v[s]);  // 2-Point Approximation via COG
00096        // Vector2<int> pointOnField=calculatePointOnFieldFromSegment(v[s]); // according to Ingo
00097      // generate percept
00098          Vector2<int> np;
00099      np.x=0;
00100      np.y=0;
00101      SinglePlayerPercept percept;
00102        percept.offset.x=pointOnField.x;
00103        percept.offset.y=pointOnField.y;
00104        double enemyValidity;
00105      double enemyValidity2;
00106        if (counterRed>counterBlue)
00107      {
00108          enemyValidity=(double)(counterRed+counterGray)/((v[s].size()*9)+counterBlue);
00109        if ((Geometry::distance(np,pointOnField)>2000)&&(Geometry::distance(np,pointOnField)<5500))
00110        {
00111        enemyValidity2=(double)((-1)*(Geometry::distance(np,pointOnField)-2000)/5500+0.64);
00112        enemyValidity=(double)enemyValidity*enemyValidity2*enemyValidity2;
00113 
00114        }
00115        else 
00116        if (Geometry::distance(np,pointOnField)<=2000)
00117        enemyValidity=(double)(enemyValidity*((-1)*(Geometry::distance(np,pointOnField))/8000+1));
00118        else
00119            if (Geometry::distance(np,pointOnField)>=5500)
00120              enemyValidity=(double)(enemyValidity/100);
00121            
00122        //enemyValidity=(double)(enemyValidity*((counterRed-counterBlue)/counterRed)); // vermindere Validität wenn viele Pixel mit Gegenfarbe im Segment gefunden werden
00123        percept.validity=enemyValidity;
00124          //OUTPUT(idText,text,"Distance to Player: "<< Geometry::distance(np,pointOnField));
00125        //OUTPUT(idText,text,"CounterRed: "<< counterRed);
00126        //OUTPUT(idText,text,"CounterGray: "<< counterGray);
00127            //OUTPUT(idText,text,"CounterBlue: "<< counterBlue);
00128        //OUTPUT(idText,text,"CounterOrange: "<< counterOrange);
00129        //OUTPUT(idText,text,"LinesSize: "<< v[s].size());
00130        //OUTPUT(idText,text,"EnemyValidity: "<< enemyValidity);
00131        rip->playersPercept.addRedPlayer(percept);
00132 
00133      }
00134      else
00135        if (counterBlue>counterRed)       
00136      {
00137            enemyValidity=(double)(counterBlue+counterGray)/((v[s].size()*9)+counterRed);
00138        if ((Geometry::distance(np,pointOnField)>2000)&&(Geometry::distance(np,pointOnField)<5500))
00139        {
00140        enemyValidity2=(double)((-1)*(Geometry::distance(np,pointOnField)-2000)/5500+0.64);
00141        enemyValidity=(double)enemyValidity*enemyValidity2*enemyValidity2;
00142 
00143        }
00144        else 
00145        if (Geometry::distance(np,pointOnField)<=2000)
00146        enemyValidity=(double)(enemyValidity*((-1)*(Geometry::distance(np,pointOnField))/8000+1));
00147        else
00148            if (Geometry::distance(np,pointOnField)>=5500)
00149              enemyValidity=(double)(enemyValidity/100);
00150            //enemyValidity=(double)(enemyValidity*((counterBlue-counterRed)/counterBlue)); // vermindere Validität wenn viele Pixel mit Gegenfarbe im Segment gefunden werden
00151            percept.validity=enemyValidity;
00152        //OUTPUT(idText,text,"Distance to Player: "<< Geometry::distance(np,pointOnField));
00153        //OUTPUT(idText,text,"CounterRed: "<< counterRed);
00154        //OUTPUT(idText,text,"CounterGray: "<< counterGray);
00155            //OUTPUT(idText,text,"CounterBlue: "<< counterBlue);
00156        //OUTPUT(idText,text,"CounterOrange: "<< counterOrange);
00157        //OUTPUT(idText,text,"LinesSize: "<< v[s].size());
00158        //OUTPUT(idText,text,"EnemyValidity: "<< enemyValidity);
00159        rip->playersPercept.addBluePlayer(percept);
00160      }
00161      else
00162        if (counterBlue==counterRed)
00163      {
00164        // generiere keinen Percept (weil Daten zu ungenau)
00165      }
00166     }
00167   }
00168   
00169 }
00170 
00171 
00172 void REnemySpecialist::invokeOnPreScan(int x,int y){
00173   if (!strategy->insidePlayer) tempP = Vector2<int>(x,y); //get BildKoordinate vom RasterPunkt x,y
00174   else{
00175     LinePair lp(tempP,Vector2<int>(x,y));
00176     
00177     if ((lp.v2.x - lp.v1.x) < 5)
00178       return;
00179 
00180     lines.push_back(lp);      
00181     LINE(imageProcessor_obstacles,
00182       lp.v1.x,lp.v1.y, lp.v2.x,lp.v2.y, 
00183       0.5, Drawings::ps_solid, Drawings::white);
00184     DOT(imageProcessor_obstacles, lp.v2.x, lp.v2.y,
00185       Drawings::pink, Drawings::green);
00186   }
00187 }
00188 
00189 
00190 void REnemySpecialist::invokeOnPostScan(int x,int y)
00191 { 
00192   if (!strategy->insidePlayer) tempP = Vector2<int>(x,y);
00193   else{
00194     LinePair lp(tempP,Vector2<int>(x,y));
00195     lines.push_back(lp);
00196       
00197     LINE(imageProcessor_obstacles,
00198       lp.v1.x,lp.v1.y, lp.v2.x,lp.v2.y, 
00199       0.5, Drawings::ps_solid, Drawings::white);      
00200     DOT(imageProcessor_obstacles, lp.v2.x, lp.v2.y, 
00201       Drawings::pink, Drawings::green);
00202   }
00203 }
00204 
00205 int REnemySpecialist::getType()
00206 {
00207   return __REnemySpecialist;  
00208 }
00209 
00210 Vector2<int> REnemySpecialist::calculateFarestPoint(std::list<LinePair> enemyLines)
00211 { 
00212         Vector2<int> pointOnField;
00213   horizon = rip->getHorizon();
00214   Vector2<double> iPoint, maxPoint;
00215   list <LinePair>::iterator itmax = enemyLines.begin();
00216   list <LinePair>::iterator it1 = enemyLines.begin();
00217   LinePair b=*it1;
00218   LinePair bmax=*itmax;
00219   if (horizon.direction.y>0)
00220         { // berechnet, ob Horizont steigt(/)<0 oder fällt(\)>0 als Fallunterscheidung zur Effizienzsteigerung
00221            //OUTPUT(idText,text,"Ascendency Awaits You: Horizon falls");
00222            while(it1 != enemyLines.end())
00223            {
00224         b=*it1;
00225               bmax=*itmax;
00226         iPoint.x=b.v1.x;
00227         iPoint.y=b.v1.y;
00228               maxPoint.x=bmax.v1.x;
00229               maxPoint.y=bmax.v1.y;
00230               if (Geometry::getDistanceToLine(horizon,iPoint)<Geometry::getDistanceToLine(horizon, maxPoint))
00231               { // < weil Entfernungen unterhalb des Horizonts negativ, deshalb Punkte oberhalb des Horizonts hier nicht reingeben!
00232      itmax=it1;
00233            bmax=b;
00234               }
00235               it1++;
00236      }
00237      DOT(imageProcessor_obstacles, bmax.v1.x,bmax.v1.y,Drawings::ps_solid, Drawings::yellow);  // zeichnet den entferntesten Punkt pink ein
00238      Geometry::calculatePointOnField(bmax.v1.x,bmax.v1.y,(rip->cameraMatrix),rip->image.cameraInfo,pointOnField); // der entfernteste Punkt vom Horizont im Kamerabild wird Punkt auf Spieldfeld relativ zum Robot zugeordnet 
00239   } 
00240   else
00241         { // Fall Horizont steigt (/)
00242            //OUTPUT(idText,text,"Horizon rises (/)");
00243      while(it1 != enemyLines.end())
00244      {
00245               b=*it1;
00246               bmax=*itmax;
00247         iPoint.x=b.v2.x;
00248         iPoint.y=b.v2.y;
00249               maxPoint.x=bmax.v2.x;
00250         maxPoint.y=bmax.v2.y;
00251               if (Geometry::getDistanceToLine(horizon,iPoint)<Geometry::getDistanceToLine(horizon, maxPoint))
00252               { // < weil Entfernungen unterhalb des Horizonts negativ, deshalb Punkte oberhalb des Horizonts hier nicht reingeben!
00253      itmax=it1;
00254      bmax=b;
00255         }
00256               it1++;
00257      }
00258            DOT(imageProcessor_obstacles, bmax.v2.x,bmax.v2.y,Drawings::ps_solid, Drawings::yellow);  // zeichnet den entferntesten Punkt pink ein
00259      Geometry::calculatePointOnField(bmax.v2.x,bmax.v2.y,(rip->cameraMatrix),rip->image.cameraInfo,pointOnField); // der entfernteste Punkt vom Horizont im Kamerabild wird Punkt auf Spieldfeld relativ zum Robot zugeordnet 
00260         }
00261         //OUTPUT(idText,text,"pointOnField: x: " << pointOnField.x << "y: " << pointOnField.y);
00262         // pointOnField ist nun eine Approximation des Punktes, wo der Gegner auf dem Spielfeld steht (relativ zum Robot)
00263         return (pointOnField);
00264 }
00265 
00266 void REnemySpecialist::sort(int footPointDistance[], Vector2<double> footPoint[], const int& start, const int& end)
00267 {
00268   if (start == end)
00269   {
00270     return;
00271   }
00272   int pivot = footPointDistance[(start+end)/2];
00273   int left = start;
00274   int right = end;
00275   do
00276   {
00277     while (footPointDistance[left] < pivot)
00278     {
00279       left++;
00280     }
00281     while (footPointDistance[right] > pivot)
00282     {
00283       right--;
00284     }
00285     if (left < right)
00286     {
00287        int tmp = footPointDistance[left];
00288        Vector2<double> tmp2 = footPoint[left];
00289        footPointDistance[left] = footPointDistance[right];
00290        footPoint[left] = footPoint[right];
00291        footPointDistance[right] = tmp;
00292        footPoint[right] = tmp2;
00293     }
00294     if (left <= right)
00295     {
00296        left++;
00297        right--;
00298     }
00299   } while (left <= right);
00300   if (start < right)
00301   {
00302      sort(footPointDistance, footPoint, start, right);
00303   }
00304   if (end > left)
00305   {
00306      sort(footPointDistance, footPoint, left, end);
00307   }
00308 }
00309 
00310 
00311 Vector2<int> REnemySpecialist::calculateFarestPointFastCOG(std::list<LinePair> enemyLines)
00312 { 
00313         int numberOfFootPoints=2;
00314   int footPointDistance [500];
00315         Vector2<double> footPoint[500]; // enemyLines.size()*2, bei erhöhter Auflösung eventuell Array vergrößern
00316   Vector2<int> pointsOnField[2]; // number of footpoints
00317   Vector2<int> pointOnField;
00318   horizon = rip->getHorizon();
00319   Vector2<double> point1,point2,maxPoint;
00320   list <LinePair>::iterator itmax = enemyLines.begin();
00321   list <LinePair>::iterator it1 = enemyLines.begin();
00322   LinePair b=*it1;
00323   LinePair bmax=*itmax;
00324   int i=0;
00325   // fülle Arrays mit Daten
00326   while(it1 != enemyLines.end())
00327         {
00328           b=*it1;
00329           point1.x=b.v1.x;
00330     point1.y=b.v1.y;
00331           point2.x=b.v2.x;
00332     point2.y=b.v2.y;
00333     footPoint[i]=point1;
00334     footPointDistance[i]=(int)Geometry::getDistanceToLine(horizon,footPoint[i]);
00335     i++;
00336           footPoint[i]=point2;
00337     footPointDistance[i]=(int)Geometry::getDistanceToLine(horizon,footPoint[i]);
00338     i++;
00339     it1++;
00340   }
00341         // sucht 2 entfernteste Punkte
00342         for (unsigned l = 0; l < (unsigned)numberOfFootPoints;l++)
00343       {
00344           for (unsigned m = l+1; m < (unsigned)(enemyLines.size()*2-1);m++)
00345           {
00346               if (footPointDistance[m]<footPointDistance[l])           
00347               { 
00348                 // swap
00349                 int tmp = footPointDistance[m];
00350                 Vector2<double> tmp2 = footPoint[m];
00351                 footPointDistance[m] = footPointDistance[l];
00352                 footPoint[m] = footPoint[l];
00353                 footPointDistance[l] = tmp;
00354                 footPoint[l] = tmp2;
00355               }
00356           }
00357         }
00358         // 2 entfernteste footPoints stehen nun vorne im Array
00359         for (unsigned g = 0; g < (unsigned)numberOfFootPoints;g++)
00360   {
00361            DOT(imageProcessor_obstacles, footPoint[g].x,footPoint[g].y,Drawings::ps_solid, Drawings::yellow); // zeichnet Fußpunkte ein
00362      Geometry::calculatePointOnField((int)footPoint[g].x,(int)footPoint[g].y,(rip->cameraMatrix),rip->image.cameraInfo,pointOnField);
00363      pointsOnField[g]=pointOnField;
00364   }
00365         // pointsOnFieldArray enthält nun geordnet die FeldPunkte, die zu den entferntesten footPoints zum Horizont gehören
00366   // bestimme Approximation nach COG
00367   pointOnField.x=0;
00368   pointOnField.y=0;
00369   for (unsigned f = 0; f < (unsigned)(numberOfFootPoints);f++)
00370   {
00371     pointOnField.x=pointOnField.x+pointsOnField[f].x;
00372     pointOnField.y=pointOnField.y+pointsOnField[f].y;
00373   }
00374         pointOnField.x=pointOnField.x/numberOfFootPoints;
00375         pointOnField.y=pointOnField.y/numberOfFootPoints;
00376         //OUTPUT(idText,text,"pointOnField approximiert nach COG: x: " << pointOnField.x << "y: " << pointOnField.y);
00377   // pointOnField ist nun eine Approximation des Punktes, wo der Gegner auf dem Spielfeld steht (relativ zum Robot)
00378   return (pointOnField);
00379 }
00380 
00381 Vector2<int> REnemySpecialist::calculateFarestPointCOG(int numberOfFootPoints, std::list<LinePair> enemyLines)
00382 { 
00383         if (enemyLines.size()<4) // besser weniger FootPoints bei kleinen Segmenten
00384   {   
00385           numberOfFootPoints=1;
00386           //OUTPUT(idText,text,"numberOfFootPoints angepasst!");
00387   }
00388   if ((unsigned)numberOfFootPoints>=enemyLines.size()) // fange Probleme durch zu viele Footpoints bei zu kleinen Segmenten ab
00389   {   
00390     numberOfFootPoints=enemyLines.size();
00391           //OUTPUT(idText,text,"numberOfFootPoints zu hoch!");
00392   }
00393   int footPointDistance [500];
00394         Vector2<double> footPoint[500]; // enemyLines.size()*2
00395   Vector2<int> pointsOnField[20]; // number of footpoints
00396   Vector2<int> pointOnField;
00397   horizon = rip->getHorizon();
00398   Vector2<double> point1,point2,maxPoint;
00399   list <LinePair>::iterator itmax = enemyLines.begin();
00400   list <LinePair>::iterator it1 = enemyLines.begin();
00401   LinePair b=*it1;
00402   LinePair bmax=*itmax;
00403   int i=0;
00404   // fülle Arrays mit Daten
00405   while(it1 != enemyLines.end())
00406         {
00407            b=*it1;
00408            point1.x=b.v1.x;
00409      point1.y=b.v1.y;
00410            point2.x=b.v2.x;
00411      point2.y=b.v2.y;
00412      footPoint[i]=point1;
00413      footPointDistance[i]=(int)Geometry::getDistanceToLine(horizon,footPoint[i]);
00414            i++;
00415            footPoint[i]=point2;
00416      footPointDistance[i]=(int)Geometry::getDistanceToLine(horizon,footPoint[i]);
00417      i++;
00418      it1++;
00419   }
00420         // sortiert Punkte nach Abstand zum Horizont mittels QuickSort
00421   sort(footPointDistance,footPoint,0,enemyLines.size()*2-1);
00422         // footPoints nun geordnet nach Abstand zum Horizont
00423         for (unsigned g = 0; g < (unsigned)numberOfFootPoints;g++)
00424   {
00425            DOT(imageProcessor_obstacles, footPoint[g].x,footPoint[g].y,Drawings::ps_solid, Drawings::yellow); // zeichnet Fußpunkte ein
00426      Geometry::calculatePointOnField((int)footPoint[g].x,(int)footPoint[g].y,(rip->cameraMatrix),rip->image.cameraInfo,pointOnField);
00427      pointsOnField[g]=pointOnField;
00428   }
00429         // pointsOnFieldArray enthält nun geordnet die FeldPunkte, die zu den entferntesten footPoints zum Horizont gehören
00430       // bestimme Approximation nach COG
00431   pointOnField.x=0;
00432   pointOnField.y=0;
00433   for (unsigned f = 0; f < (unsigned)(numberOfFootPoints);f++)
00434   {
00435            pointOnField.x=pointOnField.x+pointsOnField[f].x; 
00436            pointOnField.y=pointOnField.y+pointsOnField[f].y;
00437   }
00438         pointOnField.x=pointOnField.x/numberOfFootPoints;
00439         pointOnField.y=pointOnField.y/numberOfFootPoints;
00440         //OUTPUT(idText,text,"pointOnField approximiert nach COG: x: " << pointOnField.x << "y: " << pointOnField.y);
00441         // pointOnField ist nun eine Approximation des Punktes, wo der Gegner auf dem Spielfeld steht (relativ zum Robot)
00442   return (pointOnField);
00443 }
00444 
00445 
00446 Vector2<int> REnemySpecialist::calculatePointOnFieldFromSegment(std::list<LinePair> enemyLines)
00447 { 
00448     Vector2<int> pointOnField;
00449   double maxY,maxY2,leftX,rightX,pointOnPictureX,pointOnPictureY;
00450   list <LinePair>::iterator it1 = enemyLines.begin();
00451   LinePair b=*it1;
00452 
00453         // Berechne leftX und rightX und maxY
00454         b=*it1;
00455         leftX=b.v1.x;
00456         rightX=b.v2.x;
00457         maxY=b.v1.y; // v1.y und v2.y sind sowieso gleich
00458         maxY2=b.v1.y;
00459         while(it1 != enemyLines.end())
00460         {
00461         b=*it1;
00462         if (leftX>b.v1.x)
00463               { 
00464      leftX=b.v1.x;
00465               }
00466               if (rightX<b.v2.x)
00467               { 
00468      rightX=b.v2.x;
00469               }
00470               if (maxY<b.v1.y)
00471               { 
00472                  maxY2=maxY;
00473      maxY=b.v1.y;
00474               }
00475               it1++;
00476         }
00477 
00478         pointOnPictureX=(leftX+rightX)/2;
00479         //pointOnPictureY=(maxY+maxY2)/2; 
00480         pointOnPictureY=maxY; //alternative2
00481         DOT(imageProcessor_obstacles, pointOnPictureX,pointOnPictureY,Drawings::ps_solid, Drawings::yellow);  // zeichnet PointOnPicture ein
00482         // ordne PointOnPicture Punkt auf Spieldfeld relativ zum Robot zu
00483         Geometry::calculatePointOnField((int)pointOnPictureX,(int)pointOnPictureY,(rip->cameraMatrix),rip->image.cameraInfo,pointOnField);
00484         //OUTPUT(idText,text,"pointOnField: x: " << pointOnField.x << "y: " << pointOnField.y);
00485         // pointOnField ist nun eine Approximation des Punktes, wo der Gegner auf dem Spielfeld steht (relativ zum Robot)
00486         return (pointOnField);
00487 }
00488 
00489 void REnemySpecialist::init()
00490 { 
00491         postScanNeeded = false;
00492   preScanNeeded = true;
00493   if (!columns.empty())columns.clear();
00494   if (!lines.empty())lines.clear();
00495 }
00496 
00497 
00498 
00499 
00500 
00501 
00502 
00503 
00504 
00505 
00506 
00507 
00508 /*
00509 * Change log :
00510 * 
00511 * $Log: REnemySpecialist.cpp,v $
00512 * Revision 1.4  2004/09/06 12:02:26  schmidtb
00513 * commented almost all members, removed warnings in documentation
00514 
00515 * did further code clean up
00516 *
00517 * Revision 1.3  2004/09/02 07:59:29  schmidtb
00518 * Added RasterImageProcessor to repository, because we used it for the OpenChallenge.
00519 *
00520 * Revision 1.50  2004/05/25 13:27:33  schmidtb
00521 * modified version of rip for open-challenge
00522 *
00523 * Revision 1.49  2004/03/25 15:29:04  pg_besc
00524 * made some changes
00525 *
00526 * Revision 1.47  2004/03/12 10:35:51  neubach
00527 * - removed debug-outputs
00528 * - approximation via 2 farest points active
00529 *
00530 * Revision 1.46  2004/03/12 10:11:58  neubach
00531 * - added alternative footpointCalculation
00532 *
00533 * Revision 1.45  2004/03/11 13:01:14  neubach
00534 * - FineTuning
00535 *
00536 * Revision 1.44  2004/03/09 09:43:47  neubach
00537 * - fineTuning
00538 *
00539 * Revision 1.43  2004/03/08 10:45:08  neubach
00540 * - removed debug-outputs
00541 *
00542 * Revision 1.42  2004/03/08 09:43:23  neubach
00543 * - reintroduced old enemyValidity-Calculation
00544 *
00545 * Revision 1.41  2004/03/01 11:00:18  neubach
00546 * - removed Debug-Outputs
00547 * - beautified Code
00548 * - faster 2 PointApproximation
00549 *
00550 * Revision 1.40  2004/02/26 14:31:32  schmidtb
00551 * comment some outputs
00552 *
00553 * Revision 1.39  2004/02/18 14:56:19  neubach
00554 * new Segmentation established, code not cleared at all
00555 *
00556 * Revision 1.38  2004/02/13 20:15:10  koh
00557 * black Color also influences validation now
00558 *
00559 * Revision 1.37  2004/02/10 17:01:50  koh
00560 * removed #ifdef TrikotErkennung,
00561 * enemySpecialist recognizes black color now
00562 *
00563 * Revision 1.36  2004/02/04 23:19:38  schmidtb
00564 * debugged and added calculation for angles to BoxSpecialist
00565 *
00566 * Revision 1.35  2004/02/03 23:09:18  hyung
00567 * Array based on rasterWidth now
00568 *
00569 * ! somehow it seems that my code produces warnings for which I'm
00570 * very very sorry, but my compiler told me always 0 errors, 0 warnings....
00571 * does somebody know the reason?
00572 *
00573 * Revision 1.34  2004/02/03 21:28:47  hyung
00574 * more minor changes
00575 *
00576 * Revision 1.33  2004/02/03 21:18:27  hyung
00577 * some minor changes,
00578 *
00579 * size of Segmentborder-Array (TrikotErkennung) basically adaptive to rip-resolution
00580 *
00581 * Revision 1.32  2004/02/03 10:41:34  neubach
00582 * - bug found (see diff)
00583 *
00584 * Revision 1.31  2004/02/03 10:17:33  neubach
00585 * - minor changes
00586 *
00587 * Revision 1.30  2004/02/02 10:47:40  neubach
00588 * - removed Warnings
00589 * - added calculateFarestPointCOG-Method, which improves approximation of EnemyPositions via Center of Gravity Method for n footPoints
00590 *
00591 * Revision 1.29  2004/02/02 00:21:03  hyung
00592 * some validity changes here and there
00593 *
00594 * Revision 1.28  2004/02/01 12:45:00  hyung
00595 * modified Player Validity (creates obstacle percept now, if result of segment-preprocessing not sure)
00596 *
00597 * Revision 1.27  2004/02/01 02:53:48  hyung
00598 * enemy Validity much faster and recognizes blue or red coherent areas now due to dynamical color count.
00599 * new calculation of the perceptvalidity
00600 * if ball fills screen totally and is segmented red due to low brightness it wont be recognized such as one yet!
00601 *
00602 * Revision 1.25  2004/01/31 13:46:13  hyung
00603 * modified bluePlayerValidity-calculation;
00604 *
00605 * Revision 1.24  2004/01/31 11:45:02  hyung
00606 * modified enemyValidity-calculation;
00607 * established basical enviroment for TrikotErkennung, based on Arrays and Lists, changes will take affect only #ifdef TrikotErkennung!
00608 *
00609 * Revision 1.23  2004/01/27 11:12:10  neubach
00610 * - enemyValidity also based on distances now
00611 *
00612 * Revision 1.21  2004/01/23 10:40:53  neubach
00613 * - freezed alternative "Trikoterkennung" and other cosmetic changes
00614 *
00615 * Revision 1.20  2004/01/23 10:13:17  neubach
00616 * - ball should no longer be misinterpreted as enemy
00617 *
00618 * Revision 1.19  2004/01/21 03:25:36  hyung
00619 * TrikotErkennung update
00620 *
00621 * Revision 1.18  2004/01/20 12:12:25  neubach
00622 * - dropped segments consisting of <=2 LinePairs
00623 *
00624 * Revision 1.17  2004/01/19 12:47:42  hyung
00625 * #ifDef TrikotErkennung mit alternativem Einstiegspunkt für Gegnererkennung
00626 *
00627 * Revision 1.16  2004/01/19 11:48:37  neubach
00628 * - improved enemyValidity
00629 *
00630 * Revision 1.15  2004/01/16 09:17:56  neubach
00631 * - removed bug, looks promising, but segmentation could be better in certain cases :(
00632 *
00633 * Revision 1.14  2004/01/16 09:08:42  neubach
00634 * - support for processing >1 enemy-segments (buggy)
00635 *
00636 * Revision 1.13  2004/01/12 12:00:13  neubach
00637 * - changed criteria for boolean isNewPoint, ERS 7 Aibos wont have gray color
00638 *
00639 * Revision 1.12  2004/01/12 11:39:33  neubach
00640 * - improved enemyValidity
00641 * - cut LinePairs above horizon
00642 * - changed criteria for boolean isNewPoint
00643 *
00644 * Revision 1.11  2004/01/07 11:54:28  neubach
00645 * - better debug info for validityCalculation
00646 *
00647 * Revision 1.10  2004/01/07 11:15:07  neubach
00648 * - added enemyValidity
00649 * - added recognition of red and blue players
00650 *
00651 * Revision 1.9  2004/01/07 10:21:57  neubach
00652 * - prepared code for processing >1 segments
00653 *
00654 * Revision 1.8  2003/12/17 16:39:14  schmidtb
00655 * New version
00656 *
00657 * Revision 1.7  2003/12/16 13:45:28  roefer
00658 * Warnings removed
00659 *
00660 * Revision 1.6  2003/12/16 12:05:46  neubach
00661 * - added perception of red player
00662 *
00663 * Revision 1.5  2003/12/16 10:29:17  neubach
00664 * - added calculation of farest point (from horizon) for a playerSegment
00665 * - added conversion point on cameraPicture -> point on Field
00666 *
00667 * Revision 1.4  2003/12/15 13:55:32  schmidtb
00668 * Merged and patched new version of RasterImageProcessor.
00669 *
00670 * Revision 1.3  2003/12/08 15:02:55  schmidtb
00671 * new version of RIP
00672 *
00673 *
00674 *
00675 */
00676 
00677 
00678 

Generated on Thu Sep 23 19:57:30 2004 for GT2004 by doxygen 1.3.6