- Notifications
You must be signed in to change notification settings - Fork877
Description
In the current version 0.31.0 of GoCV,
all the drawing functions (such as Line(), Circle(), FillPoly(), etc.) takes color argument as "color.RGBA".
But C++ OpenCV drawing functions take color argument as "Scalar" which can take "double" values.
While C++ OpenCV drawing functions can draw on any Mat with various pixel types (like CV_16S, CV_16U, CV_32F),
GoCV drawing wrapper functions cannot do the same thing, becasue they only take "color" values as uint8.
IMHO, the APIs of GoCV drawing functions significantly limit the capability of original OpenCV library functions.
Description
First of all, I'd like to thank all the authors of GoCV.
I really appreciate your contributions and the efforts put into this wonderful library.
Related drawing functions include
- ArrowedLine()
- Circle()
- DrawContours()
- Ellipse()
- FillPoly()
- Ellipse()
- Line()
- PolyLines()
- Rectangle()
As a consequence, we cannot use the above drawing functions on gocv.Mat
with different pixel types other than gocv.MatTypeCV8U.
It can be confirmed that all the corresponding C++ OpenCV functions
take the color argument as "Scalar &color".
Steps to Reproduce
There is no bug to be reported (and reproduced) in the current version of GoCV API.
This report suggests GoCV APIs should be "expanded"
to utilize the full capability of C++ OpenCV library.
1.
2.
3.
4.
Your Environment
- Operating System and version: Ubuntu 18.04
- OpenCV version used: 4
- How did you install OpenCV? go get
- GoCV version used: 0.31.0
- Go version: 1.18.3
- Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
?