CvPoint2D32f
I want to know what this function does, for example:
CvPoint2D32f center = cvPoint2D32f(src->width/2,src->height/2);
OpenCV has a few different data structures for points (that is, x:y or x:y:z coordinates) and their name tells you what type of point it is.
This particular point is a 2D Point - so it has just X and Y coordinates, and they are 32-bit floating point values. That's what the 32f at the end means. A 3D point that uses 32-bit floating point values would have 3D32f at the end of the data type name.
See this page in the OpenCV reference documentation for more info.
The code you posted sets the coordinates of a 2D point type as the center coordinates of some src data structure (eg cv::Mat or CvMat).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With