[問題] cvCreateImage記憶體不足
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
vc++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
opencv
問題(Question):
我定義了一個struct
struct SortedFrame
{
IplImage* img;
int x;
int y;
bool done;
};
用vector去儲存 並對vector內的x座標做排序
我使用quick sort
但在copy image的時候 必須cvcreateimage給其正確的長寬
所以sort時不斷的createimage就不斷的佔用新的空間
資料量小的時候ok
但多的時候就會insufficient memory
程式碼在這裡
http://codepad.org/1fobrCPT
想請教各位要怎麼修改呢?
謝謝!
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.118.175.46
推
11/16 18:37, , 1F
11/16 18:37, 1F
→
11/16 20:07, , 2F
11/16 20:07, 2F
推
11/16 20:56, , 3F
11/16 20:56, 3F
推
11/17 02:07, , 4F
11/17 02:07, 4F
→
11/17 09:51, , 5F
11/17 09:51, 5F