我運行鱈魚:cv.h:文件未找到OpenCV的
包括
包括
使用命名空間的簡歷包括
;使用namespace std;
INT主(INT的argc,焦炭** argv的){ 如果(argc個= 2!) { COUT < < 「用法:display_image ImageToLoadAndDisplay」 < < ENDL; return -1; }
Mat image; image = imread(argv[1], CV_LOAD_IMAGE_COLOR); // Read the file if(! image.data) // Check for invalid input { cout << "Could not open or find the image" << std::endl ; return -1; } namedWindow("Display window", CV_WINDOW_AUTOSIZE);// Create a window for display. imshow("Display window", image); // Show our image inside it. waitKey(0); // Wait for a keystroke in the window return 0; }
但它不是爲我工作,因爲它顯示在我的屏幕上,當我寫的cmake。在終端中:
cv.h:找不到文件。
任何人都可以幫助我嗎?它在一個月前工作。
非常感謝!它現在正在工作。 :D你知道如何解決與馬列主義者一起運行嗎? – DualSim
cmake_minimum_required(2.8版) 項目(rubicSolver) find_package(OpenCV的必填) add_executable(主main.cpp中) target_link_libraries(主要$ {} OpenCV_LIBS) – eiki
@eiki這正是我在我的CMakeLists文件,但它不沒有工作。任何想法爲什麼? – PierrOz