I'm trying to catch when two points match (ie x co-ordinates the same, ptA.x == ptB.x, and the same for y). OpenCV docs say I should be able to do this just by comparing the points:
Point2i ptA = Point(0,0);
Point2i ptB = Point(160,120);
if(ptA == ptB);
{
// Do something
}
However, my code in the if loop always executes, which means that ptA == ptB is always true, even if I know it's not.
What am I doing wrong? What can I do to compare whether two points are the same?
Aucun commentaire:
Enregistrer un commentaire