operations between vector<Point2f> and Point2f

asked 2018-07-20 05:01:47 -0600

cram gravatar image

Hi all,

is there an easier way to do the following:

Point2f point;
vector<Point2f> pointList;
//...
for (int i = 0; i < pointList.size(); i++)
{
    pointList[i] -= point;
}

Would be nice to do that directly in a way like, but that seems not to work:

pointList -= point;

Thanks

edit retag flag offensive close merge delete

Comments

There are some solutions in C++17 and on that can do this more efficiently, but OpenCV is not yet supporting over C++11: https://stackoverflow.com/questions/3...

StevenPuttemans gravatar imageStevenPuttemans ( 2018-07-24 05:09:25 -0600 )edit