Answer the question
In order to leave comments, you need to log in
I installed OpenCV 2.4.13 but I can't run the code in Visual Studio, why???
Please, help!!!
I installed it like here
but, apparently, I messed it up somewhere, because nothing works for me (((
there is such a code:
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
#include <cv.h>
#include <highgui.h>
int main(int argc, char* argv[])
{
int x;
cin>>x;
if (argc < 2)
{
printf("Usage: ./opencv_hello <file.png>\n");
return -1;
}
IplImage* img = cvLoadImage(argv[1], CV_LOAD_IMAGE_UNCHANGED);
if (!img)
{
return -1;
}
cvNamedWindow("display", CV_WINDOW_AUTOSIZE);
cvShowImage("display", img );
cvWaitKey(0);
return 0;
}
Answer the question
In order to leave comments, you need to log in
Did you set the arguments for the call? (This is from " Command line arguments with Visual Studio " at the very end of the article).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question