@@ -445,7 +445,7 @@ Bottle Manager::executeBlobRecog(const string &objName)
445
445
closestBlob=findClosestBlob (blobs,pointLocation);
446
446
mutexResources.unlock ();
447
447
448
- CvPoint cog;
448
+ cv:: Point cog;
449
449
cog.x = closestBlob.get (0 ).asInt ();
450
450
cog.y = closestBlob.get (1 ).asInt ();
451
451
@@ -511,7 +511,7 @@ int Manager::executeToolOnLoc()
511
511
closestBlob=findClosestBlob (blobs,pointLocation);
512
512
mutexResources.unlock ();
513
513
514
- CvPoint cog;
514
+ cv:: Point cog;
515
515
cog.x = closestBlob.get (0 ).asInt ();
516
516
cog.y = closestBlob.get (1 ).asInt ();
517
517
@@ -566,7 +566,7 @@ Bottle Manager::findBlobLoc()
566
566
closestBlob=findClosestBlob (blobs,pointLocation);
567
567
mutexResources.unlock ();
568
568
569
- CvPoint cog;
569
+ cv:: Point cog;
570
570
cog.x = closestBlob.get (0 ).asInt ();
571
571
cog.y = closestBlob.get (1 ).asInt ();
572
572
@@ -601,7 +601,7 @@ bool Manager::executePCLGrasp( const string &objName )
601
601
blobs.clear ();
602
602
bool invalid = false ;
603
603
bool isGrasped = false ;
604
- CvPoint locObj;
604
+ cv:: Point locObj;
605
605
Bottle result;
606
606
result.clear ();
607
607
@@ -769,7 +769,7 @@ int Manager::executeToolSearchOnLoc( const string &objName )
769
769
blobs=getBlobs ();
770
770
// failure handling
771
771
Bottle result;
772
- CvPoint objLoc;
772
+ cv:: Point objLoc;
773
773
774
774
int objIndex = 0 ;
775
775
@@ -1276,7 +1276,7 @@ int Manager::executeOnLoc(bool shouldTrain)
1276
1276
closestBlob=findClosestBlob (blobs,pointLocation);
1277
1277
mutexResources.unlock ();
1278
1278
1279
- CvPoint cog;
1279
+ cv:: Point cog;
1280
1280
cog.x = closestBlob.get (0 ).asInt ();
1281
1281
cog.y = closestBlob.get (1 ).asInt ();
1282
1282
@@ -1370,7 +1370,7 @@ int Manager::executeOnLoc(bool shouldTrain)
1370
1370
rpcMotorKarma.write (karmaMotor, KarmaReply);
1371
1371
fprintf (stdout," action is %s:\n " ,KarmaReply.toString ().c_str ());
1372
1372
1373
- CvPoint finalPoint;
1373
+ cv:: Point finalPoint;
1374
1374
if (particleFilter.getTraker (finalPoint))
1375
1375
{
1376
1376
while (finalPoint.x <1 && finalPoint.x >320 && finalPoint.y <1 && finalPoint.y >240 )
@@ -1420,7 +1420,7 @@ double Manager::getBlobLenght(const Bottle &blobs, const int i)
1420
1420
double dist = 0 ;
1421
1421
if ((i>=0 ) && (i<blobs.size ()))
1422
1422
{
1423
- CvPoint tl,br;
1423
+ cv:: Point tl,br;
1424
1424
Bottle *item=blobs.get (i).asList ();
1425
1425
if (item==NULL )
1426
1426
return dist;
@@ -1464,7 +1464,7 @@ Bottle Manager::getOffset( Bottle &closestBlob, double actionOrient, Vector &ini
1464
1464
1465
1465
int axe1 = 0 ;
1466
1466
int axe2 = 0 ;
1467
- CvPoint cog;
1467
+ cv:: Point cog;
1468
1468
cog.x = closestBlob.get (0 ).asInt ();
1469
1469
cog.y = closestBlob.get (1 ).asInt ();
1470
1470
@@ -1482,7 +1482,7 @@ Bottle Manager::getOffset( Bottle &closestBlob, double actionOrient, Vector &ini
1482
1482
finalOrient -= orient;
1483
1483
}
1484
1484
1485
- CvPoint pxls;
1485
+ cv:: Point pxls;
1486
1486
Vector offPos;
1487
1487
fprintf (stdout," The 3Dpos is %lf %lf %lf \n " ,initPos[0 ], initPos[1 ], initPos[2 ]);
1488
1488
@@ -1528,7 +1528,7 @@ Bottle Manager::classify(const Bottle &blobs, int index)
1528
1528
mutexResources.unlock ();
1529
1529
// Bottle &toReturn = gotMils.addList();
1530
1530
1531
- CvPoint cog;
1531
+ cv:: Point cog;
1532
1532
cog=getBlobCOG (blobs,index );
1533
1533
Bottle &tmpLine = gotMils.addList ();
1534
1534
Bottle &tmpMils = tmpLine.addList ();
@@ -1587,7 +1587,7 @@ double Manager::getPeriod()
1587
1587
}
1588
1588
1589
1589
/* *********************************************************/
1590
- bool Manager::get3DPosition (const CvPoint &point, Vector &x)
1590
+ bool Manager::get3DPosition (const cv:: Point &point, Vector &x)
1591
1591
{
1592
1592
Bottle cmdMotor,replyMotor;
1593
1593
cmdMotor.addVocab (Vocab::encode (" get" ));
@@ -1634,12 +1634,12 @@ Bottle Manager::getBlobs()
1634
1634
return lastBlobs;
1635
1635
}
1636
1636
/* *********************************************************/
1637
- CvPoint Manager::getBlobCOG (const Bottle &blobs, const int i)
1637
+ cv:: Point Manager::getBlobCOG (const Bottle &blobs, const int i)
1638
1638
{
1639
- CvPoint cog=cvPoint (RET_INVALID,RET_INVALID);
1639
+ cv:: Point cog=cv::Point (RET_INVALID,RET_INVALID);
1640
1640
if ((i>=0 ) && (i<blobs.size ()))
1641
1641
{
1642
- CvPoint tl,br;
1642
+ cv:: Point tl,br;
1643
1643
Bottle *item=blobs.get (i).asList ();
1644
1644
if (item==NULL )
1645
1645
return cog;
@@ -1655,15 +1655,15 @@ CvPoint Manager::getBlobCOG(const Bottle &blobs, const int i)
1655
1655
return cog;
1656
1656
}
1657
1657
/* *********************************************************/
1658
- Bottle Manager::findClosestBlob (const Bottle &blobs, const CvPoint &loc)
1658
+ Bottle Manager::findClosestBlob (const Bottle &blobs, const cv:: Point &loc)
1659
1659
{
1660
1660
int ret=RET_INVALID;
1661
1661
double min_d2=std::numeric_limits<double >::max ();
1662
1662
Bottle pointReturn;
1663
1663
pointReturn.clear ();
1664
1664
for (int i=0 ; i<blobs.size (); i++)
1665
1665
{
1666
- CvPoint cog=getBlobCOG (blobs,i);
1666
+ cv:: Point cog=getBlobCOG (blobs,i);
1667
1667
if ((cog.x ==RET_INVALID) || (cog.y ==RET_INVALID))
1668
1668
continue ;
1669
1669
@@ -1677,7 +1677,7 @@ Bottle Manager::findClosestBlob(const Bottle &blobs, const CvPoint &loc)
1677
1677
ret=i;
1678
1678
}
1679
1679
}
1680
- CvPoint cog=getBlobCOG ( blobs, ret );
1680
+ cv:: Point cog=getBlobCOG ( blobs, ret );
1681
1681
pointReturn.addDouble (cog.x ); // cog x
1682
1682
pointReturn.addDouble (cog.y ); // cog y
1683
1683
pointReturn.addInt (ret); // index of blob
0 commit comments