0
我的開發環境是MINGW32位CMake的在Windows 7(此相同的代碼工作正常,在Linux上)對於大圖像,OpenCV CvSeq遞歸元素訪問失敗?
我用cvFindContours()使用OpenCV的檢測輪廓。
我使用遞歸方法來traveser所得CvSeq通過水平訪問的輪廓如下:
void helperParseCurves(CvSeq* contour, int level) {
//Travel same level contours
if(contour->h_next != NULL) {
helperParseCurves(contour->h_next, level);
}
if(contour->v_next != NULL) {
helperParseCurves(contour->v_next, level+1);
}
//Travel child levels
for(int i=0; i<contour->total; i++){
//Try to access Point data -- Crash here when threshold level 114 ?
//Works when uncommented
CvPoint* p = CV_GET_SEQ_ELEM(CvPoint, contour, i);
}
}
但在線應用程序崩潰CvPoint * P = CV_GET_SEQ_ELEM(CvPoint,輪廓,I); 這發生在一些特定的大圖像,並在Linux中正常工作。
我已經上傳的示例程序來演示場景在
http://dl.dropbox.com/u/17399055/opencv-test.zip
*下載和使用CMake的
*編譯使用的樣本圖像運行代碼 - 「OCvTest.exe測試 - img.tif「
*更改滑塊值114左右,應用程序崩潰。
*如果#27行註釋正常工作。
對此有任何提示?
難道這是一個OpenCV的錯誤?
在此先感謝。