Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is created as Point2f because even if you start from Point2i, a rotation can produce floating-point coordinates and rounding them to integers can lead to accuracy loss. I don't think using floating point instead of integers can be a performance issue, since both are typedef of the same Point_ class as explained here.

At most, you can be afraid of memory occupation if integers are 16 bits and floating point are 32 bits.

It is created as Point2f because even if you start from Point2i, a rotation can produce floating-point coordinates and rounding them to integers can lead to accuracy loss. Given all the optimization involved in OpenCV at compile time, I don't think using floating point instead of integers can be a performance issue, since both are typedef of the same Point_ class as explained here.

At most, you can be afraid of memory occupation if integers are 16 bits and floating point are 32 bits.