OpenCV: How to copy CvSeq data into CvMat?
Posted
by Can Bal
on Stack Overflow
See other posts from Stack Overflow
or by Can Bal
Published on 2010-03-09T01:09:29Z
Indexed on
2010/03/09
4:51 UTC
Read the original article
Hit count: 596
I have a CvSeq structure at hand, which is the output of an available OpenCV function. This holds 128 bytes of data in each of the sequence elements. I want to copy each of these 128-byte elements into rows of a CvMat structure to form a N-by-128 of type CV_32FC1. What would be the most efficient way to do this?
I thought of using memcpy but I couldn't come up with a working solution.
For the details, I want to calculate the SURF features in an image by cvExtractSURF() function, and copy the SURF descriptors into a matrix for passing it to the cvKMeans2().
© Stack Overflow or respective owner