gocv icon indicating copy to clipboard operation
gocv copied to clipboard

Question: How can I get the indices of the convex hull points from Mat?

Open SuzukiHonoka opened this issue 2 years ago • 0 comments

Description

I noticed the function ConvexHull(points PointVector, hull *Mat, clockwise bool, returnPoints bool) only accepts Mat as the receiver. According to the OpenCV documentation, it may return std::vector<int> while returnPoints=false. I'd like to know how can I get the std::vector<int> from the Mat? Thanks for the great work!

Steps to Reproduce

hull := gocv.NewMat()
gocv.ConvexHull(approx, &hull, false, false)

Your Environment

  • Operating System and version: Windows 11
  • OpenCV version used: 4.5.5
  • How did you install OpenCV? build from source
  • GoCV version used: 0.30.0
  • Go version: 1.8
  • Did you run the env.sh or env.cmd script before trying to go run or go build? yes

SuzukiHonoka avatar Apr 14 '22 04:04 SuzukiHonoka