Bradski states that “When you want to delete a sequence, you can use cvClearSeq(), a routine that clears all elements of the sequence.”
HOWEVER, this function does not return allocated blocks in the memory store to either the store or to the system.
He says that “If you want to retrieve that memory for some other purpose, you must clear the memory store via cvClearMemStore()”.
This function does not appear to exist:
error C3861: 'cvClearMemStore': identifier not found
In the errata for the book, it states that: ” ‘cvClearMemStore’ should be ‘cvClearMemStorage’ ” but this function expects a pointer to CvMemStorage, not CvSeq.
error C2664: 'cvClearMemStorage' : cannot convert parameter 1 from 'CvSeq *' to 'CvMemStorage *'
Any ideas?
I’m convinced that he meant
cvClearMemStorage():Text copied from the header: core/core_c.h
As you can tell from the error, you are passing the wrong data type to this function. Check the docs of these functions to know exactly how to call them.
I’ll try to illustrate with the code below:
There are a few tutorials out there that shows the use of cvSeq. I found this one quite interesting. There’s a link to the source code at the bottom of the post.