- Homebrew安装OpenCV:brew install opencv
- Clion中新建项目testOpenCV,关键是CmakeLists.txt中设置
- main.cpp测试代码:
- 测试代码:
#include #include using namespace cv; int main() { std::string image_path = "path/to/image"; Mat img = imread(image_path, IMREAD_COLOR); imshow("Display window", img); int k = waitKey(0); // Wait for a keystroke in the window return 0; }
03-19
400
03-05
2359
06-24
424
04-14