#pragma once
|
#include "ImgUtil.h"
|
#include "RecognitionManager.h"
|
#include <map>
|
#include "OpenCLExcuter.h"
|
#include "CaptureUtil.h"
|
#define THS_FRAME_COUNT 1
|
|
typedef void (*CallbackFun)(int index, string code, list<TradeData> dataList, void* contex);
|
|
class ScreenDataCapture
|
{
|
private:
|
static OpenCLExcuter* openCLExcuter[THS_FRAME_COUNT];
|
static bool inited;
|
//ÊÇ·ñÕýÔÚÖ´ÐÐ
|
static bool running;
|
static bool runnings[THS_FRAME_COUNT];
|
static clock_t latest_running_times[THS_FRAME_COUNT];
|
|
static string gpCodes[THS_FRAME_COUNT];
|
|
static CallbackFun data_callback;
|
|
static void* context;
|
|
static void _run(int index);
|
|
|
|
public:
|
ScreenDataCapture();
|
|
//³õʼ»¯
|
void init(CallbackFun callback, void* context);
|
|
void refreshHWND();
|
|
bool isRunning();
|
|
//¿ªÊ¼
|
void start(int index);
|
//½áÊø
|
void stop(int index);
|
//È«²¿¿ªÊ¼
|
void start();
|
//È«²¿½áÊø
|
void stop();
|
//È«²¿¿ªÊ¼
|
void startAll();
|
//È«²¿½áÊø
|
void stopAll();
|
|
bool isInited();
|
|
//²¶»ñlevel2µÄÅÌ¿ÚÊý¾Ý
|
static list<TradeData> captureLevel2TradeData(HWND hwnd,int index) throw(int);
|
static list<TradeData> captureLevel2TradeData(cv::Mat oimg,int identify);
|
//ÉèÖôúÂë
|
static void setGPCode(int index, string code);
|
//»ñÈ¡´úÂë
|
static string getGPCode(int index);
|
|
};
|