gocv icon indicating copy to clipboard operation
gocv copied to clipboard

New drawing functions introduced with Scalar-typed color argument

Open go4orward opened this issue 1 year ago • 2 comments

For all the drawing functions (with color.RGBA color argument) in "imgproc.go", new drawing functions below were added:

  • ArrowedLineWithScalar(img *Mat, pt1 image.Point, pt2 image.Point, s Scalar, thickness int)
  • CircleWithScalar(img *Mat, center image.Point, radius int, s Scalar, thickness int)
  • CircleWithScalarAndParams(img *Mat, center image.Point, radius int, s Scalar, thickness int, lineType LineType, shift int)
  • EllipseWithScalar(img *Mat, center, axes image.Point, angle, startAngle, endAngle float64, s Scalar, thickness int)
  • EllipseWithScalarAndParams(img *Mat, center, axes image.Point, angle, startAngle, endAngle float64, s Scalar, thickness int, lineType LineType, shift int)
  • LineWithScalar(img *Mat, pt1 image.Point, pt2 image.Point, s Scalar, thickness int)
  • RectangleWithScalar(img *Mat, r image.Rectangle, s Scalar, thickness int)
  • RectangleWithScalarAndParams(img *Mat, r image.Rectangle, s Scalar, thickness int, lineType LineType, shift int)
  • FillPolyWithScalar(img *Mat, pts PointsVector, s Scalar)
  • FillPolyWithScalarAndParams(img *Mat, pts PointsVector, s Scalar, lineType LineType, shift int, offset image.Point)
  • PolylinesWithScalar(img *Mat, pts PointsVector, isClosed bool, s Scalar, thickness int)

Nothing else changed.

go4orward avatar Aug 12 '22 04:08 go4orward

In fact, this is the first time I ever made a pull request on Github project. So, please let me know if there's any mistake on my side in the process.

go4orward avatar Aug 12 '22 04:08 go4orward

Thanks for starting work on this @go4orward

Could you please add "smoke tests" for the new functions? See https://github.com/hybridgroup/gocv/blob/release/CONTRIBUTING.md#how-to-add-a-function-from-opencv-to-gocv for more info.

Thanks!

deadprogram avatar Aug 15 '22 06:08 deadprogram