6주차 수업 끝

This commit is contained in:
USW
2025-04-02 12:07:31 +09:00
parent 86a66bbeff
commit f2f018da0c
50 changed files with 2399 additions and 51 deletions

24
ch07/blurring/main.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include <iostream>
#include "opencv2/opencv.hpp"
using namespace std;
using namespace cv;
int main() {
Mat src = imread("..\\..\\resources\\images\\rose.bmp", IMREAD_GRAYSCALE);
imshow("src", src);
Mat dst;
for (int sigma = 1; sigma <= 5; sigma++) {
GaussianBlur(src, dst, Size(), (double)sigma);
string text = format("sigma = %d", sigma);
putText(dst, text, Point(10, 30), FONT_HERSHEY_SIMPLEX, 1.0, Scalar(255), 1, LINE_AA);
imshow(text, dst);
waitKey(0);
}
destroyAllWindows();
}