You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I am using opencv 3.0 beta with visual studio 2013 under windows 7 and 64bit. I downloaded opencv3.0 beta for windows from http://opencv.org/downloads.html.
The following is the code I am using to capture the video from rtsp stream and then save some frames every several minutes. It has no problem to capture and read the stream. But I found, the function "read(InputArrray Image)" cause the memory leak. The memory goes up slowly, about one MB for two or three hours. But it keep going up. I am using it for severy months continually. so it is seriouly problem for me. The following is my code for test. Please help me find out where is my problem with these code. Thanks a lot!
intmain()
{
string fileNameSave;
string URLName;
BOOL stop = FALSE;
BOOL saveFrame = TRUE;
BOOL got_frame = FALSE;
string fileSave = "saveFrame.jpg";
URLName = "rtsp://username:password@IP adress:554/h264/ch1/main/av_stream";
VideoCapture capture;
Mat frame;
capture.open(URLName);
if (!capture.isOpened()){
cout << " channel 1st has error " << endl;
}
while (!stop){
got_frame = capture.read(frame); //here the memory keep goes up//save the frame every minute locallyif (saveFrame == TRUE){
if (got_frame){
imwrite(fileSave, frame);
}
}
}
capture.release();
return0;
}
The text was updated successfully, but these errors were encountered:
I have downloaded the newest release for Opencv, Currently, it is stable without memory going up.
Thanks a lot!
xuqx
From: Maksim Shabunin
Date: 2015-12-03 17:21
To: Itseez/opencv_contrib
CC: XuqxMaritech
Subject: [SPAM] [Disarmed] Re: [opencv_contrib] memory goes up with videocapture read images from rtsp stream (#455)
Closed #455.
—
Reply to this email directly or view it on GitHub.
Hello! I am using opencv 3.0 beta with visual studio 2013 under windows 7 and 64bit. I downloaded opencv3.0 beta for windows from http://opencv.org/downloads.html.
The following is the code I am using to capture the video from rtsp stream and then save some frames every several minutes. It has no problem to capture and read the stream. But I found, the function "read(InputArrray Image)" cause the memory leak. The memory goes up slowly, about one MB for two or three hours. But it keep going up. I am using it for severy months continually. so it is seriouly problem for me. The following is my code for test. Please help me find out where is my problem with these code. Thanks a lot!
The text was updated successfully, but these errors were encountered: