-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.2.cpp
More file actions
33 lines (23 loc) · 789 Bytes
/
3.2.cpp
File metadata and controls
33 lines (23 loc) · 789 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
// Part2.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
#include <cxcore.h>
#include <_highgui.h>
int main()
{
// упражнение 3.2.a
int rows = 100;
int cols = 100;
int size = rows * cols;
float* data = new float[size];
for (int i = 0; i < size; i++)
data[i] = 0.0;
CvMat* Picture = new CvMat();
Picture[0] = cvMat(rows, cols, CV_8UC1, data);
// упражнение 3.2.б
cvCircle(Picture, cvPoint(50,50), 10, cvScalar(255, 255, 255), 1);
cvNamedWindow("Circle", CV_WINDOW_AUTOSIZE);
cvShowImage("Circle", Picture);
cvWaitKey(0);
cvDestroyWindow("Circle");
}