Home open cv assertion failed error while debuging
Reply: 0

open cv assertion failed error while debuging

Praveen Rai
1#
Praveen Rai Published in 2018-01-11 13:07:17Z

I am providing main() part of my code.I am using visual c++ 10 version and opencv 2.4.9 libraries.when I am debugging in output window this line is showing

open cv assertion failed in cv::cvt color,file...opencv\modules\imgproc\src\color.cpp line no 3737 code

int main(int argc, char **argv)
{
    ImageInformation Camera_Read;

    // file paths
    Camera_Read.InputPathLocation = "E:\prav\Images/";
    Camera_Read.OutputPathLocation = "E:\images/";
    // Upper horizontal Boundary
    Camera_Read.UpperBoundary = 0;//25;//100;// 120;
    // Lower horizontal Boundary
    Camera_Read.LowerBoundary = 2448;// 655;//740;// 775;
    // Left Vertical Boundary
    Camera_Read.LeftBoundary = 0;//440; //445;//360;
    // Right Vertical Boundary
    Camera_Read.RightBoundary = 3264;//1102;//1335;// 1140;
    // Threshold for images
    Camera_Read.Threshold = 100; //115;//110;//95; 
    Camera_Read.Threshold_1 = 130;//130;//118;// 135;
    Camera_Read.Threshold_2 = 50;
    Camera_Read.Threshold_Red = 200;
    char tempin[60];char temp[20];

    Mat CalirationImage;

    strcpy(tempin, Camera_Read.InputPathLocation);
    sprintf(temp, "Picture 17.jpg");
    strcat(tempin, temp);
    CalirationImage = imread(tempin);
    //cout << cimg.rows << cimg.cols << endl;
    Mat HorizontalCalibrationImage = Mat::zeros(CalirationImage.rows, CalirationImage.cols, CV_8UC1);
    Mat VerticalCalibrationImage = Mat::zeros(CalirationImage.rows, CalirationImage.cols, CV_8UC1);
    Mat CombinedCalibrationImage = Mat::zeros(CalirationImage.rows, CalirationImage.cols, CV_8UC1);
    bitwise_not(CombinedCalibrationImage, CombinedCalibrationImage);
    bitwise_not(HorizontalCalibrationImage, HorizontalCalibrationImage);
    bitwise_not(VerticalCalibrationImage, VerticalCalibrationImage);
    int noofcminwidth = 0; int noofcmheigth = 0;
    calibrate_camera(Camera_Read, CalirationImage, HorizontalCalibrationImage, VerticalCalibrationImage, CombinedCalibrationImage, noofcminwidth, noofcmheigth);
    printf("Calibration Complete \n");


    data_aquisition(Camera_Read, noofcminwidth, noofcmheigth, CombinedCalibrationImage);
    printf("Data aquisition Complete \n");
    waitKey(0);
    return 0;
}

my input image [RGB IMAGE]

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.398919 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO