Ask Your Question

Revision history [back]

Hi evry body, I'm traying to read all images from a forlder by using this

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

Hi evry body, I'm traying to read all images from a forlder by using this

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);


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();

    destroyAllWindows();  
    }

    return 0;
}

return 0; but i get this error when I run it it:

This application has requested the the Runtime to terminate it in an unusual way. unusual way. Please contact the application's application's support team for more information. information.

terminate called after throwing an an instance of 'cv::Exception' 'cv::Exception' what(): c:/opencv/sources/modules/imgproc/src/color.cpp:8000: c:/opencv/sources/modules/imgproc/src/color.cpp:8000: error: (-215) scn == 3 || scn == 4 in in function cvtColor

Hi evry body, I'm traying to read all images from a forlder by using this

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

Hi evry body, I'm traying to read all images from a forlder by Error using thiscalculLut and/or getMinMaxHistogram

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

Error using calculLut and/or getMinMaxHistogram

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