c - How Copy frame to farme -


What is a duplicate in a frame in the second frame in a frame that is not a memory management problem

For example:

  iplimage * frame = NULL; Iplimage * Temp_frame = NULL; While (1) {frame = cvQueryFrame (capture); If (! Frame) break; Temp_frame = cvcloneimage (frame); CvreleaseImage (& amp; Temp_frame); CvreleaseImage (& frame); }   

Error:

Unassisted exception on 0x75b39673 in Open cv.exe: Microsoft C ++ Exception: Exception 0x0015f250 on cv :: memory location.

Please help.

  iplimage * frame = null; Iplimage * Temp_frame = NULL; While (1) {frame = cvQueryFrame (capture); If (! Frame) break; If (! Temp_frame) // only temp_frame creates temp_frame = cvCreateImage (cvGetSize (frame), frame-> depth, frame-> nChannels); Cvcp (frame, temp_frame, tap); // cvQueryFrame () do not release the return! // I believe this is crashing your application // cvreleaseImage (& frame); } // Since the size of "frame" will not change, there is no need to create / release // temp_frame on every move of the loop. So we release it at the end: cvReleaseImage (& amp; Temp_frame);    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -