OpenCV影像處理基礎
- 0、自行下載Window10安裝Visual Studio 2019
- 1、配置opencv環境
- 2、測驗:自行創建專案,測驗代碼如下
0、自行下載Window10安裝Visual Studio 2019
官網:https://visualstudio.microsoft.com/zh-hans/
1、配置opencv環境
在Visual Studio 2019上配置opencv3教程:https://blog.csdn.net/qq_42741583/article/details/82189600
在ubuntu上配置opencv3教程:https://blog.csdn.net/weixin_41194129/article/
環境變數配置:

Visual Studio 2019配置你下載解壓后存放的opencv路徑,匯入相關opencv路徑:



2、測驗:自行創建專案,測驗代碼如下
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
#if 1
int main()
{
Mat image = imread("D:\\CV2021\\opencv_test0\\Project1\\test_img\\test0.jpg"); //圖片路徑
double scale = 0.5; //顯示的影像大小為原來大小的0.3
Size dsize = Size(image.cols * scale, image.rows * scale);
Mat image2 = Mat(dsize, CV_32S);
resize(image, image2, dsize);
imshow("Read Image", image2);
waitKey(0);
return 0;
}
#endif // 0

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/299428.html
標籤:其他
上一篇:音頻處理——G711標準詳解
