-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5.3d.cpp
More file actions
49 lines (36 loc) · 1.42 KB
/
5.3d.cpp
File metadata and controls
49 lines (36 loc) · 1.42 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Part5.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
#include <cxcore.h>
#include <cv.h>
#include <_highgui.h>
int main()
{
//##################################################################################
// упражнение 5.3
IplImage* Picture = cvLoadImage("../Part3/picture/88.png");
// упражнение 5.3.a
IplImage* Picture1 = cvCreateImage(cvGetSize(Picture), IPL_DEPTH_8U, 1);
IplImage* Picture4 = cvCreateImage(cvGetSize(Picture), IPL_DEPTH_8U, 1);
IplImage* Picture6 = cvCreateImage(cvGetSize(Picture), IPL_DEPTH_8U, 1);
// упражнение 5.3.d
cvSmooth(Picture, Picture1, CV_GAUSSIAN, 9, 9, 1);
cvSmooth(Picture1, Picture1, CV_GAUSSIAN, 0, 0, 9, 1);
cvSmooth(Picture, Picture4, CV_GAUSSIAN, 9, 9, 4);
cvSmooth(Picture4, Picture4, CV_GAUSSIAN, 0, 0, 9, 1);
cvSmooth(Picture, Picture6, CV_GAUSSIAN, 9, 9, 6);
cvSmooth(Picture6, Picture6, CV_GAUSSIAN, 0, 0, 9, 1);
cvNamedWindow("Square", CV_WINDOW_AUTOSIZE);
cvShowImage("Square", Picture1);
cvWaitKey(0);
cvDestroyWindow("Square");
cvNamedWindow("Square", CV_WINDOW_AUTOSIZE);
cvShowImage("Square", Picture4);
cvWaitKey(0);
cvDestroyWindow("Square");
cvNamedWindow("Square", CV_WINDOW_AUTOSIZE);
cvShowImage("Square", Picture6);
cvWaitKey(0);
cvDestroyWindow("Square");
getchar();
}