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
| #pragma once
| #include <list>
| #include <iostream>
| #include <math.h>
| #include<Windows.h>
|
| #include <string>
| #include "ImgUtil.h"
| using namespace std;
| struct FrameInfo
| {
| HWND frame;
| RECT position;
|
| };
| class CaptureUtil
| {
| private:
| static std::list<FrameInfo> tempFrames;
| static HWND frames[8];
| static BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam);
| static HWND getHWND(int index);
|
| public:
| //³õʼ»¯
| static void init(std::string winName);
|
| //½ØÍ¼
| static cv::Mat capture(int index);
|
|
| static cv::Mat capture(HWND frame);
|
| };
|
|