Open liushuai05 opened 6 months ago
Use contours.Size()
to iterate using a standard for loop
for i := 0; i < contours.Size(); i++ {
}
Then you can draw each contour. You can also get a PointVector using contours.At(i)
which then also has a Size()
and an At()
function to get individual coordinates.
Description
When I use gocv.FindContours to get content and traverse through the error: cannot range over contours (variable of type gocv.PointsVector)
I am a beginner, I am very sorry, this problem may be related to my lack of experience, my need is to find a card in a low contrast reading picture (membership card or other cards can be), and then cut out to generate a new picture, but I have been stuck in the contour line to obtain, hope to get help from the big guys, thank you very much.
Steps to Reproduce
1.Here's my code
Your Environment
env.sh
orenv.cmd
script before trying togo run
orgo build
? Yes, it reported an error: This script is no longer necessary and has been deprecated. See the Custom Environment section of the README if you need to customize your environment.