-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5.7.cpp
More file actions
37 lines (26 loc) · 830 Bytes
/
5.7.cpp
File metadata and controls
37 lines (26 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
32
33
34
35
36
37
// Part5.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
#include <cxcore.h>
#include <cv.h>
#include <_highgui.h>
int main()
{
CvConnectedComp mask;
for (int i = 0; i < mop->width; i++)
{
for (int j = 0; j < mop->height; j++)
{
CvScalar Pixel = cvGet2D(mop, j, i);
if (Pixel.val[0] == 255)
{
cvFloodFill(mop, cvPoint(j, i), cvScalarAll(100), cvScalarAll(10), cvScalarAll(10), &mask, CV_FLOODFILL_FIXED_RANGE + 8, 0);
}
}
}
//##################################################################################
// упражнение 5.7
IplImage* dst = cvCreateImage(cvGetSize(src1), IPL_DEPTH_8U, 3);
cvCopy(src1, dst, mop);
getchar();
}