-
Notifications
You must be signed in to change notification settings - Fork 0
/
omni.cpp
executable file
·63 lines (49 loc) · 1.2 KB
/
omni.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <math.h>
#include <iostream>
using namespace std;
using namespace cv;
void pictureConvert(IplImage* src);
int main() {
VideoCapture capture;
Mat frame, showImg;
IplImage * src;
int number = 0;
//pictureConvert(src);
//capture.open("rtmp://192.168.77.100/live/insta360");
//if (!capture.isOpened())
//{
// cout << "ÉãÏñÍ·´ò¿ªÊ§°Ü£¡" << endl;
// return 0;
//}
src = cvLoadImage("C:/Users/12207/Documents/Visual Studio 2015/Projects/omnifpga/omnifpga/fart.jpg", 0);
//namedWindow("Camera");
//namedWindow("Camera", CV_WINDOW_NORMAL);
char* data = (char *)src->imageData;
capture >> frame;
//imshow("Camera", frame);
//imwrite("fart1.jpg", img);
/*while (1) {
number++;
capture >> frame;
//imshow("Camera", frame);
//imwrite("fart.jpg",frame);
src = &IplImage(frame);
//cout << src->imageSize << endl;
//pictureConvert(src);
//qDebug("i have a picture");
/*try {
imshow("Camera", frame);
}
catch (Exception e) {
//qDebug("yes");
//qDebug(e.err.c_str());
}*/
//cvResizeWindow("Camera", 200, 200);
//waitKey(1);
//}
String outname = "fart1.jpg";
cvSaveImage(outname.c_str(), src);
return 0;
}