gocv
gocv copied to clipboard
Question: How can I get the indices of the convex hull points from Mat?
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
orenv.cmd
script before trying togo run
orgo build
? yes