Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know why you could want that but it should be possible, with these functions you can do whatever you want :</p> <p>I should add, that the following is a mix of C and C++ (in OpenCV as well)</p> <p><a href="http://opencv.willowgarage.com/documentation/c/core_dynamic_structures.html?highlight=createseq#cvCreateSeq" rel="nofollow">CreateSeq</a> CvSeq* cvCreateSeq(int seqFlags, int headerSize, int elemSize, CvMemStorage* storage)</p> <p><a href="http://opencv.willowgarage.com/documentation/c/core_dynamic_structures.html?highlight=seqpush#cvSeqPush" rel="nofollow">SeqPush</a> char* cvSeqPush(CvSeq* seq, void* element=NULL)</p> <p>Here is the code, i have not tried it yet, please let me know if there are errors, if it works or not, i just gave it a try...</p> <pre><code>vector&lt;KeyPoint&gt; myKeypointVector; //Your KeyPoint vector // Do whatever you want with your vector CvMemStorage* storage = cvCreateMemStorage(0) // By default the flag 0 is 64K // but myKeypointVector.size()*(sizeof(KeyPoint)+sizeof(CvSeq)) should work // it may be more efficient but be careful there may have seg fault // (not sure about the size CvSeq* myKeypointSeq = cvCreateSeq(0,sizeof(CvSeq),sizeof(KeyPoint),storage); // Create the seq at the location storage for (size_t i=0; myKeypointVector.size(); i++) { int* added = (int*)cvSeqPush(myKeypointSeq,&amp;(myKeypointVector[i])); // Should add the KeyPoint in the Seq } cvClearMemStorage( storage ); cvReleaseMemStorage(&amp;storage); </code></pre> <p>Julien,</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload