1 | initial version |
i don't think, there's a straightforward way to do this at all.
first, you can't simply put a CvChain into a cv::Mat. even if you manage to extract the contents via c-api macros (shudder), this chain consists of a cvPoint, and freeman-chain bytes, so 2 totally different datatypes, which can't go into a single Mat.
then, each of your contours will have a different length, which is not acceptable input for machine learning.
2 | No.2 Revision |
i don't think, there's a straightforward way to do this at all.
first, you can't simply put a CvChain into a cv::Mat. even if you manage to extract the contents via c-api macros (shudder), this chain consists of a cvPoint, and freeman-chain bytes, so 2 totally different datatypes, which can't go into a single Mat.
then, each of your contours will have a different length, which is not acceptable input for machine learning.