This forum is disabled, please visit https://forum.opencv.org

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.

2 | No.2 Revision |

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.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.