-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5.4b.cpp
More file actions
31 lines (22 loc) · 830 Bytes
/
5.4b.cpp
File metadata and controls
31 lines (22 loc) · 830 Bytes
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
// Part5.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
#include <cxcore.h>
#include <cv.h>
#include <_highgui.h>
int main()
{
//##################################################################################
// упражнение 5.4
IplImage* src1 = cvLoadImage("../Part3/picture/88.png");
IplImage* diff12 = cvCreateImage(cvGetSize(src1), IPL_DEPTH_8U, 3);
//// упражнение 5.4.б
IplImage* cleandiff = cvCreateImage(cvGetSize(src1), IPL_DEPTH_8U, 3);
cvErode(diff12, cleandiff);
cvDilate(diff12, diff12);
cvNamedWindow("Square", CV_WINDOW_AUTOSIZE);
cvShowImage("Square", diff12);
cvWaitKey(0);
cvDestroyWindow("Square");
getchar();
}