You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the gocv impl, for example, the MinAreaRect function (https://github.com/covrom/gocv/blob/master/imgproc.cpp#L185), rounds points coordination, center point coordination, and size of a RotatedRect to int, while in OpenCV, they are float. I'm porting Paddle inference code from C++ to Go (which needs gocv), where keeping float precision is essential in sequence of operations, otherwise errors may accumulate. So here's my question:
Is the round used in BoxPoints and MinAreaRect intentionally (by design)?
If not, would you accept a PR that provides float precision version, e.g. BoxPoints2f, MinAreaRect2f that consistents with OpenCV?
Steps to Reproduce
No steps needed.
Your Environment
Operating System and version: Linux docker-desktop 6.6.12-linuxkit # 1 SMP Fri Jan 19 08:53:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
OpenCV version used: 4.8.1
How did you install OpenCV? GoCV Makefile
GoCV version used: v0.35.0
Go version: go version go1.21.7 linux/amd64
Did you run the env.sh or env.cmd script before trying to go run or go build? Not related
The text was updated successfully, but these errors were encountered:
would you accept a PR that provides float precision version, e.g. BoxPoints2f, MinAreaRect2f that consistents with OpenCV?
Yes, please.
The reason for the rounding in BoxPoints() and MinAreaRect() is because most people expect to be able to do something with that Rect such as display it. So your use case is a little different, but seems like a good thing.
Description
In the gocv impl, for example, the MinAreaRect function (https://github.com/covrom/gocv/blob/master/imgproc.cpp#L185), rounds points coordination, center point coordination, and size of a RotatedRect to int, while in OpenCV, they are float. I'm porting Paddle inference code from C++ to Go (which needs gocv), where keeping float precision is essential in sequence of operations, otherwise errors may accumulate. So here's my question:
round
used in BoxPoints and MinAreaRect intentionally (by design)?Steps to Reproduce
No steps needed.
Your Environment
env.sh
orenv.cmd
script before trying togo run
orgo build
? Not relatedThe text was updated successfully, but these errors were encountered: