내가 뭘하는지 이미지의 사전 처리 후 (thresholding에 의해) 이미지의 윤곽을 찾습니다. 내가 내 코드는 다음 (DFT() 함수를 사용) 각 윤곽선의 이산 푸리에 기술자를 얻으려면,cv :: findcontours 및 DFT 사용 방법? 그것은 디버그 오류가 발생합니다
vector<Mat> contourLines1;
vector<Mat> contourLines2;
getContourLine(exC1, contourLines1, binThreshold, numOfErosions);
getContourLine(exC2, contourLines2, binThreshold, numOfErosions);
// calculate fourier descriptor
Mat fd1 = makeFD(contourLines1.front());
Mat fd2 = makeFD(contourLines2.front());
/////////////////////////
void getContourLine(Mat& img, vector<Mat>& objList, int thresh, int k){
threshold(img,img,thresh,255,THRESH_BINARY);
erode(img,img,0,cv::Point(-1,-1),k);
cv::findContours(img,objList,CV_RETR_LIST,CV_CHAIN_APPROX_SIMPLE);
}
/////////////////////////
Mat makeFD(Mat& contour){
Mat result;
dft(contour,result,DFT_ROWS);
return result;
}
문제는 무엇입니까 ??? 나는 그것을 찾을 수 없습니다 .. 함수의 매개 변수 유형 (예 : cv :: finContours 또는 dft)이 잘못되었다고 생각합니다 ....