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

  • Home
  • SEARCH
  • 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 6344873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:43:28+00:00 2026-05-24T20:43:28+00:00

ok I have this code IplImage *frame; CvCapture *capture = cvCaptureFromCAM(0); frame = cvQueryFrame(capture);

  • 0

ok I have this code

IplImage *frame;
CvCapture *capture = cvCaptureFromCAM(0);
frame = cvQueryFrame(capture);
cvSaveImage("sample.jpg",frame);
cvReleaseImage(&frame);

which saves an image, but after saving that image, I want to release that camera so that it closes. Now the camera stays on until the program stops, I want to relase and close the camera exactly after cvReleaseImage(&frame);

I tried

cvReleaseCapture(&capture)

but it gives me a runtime error: the application has requested the Runtime to terminate in an unusual way and this error

OpenCV Error: Bad argument (unrecognized or unsupported array type)
in unknown function, file ……\modules\core\src\array.cpp, line
996

  • 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-24T20:43:28+00:00Added an answer on May 24, 2026 at 8:43 pm

    I am not completely sure. But try removing the cvReleaseImage call.

    I remember that the image-pointer retrieved by the cvQueryImage method points allways at the same adress. so my guess is that this image-data is managed by the capture. so releasing it is done when you release the capture.

    EDIT:

    found here:
    http://opencv.jp/opencv-1.0.0_org/docs/ref/opencvref_highgui.htm

    The function cvQueryFrame grabs a frame from camera or video file,
    decompresses and returns it. This function is just a combination of
    cvGrabFrame and cvRetrieveFrame in one call. The returned image should
    not be released or modified by user.

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

Sidebar

Related Questions

I have this code: myVariable which I want to change into trace(myVariable: + myVariable);
I have this code, which works fine, but I would like to be able
I have this code, which open new jquery-ui dialog and then hide the dialog's
i have this code which doesnt work: void CAnalyzerIF::SetData(int i_iIters, const CParameterSet* i_CParameterSet) {
I have this code which getting html code of page and than replace all
I have this code in jQuery, that I want to reimplement with the prototype
I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:
I have this code that performs an ajax call and loads the results into
I have this code #include <iostream> using namespace std; int main(int argc,char **argv) {
I have this code: CCalcArchive::CCalcArchive() : m_calcMap() { } m_calcMap is defined as this:

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.