Ask Your Question

Revision history [back]

Please try this :

using namespace std; using namespace cv;

int main(){ int a; Mat image; image = imread("C:/Users/Naveed/Desktop/a.png", CV_LOAD_IMAGE_COLOR); if(!image.data) { cout << "Could not open or find the image" << std::endl ; //imshow("Original Image",image); } namedWindow( "Display window", WINDOW_AUTOSIZE );// Create a window for display. imshow( "Display window", image ); // Show our image inside it.

  waitKey(0);

}

if that doest't work check article here opencvcraze.com

Please try this :

using namespace std;
using namespace cv;

cv;

int main(){ int a; Mat image; image = imread("C:/Users/Naveed/Desktop/a.png", CV_LOAD_IMAGE_COLOR); if(!image.data) { cout << "Could not open or find the image" << std::endl ; //imshow("Original Image",image); } namedWindow( "Display window", WINDOW_AUTOSIZE );// Create a window for display. imshow( "Display window", image ); // Show our image inside it.

it.
   waitKey(0);



}

}

if that doest't work check article here opencvcraze.com

Please try this :

using namespace std;
using namespace cv;

int main(){
    int a;
    Mat image;
     image = imread("C:/Users/Naveed/Desktop/a.png", imread("C:/Users/lapi/Desktop/a.png", CV_LOAD_IMAGE_COLOR);
     if(!image.data)
     {
        cout <<  "Could not open or find the image" << std::endl ;
         //imshow("Original Image",image);
     }
     namedWindow( "Display window", WINDOW_AUTOSIZE );// Create a window for display.
    imshow( "Display window", image );                   // Show our image inside it.


      waitKey(0);



}

if that doest't work check article here opencvcraze.com