-
Notifications
You must be signed in to change notification settings - Fork 3
/
final.h
67 lines (50 loc) · 2.23 KB
/
final.h
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
62
63
64
65
66
67
//
// final.h
// xcodefinal
//
// Created by Nora Alosily on 4/7/17.
// Copyright © 2017 NoraAlosily. All rights reserved.
//
#ifndef final_h
#define final_h
#include<iostream>
#include <opencv2/opencv.hpp>
#define YUVBINS 96 /* total bins for the three channels */
#define YUVsinglechannel 32 /*a single channel size YUVBINS/3 */
#define Ystart 0 /* index of Y channel at the globle histogram (out of 96 bins)*/
#define Ustart 32 /* index of U channel at the globle histogram (out of 96 bins) */
#define Vstart 64 /* index of V channel at the globle histogram (out of 96 bins) */
#define BLOCKBINS 384 /* total bins for the three channels */
#define BLOCKSIZE 8 /*a single channel size YUVBINS/3 */
#define GRIDCOUNT 4 /* index of Y channel at the globle histogram (out of 96 bins)*/
#define blockchannelsize 128 /* index of U channel at the globle histogram (out of 96 bins) */
#define YUVBINS 96 /* total bins for the three channels */
#define YUVsinglechannel 32 /*a single channel size YUVBINS/3 */
#define Ystart 0 /* index of Y channel at the globle histogram (out of 96 bins)*/
#define Ustart 32 /* index of U channel at the globle histogram (out of 96 bins) */
#define Vstart 64 /* index of V channel at the globle histogram (out of 96 bins) */
#define BLOCKSBINS 384 /* total bins for the three channels */
#define SingleBlockBins 8 /*a single channel size YUVBINS/3 */
#define BlocksCount 4 /* size of each division */
#define blockchannelsize 128 /* index of U channel at the globle histogram (out of 96 bins) */
//lag =5
#define L 10
#define LR 9
using namespace cv;
using namespace std;
extern ostringstream err;
void help();
int* readAnnotation();
void writeAnnotation(int annotaiton[], int set);
void processVideo(string filename);
void classifyAbrubt (VideoCapture vid);
void segment(VideoCapture);
void classifyGradual(VideoCapture vid);
Mat globalHistogram(Mat src);
Mat blockHistogram(Mat src);
void saveNew(Mat m, string filename, string annotaion);
void showframe(Mat& frame, int);
void open(string filename, string annotation, Mat& mat);
void calcYUVHistogram(Mat src);
void calcRGBHistogram2(Mat src);
#endif /* final_h */