'convert opencv vector Point2f to vector Point

I want to convert the centers obtained by contouring of type vector<Point2f>centers(contours.size()); to integer points so that I can plot the centers. If I print out the centers then they are all in floating point, so how to convert this vector floating points to integer floating points?

cout << "Center:" << centers[i] << endl;
Output : Center:[474.273, 273.845]

I want to round up the values so that I can use this points to plot coordinates on the image.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source