【導(dǎo)讀】標(biāo)識(shí)。件。usingnamespacecv;usingnamespacestd;list<string>file_list;longfindResult=_findfirst((),&fileInfo);_findclose(findResult);returnfile_list;}while(0L==_findnext(findResult,&fileInfo));_findclose(findResult);returnfile_list;list<string>filelist;doubletotaltime;filelist=FindAllFile("img_inputs\\*.jpg");((),FindAllFile("img_inputs\\*.png"));for(list<string>::iteratorit=();it!=();it++). MatimgRaw=imread(".\\img_samples\\"+*it);//imshow("srcimg",imgRaw);imwrite(".\\img_crackDetection\\"+*it,cout<<*it<<"----->"<<()<<endl;//system("PAUSE");waitKey();return0;intminX=0x7FFFFFFF,minY=0x7FFFFFFF;intmaxX=0,maxY=0;for(vector<Point>::iteratorit=();it!maxX=it->x;maxY=it->y;minX=it->x;minY=it->y;returnmaxY-minY>maxX-minX?maxY-minY:maxX-minX;return(contourArea(contour1)>contourArea(contour2));return(GetContourSpan(contour1)>GetContourSpan(contour2));vector<vector<Point>>contours;findContours(binImg,contours,CV_RETR_EXTERNAL,RectmaxRect;maxRect=boundingRect(contours[i]);rectangle(srcImg,maxRect,cv::Scalar(0,0,255));vector<vector<Point>>cracksList;findContours(binImg,cracksList,CV_RETR_EXTERNAL,