Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think I fixed the problem(first example of code is working). I install opencv on ubuntu ( sudo apt-get install libopencv-dev or something like that in ubuntu terminal ). Then you must create new project in QT Creator (file>new project> qt console application). You will get 2 files main.cpp and your_project_name.proj. Type in 'your_project_name.proj' "INCLUDEPATH += I/usr/include/" "LIBS += -lopencv_core \ -lopencv_highgui \ -lopencv_imgproc \ -lopencv_features2d \ -lopencv_calib3d"

The code in main.cpp file is

#include< opencv2/core/core.hpp>

#include< opencv2/highgui/highgui.hpp>

int main()

{

cv::Mat koko = cv::imread("plik.jpg");
cv::namedWindow("Oko");
cv::imshow("oko",koko);
cv::waitKey(5000);

return 0;

}

And it's work fine. I don't check any other examples.