일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- 프로그램
- 주가예측
- 자바독학
- 자바정리
- C++
- frontend
- 자바
- 백준
- 빅데이터
- 코딩
- 코딩독학
- 코테
- 개인프로젝트
- Reflex
- SNS
- Python
- java
- 이웃한 칸
- 모의 주식
- Project
- 개발
- 프로그래밍
- backend
- java정리
- 사물인터넷
- 코스닥
- 개발자
- 풀스택프레임워크
- 프로그래머스
- 코딩테스트
- Today
- Total
목록OpenCV(C++) (11)
Creative Code
※Chapter6.cpp파일 #pragma once #include using namespace std; using namespace cv; //영상을 합성하는 함수 (사이즈가 같아야함) void arithmetic1() { Mat src1 = imread("lenna256.bmp",IMREAD_GRAYSCALE); Mat src2 = imread("square.bmp", IMREAD_GRAYSCALE); if (src1.empty() || src2.empty()) return; cout
※Chapter5.cpp 파일 #pragma once #include using namespace std; using namespace cv; void on_brightness(int pos, void* userdata); static Mat calcGrayHist(const Mat&); static Mat getGrayHistImage(const Mat&); //이미지를 BGR -> GRAYSCALE 또는 GRAYSCALE을 BGR로 바꾸는 함수 void example() { Mat img1 = imread("lenna.bmp"); Mat img2; cvtColor(img1, img2, COLOR_BGR2GRAY); // BGR->GRAYSCALE로 바꾸는 함수 imshow("IMG1", img1); ..
※Chapter4.cpp파일 #pragma once #include using namespace std; using namespace cv; static void on_mouse(int, int, int, int, void*);//함수의 원형 static void on_level_changed(int, void*); // 함수의 원형 static Mat img; Point pt_old; //카메라 연결 함수 void show_camera() { VideoCapture cap(0); // index 0 = 첫번째, 1 -> 두번째 (컴퓨터는 0, 노트북은 1) if (cap.isOpened()) { // 카메라가 연결되었는지 체크 cout
※chapter3.cpp파일 #pragma once #include using namespace std; using namespace cv; //Point 클래스와 Rec클래스, Size클래스 함수 void show_code_3() { Point pt1; // default 생성자 pt1.x = 5; pt1.y = 10; Point pt2(pt1); // 복사 생성자 Point p3 = pt1 + pt2; // 연산자 오버로드 int dot1 = pt1.dot(pt2); // 벡터 내적 cout