Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Drawing functions should take color argument as "gocv.Scalar", not "color.RGBA" #1007

Open
@go4orward

Description

@go4orward

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 theenv.sh orenv.cmd script before trying togo run orgo build?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp