root / trunk / CCV2.0 / src / CCVCommon.h @ 119
View | Annotate | Download (1.7 KB)
| 1 | /////////////////////////////////////////////////////////////////////////////
|
|---|---|
| 2 | // Name: src/CCVMainFrame.cpp
|
| 3 | // Purpose: Provide the global things.
|
| 4 | // Author: Jimbo Zhang
|
| 5 | // Copyright: (c) 2011 NUI Group
|
| 6 | /////////////////////////////////////////////////////////////////////////////
|
| 7 | |
| 8 | #ifndef _CCV_COMMON_H
|
| 9 | #define _CCV_COMMON_H
|
| 10 | |
| 11 | #ifdef WIN32
|
| 12 | #include "wx/msw/setup.h" |
| 13 | #include "msw/wx/msw/rcdefs.h" |
| 14 | #pragma comment(lib,"ws2_32.lib") |
| 15 | #pragma comment(lib,"comctl32.lib") |
| 16 | // #include "../msvc/vld.h" // for detecting memory leak
|
| 17 | #endif // WIN32 |
| 18 | |
| 19 | #include <vector> |
| 20 | #include <string> |
| 21 | #include <iostream> |
| 22 | #include <fstream> |
| 23 | #include <wx/log.h> |
| 24 | |
| 25 | enum CCV_ERROR_ID
|
| 26 | {
|
| 27 | CCV_SUCCESS, |
| 28 | CCV_ERROR_LOCKED, |
| 29 | CCV_ERROR_ITEM_CANNOT_ADDED, |
| 30 | CCV_ERROR_ITEM_NOT_EXISTS, |
| 31 | CCV_ERROR_FILE_CANNOT_FOUND, |
| 32 | CCV_ERROR_BUSY, |
| 33 | CCV_ERROR_UNSUPPORTED |
| 34 | }; |
| 35 | |
| 36 | enum SourceType
|
| 37 | {
|
| 38 | CAMERA, |
| 39 | VIDEO |
| 40 | }; |
| 41 | |
| 42 | typedef std::vector<std::string> Strings;
|
| 43 | |
| 44 | struct CCVGlobalParam
|
| 45 | {
|
| 46 | std::string videoFileName; |
| 47 | wxLog *logger; |
| 48 | |
| 49 | int initThreshold;
|
| 50 | int initMinBlob;
|
| 51 | int initMaxBlob;
|
| 52 | int initHighpassBlur;
|
| 53 | int initHighpasSize;
|
| 54 | int initAmplify;
|
| 55 | int initSmooth;
|
| 56 | |
| 57 | SourceType input_source; |
| 58 | |
| 59 | bool backgroundsub_enabled;
|
| 60 | bool amplify_enabled;
|
| 61 | bool highpass_enabled;
|
| 62 | bool smooth_enabled;
|
| 63 | |
| 64 | |
| 65 | CCVGlobalParam() |
| 66 | {
|
| 67 | logger = NULL;
|
| 68 | initThreshold = 0;
|
| 69 | initMinBlob = 0;
|
| 70 | initMaxBlob = 0;
|
| 71 | initHighpassBlur = 0;
|
| 72 | initHighpasSize = 0;
|
| 73 | initAmplify = 0;
|
| 74 | initSmooth = 0;
|
| 75 | backgroundsub_enabled = false;
|
| 76 | amplify_enabled = false;
|
| 77 | highpass_enabled = false;
|
| 78 | smooth_enabled = false;
|
| 79 | input_source = VIDEO; |
| 80 | } |
| 81 | }; |
| 82 | |
| 83 | #endif // _CCV_COMMON_H |
