int main(int argc, char** argv){
if(argc!=1){
usage();
}
for ( indice=1 ;indice<=14; indice++ ){
src = imread(cv::format("NouveauPermis/%d.jpg",indice).c_str(), indice);
//imshow("original",src);
// Pretraitement
vector<Point> points = getMinMaxHistogram(src);
calculLut(points[0],points[1], src);
//imshow("l'image transformée",src);
// Detection des contours
contour = method_canny(src);
//imshow("les contour",contour);
imwrite(cv::format("NouveauPermisT/frame%d.jpg",indice).c_str(), src);
waitKey(0);
destroyAllWindows();
}
return 0; but i get this error when I run it This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. terminate called after throwing an instance of 'cv::Exception' what(): c:/opencv/sources/modules/imgproc/src/color.cpp:8000: error: (-215) scn == 3 || scn == 4 in function cvtColor