How minEnclosingCircle floating point values are used

asked 2014-08-10 19:25:09 -0600

When I calculate the minEnclosingCircle for a set of contours, I add the center and radius to floating point vectors. I can do it like this (omitting the loop) and then draw out the circles:

minEnclosingCircle( Mat(contours_poly[i]), center[i], radius[i] );
circle( newframe, center[i], radius[i], 255, 1, 8, 0 );

A circle I draw may have a center calculated by minEnclosingCircle to be [1139.5, 500.5] and a radius of 7.87799. How does OpenCV deal with this when converting to absolute pixels? Do all pixel values (x, y and radius) automatically get rounded down or is it more complex than this?

edit retag flag offensive close merge delete