-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKonus.cpp
More file actions
46 lines (38 loc) · 1.15 KB
/
Konus.cpp
File metadata and controls
46 lines (38 loc) · 1.15 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
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
using namespace std;
#include "konus_lib.h"
#include "components_new.h"
//#include "math.h"
//double g_to_b = 9, g_to_r = 14.5, r_to_b = 15;
int main ()
{
IplImage *image, *image1;
image1 = cvCreateImage(cvSize(640, 480),IPL_DEPTH_8U,3);//ñîçäàíèå èçîáðàæåíèÿ
CvCapture *capture;//çàõâàò èçîáðàæåíèÿ ñ êàìåðû(ñîçäàíèå êàíàëà, ïî êîòîðîìó ìû áóäåì ÷èòàòü èçîáðàæåíèÿ)
capture = cvCreateCameraCapture(2);
int count_of_components = 3;
int tail,head;
char c = 0;
cvNamedWindow("name");
image = cvQueryFrame(capture);
cvSetMouseCallback("name", MyMouse, (void*)image);
while(c != 27)
{
image = cvQueryFrame(capture);
cvCopyImage(image, image1);
int k = 3;
poisk(k, image, image1);
great(image1, count_of_components, 3, tail, head);
//math_processing(image);
//cout << U.transpose()<< endl;
cvShowImage("name", image);
cvShowImage("result", image1);
c = cvWaitKey(1);
}
return 0;
}