Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4596316
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:05:52+00:00 2026-05-21T23:05:52+00:00

Bradski states that When you want to delete a sequence, you can use cvClearSeq(),

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:05:53+00:00Added an answer on May 21, 2026 at 11:05 pm

    I’m convinced that he meant cvClearMemStorage():

    Clears memory storage. This is the only way(!!!) (besides cvRestoreMemStoragePos)
    to reuse memory allocated for the storage – cvClearSeq,cvClearSet …
    do not free any memory.
    A child storage returns all the blocks to the parent when it is cleared.

    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:

    // Create variable to hold the memory allocated for calculations
    CvMemStorage* storage = 0;
    
    // Allocate the memory storage. Param 0 will set the block size to a default value - currently it is about 64K.
    storage = cvCreateMemStorage(0);
    
    IplImage* gray = NULL; 
    // <insert code to load a gray image here>
    
    /* Retrieves contours from the binary image and returns the number of retrieved contours.
     * cvFindContours will scan through the image and store connected contours in "storage".
     * "contours" will point to the first contour detected.
     */
    CvSeq* contours = 0;
    cvFindContours(gray, storage, &contours );
    
    // Clear the memory storage which was used before
    cvClearMemStorage(storage);
    
    // Release memory
    cvReleaseMemStorage(&storage);
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm studing the grat book Learning oPENCV, o'Reilly, from Bradsky and Kaehler. i'm on
I am totally new to camera calibration techniques... I am using OpenCV chessboard technique...
I am playing with the affine transform in OpenCV and I am having trouble

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.