Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

imread, command line arguments in VS13

$
0
0
I'm trying to run this code in VS13 that uses command line argument I'm following this method but its nt working. Solution Explorer Properties Debugging Command Arguments "D:/Images/image1.jpeg" "D:/Images/image2.jpeg" Code: #include #include #include #include using namespace std; using namespace cv; int main(int argc, char* argv[]) { Mat img; Mat img2; img = imread(argv[1], CV_LOAD_IMAGE_COLOR); img2 = imread(argv[2], CV_LOAD_IMAGE_COLOR); if (img.empty() || img2.empty) { cout << "Error: Image cannot be loaded!" << endl; system("pause"); return -1; } namedWindow("Image", CV_WINDOW_AUTOSIZE); imshow("Image", img); namedWindow("Imag2", CV_WINDOW_AUTOSIZE); imshow("Image2", img2); waitKey(0); return 0; }

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>