Home > Mobile >  Qt call opencv to test the image, called findContours encounter problems
Qt call opencv to test the image, called findContours encounter problems

Time:09-22

I made a Qt interface, the interface of the image on the left, the right side was detected after using opencv image, but when I call findContours function, there have been some problems
Error: no matching function for the call to 'findContours (CV: : Mat& QVector> & QVector & And CV: : RetrievalModes, CV: : ContourApproximationModes) '
FindContours (bin, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE);
How to solve this problem, ask for help    ^

CodePudding user response:

Header files, or libraries problem or parameters than matching

CodePudding user response:

Is actually the parameter types of errors, findContours QVector types and function of the second and the third parameter types do not match,
The solution:
Will QVector Contours.
QVectorInstead of
STD: : vector Contours.
STD: : vectorIt is ok
  •  Tags:  
  • Qt
  • Related