huago-corrcet_tools/HuaGoCorrect/CVISON.h

43 lines
1008 B
C
Raw Permalink Normal View History

2020-08-31 08:08:50 +00:00
#pragma once
#include "resource.h"
#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 };
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()
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
};