반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- discrete_scatter
- 재귀함수
- html
- java역사
- pycharm
- vscode
- 웹 용어
- CES 2O21 참가
- Keras
- classification
- web 개발
- web 사진
- 결합전문기관
- mglearn
- web
- KNeighborsClassifier
- 머신러닝
- cudnn
- 자료구조
- web 용어
- CES 2O21 참여
- 대이터
- paragraph
- inorder
- C언어
- postorder
- bccard
- broscoding
- 데이터전문기관
- tensorflow
Archives
- Today
- Total
bro's coding
embossing filter in C++ 본문
반응형
embossing filter mask
-1 | -1 | 0 |
-1 | 0 | 1 |
0 | 1 | 1 |
#include "opencv2/opencv.hpp"
#include <iostream>
using namespace cv;
using namespace std;
void filter_embossing() {
// 사진 불러오기
Mat src = imread("IMG_20190930_162013_140.jpg",IMREAD_GRAYSCALE);
if (src.empty()) {
cerr << "Image load failed!" << endl;
return;
}
// 3X3 엠보싱 필터 마스크 생성
float data[] = { -1,-1,0,-1,0,1,0,1,1 };
Mat emboss(3, 3, CV_32FC1, data);
Mat dst;
// filter2D 함수 이용 필터링 수행
filter2D(src, dst, -1, emboss, Point(-1, -1), 128);
imshow("src", src);
imshow("dst", dst);
waitKey();
destroyAllWindows();
}
int main() {
filter_embossing();
return 0;
}
반응형
'[AI] > openCV' 카테고리의 다른 글
Gaussian(잡음 추가) in C++ (0) | 2020.06.22 |
---|---|
GaussianBlur(unsharp) in C++ (0) | 2020.06.22 |
GaussianBlur in C++ (0) | 2020.06.22 |
blurring_mean in C++ (0) | 2020.06.22 |
openCV_blink_eyes_count in python (0) | 2020.06.19 |
dlib 이용 얼굴인식 in python (0) | 2020.06.19 |
dlib install (0) | 2020.06.19 |
openCV.install (0) | 2020.06.16 |
Comments