opencv glob 内存溢出异常
生活随笔
收集整理的這篇文章主要介紹了
opencv glob 内存溢出异常
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
先貼代碼(非常簡單的代碼)
#include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include "opencv2/ml.hpp" #include "opencv2/objdetect.hpp" #include <iostream> #include <time.h> using namespace cv; using namespace cv::ml; using namespace std; int main() {vector<String> fn;String s = "E:/c++code/data/train_image/test/*.png";vector<Mat> images;size_t count = fn.size(); //number of png files in images folderfor (size_t i = 0; i<count; i++)images.push_back(imread(fn[i]));waitKey(0);return 0; }試了各種辦法包括將String的應用。包的導入等等都不可以。弄了一天都行,都是下邊這個錯誤?
研究了一天,一直以為是代碼的問題。最后的最后試一下Release模式。結果運行通了。我醉了。。。。。。
索性就對Debug和Release做了一個小小的查詢。
?
總結
以上是生活随笔為你收集整理的opencv glob 内存溢出异常的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: opencv3-Mat对象
- 下一篇: highscore软件_软件|标准物质P