2020-08-31 08:08:50 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
#include "resource.h"
|
2021-07-31 03:12:53 +00:00
|
|
|
|
#include <opencv2\opencv.hpp>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <thread>
|
|
|
|
|
#include <functional>
|
2020-08-31 08:08:50 +00:00
|
|
|
|
|
|
|
|
|
//cvision<6F>Ի<EFBFBD><D4BB><EFBFBD>
|
|
|
|
|
|
|
|
|
|
class CVISON : public CDialog
|
|
|
|
|
{
|
|
|
|
|
DECLARE_DYNAMIC(CVISON)
|
|
|
|
|
public:
|
|
|
|
|
CVISON(CWnd* pParent = NULL); // <20><><EFBFBD><D7BC><EFBFBD>캯<EFBFBD><ECBAAF>
|
|
|
|
|
virtual ~CVISON();
|
|
|
|
|
|
|
|
|
|
// <20>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
enum { IDD = IDD_VISION_DIALOG };
|
2021-07-31 03:12:53 +00:00
|
|
|
|
void DrawPicture(CString path);
|
|
|
|
|
void SetCallBack(std::function<void(bool stoped, int num)> onstop);
|
2020-08-31 08:08:50 +00:00
|
|
|
|
protected:
|
|
|
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧<><D6A7>
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
|
2021-07-31 03:12:53 +00:00
|
|
|
|
virtual BOOL OnInitDialog();
|
|
|
|
|
void MatToCImage(cv::Mat& mat, CImage& cimage);
|
|
|
|
|
public:
|
|
|
|
|
afx_msg void OnBnClickedBtnPrepage();
|
|
|
|
|
afx_msg void OnBnClickedBtnNext();
|
|
|
|
|
void SetEnableShow(bool show);
|
|
|
|
|
private:
|
|
|
|
|
void showfun();
|
|
|
|
|
private:
|
|
|
|
|
std::vector<CString> m_path;
|
|
|
|
|
volatile int imageindex = 0;
|
|
|
|
|
volatile int aquiredimgindx = 0;
|
|
|
|
|
volatile bool m_auireable;
|
|
|
|
|
volatile bool m_run;
|
|
|
|
|
std::thread m_updateimgshow;
|
|
|
|
|
void* parent;
|
|
|
|
|
std::function<void(bool stoped,int num)> m_onStop;
|
2020-08-31 08:08:50 +00:00
|
|
|
|
};
|