c++ - Problem with iterating over a lots of images in OpenCv with mac os -


I'm trying to iterator on some directories containing about 600 images. I load the image if the image is full, then I release it. This is the smallest program that I can write to reproduce the error.

After loading and releasing 124 images the program prevents loading images. I think this is a memory issue but I do not know what is the reason for the program to stop loading images

I use my Mac < I'm not using the OpenCV on / strong>. I do not know which version I'm using, how can I really find out.

  bool facial detection strategy: detectFace (std :: string imagePath) {IplImage * img = cvLoadImage (imagePath.c_str), CV_LOAD_IMAGE_COLOR); If (IMG) {std :: cout & lt; & Lt; "Image loaded" & lt; & Lt; ImagePath & lt; & Lt; Std :: endl; CvReleaseImage (& amp; img); } And {std :: cout & lt; & Lt; "Image did not load" & lt; & Lt; ImagePath & lt; & Lt; Std :: endl; } Back true;  

}

This method is called in the directory through every image. After 124 images, if a part of IMG (IMG) evaluates false and the second branch Is executed. If I later try to load the pictures from other parts of the program, they will not load too.

Edit This is not a memory problem. Mac OS Standard maximum open files are 256 after it has changed to 512, I can open up to 251 images. So it seems that OpenCV does not close the image files after loading them.

The search for bugreaker from OpenCV shows this problem:

It seems that this is a bug in OpenCV Mac implementation and the only way to solve it is to install a new version of OpenCV.

Edit Installing the final version of OpenCV with the repository trunk solves the problem sometimes it checks the BugTracker of the framework you are using Helps ...


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -