2013-05-14 23:36:16 +02:00
|
|
|
|
// opencv_classes.cpp: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DLL.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
#define IMAT_EXPORTS 1
|
|
|
|
|
#include "opencv_classes.h"
|
2013-05-15 17:55:06 +02:00
|
|
|
|
|
2013-05-14 23:36:16 +02:00
|
|
|
|
#include "TMat.h"
|
|
|
|
|
#include "imat.h"
|
2013-05-15 17:55:06 +02:00
|
|
|
|
//#include "opencv2\core\mat.hpp"
|
|
|
|
|
|
|
|
|
|
#include "Thighgui.h"
|
|
|
|
|
#include "Ihighgui.h"
|
|
|
|
|
|
2013-05-14 23:36:16 +02:00
|
|
|
|
|
2013-05-15 17:55:06 +02:00
|
|
|
|
// mat.hpp
|
2013-05-14 23:36:16 +02:00
|
|
|
|
HRESULT IMAT_API CreateMat(LPMat *_Mat)
|
|
|
|
|
{
|
|
|
|
|
*_Mat = new TMat();
|
|
|
|
|
if (*_Mat)
|
|
|
|
|
{
|
|
|
|
|
(*_Mat)->AddRef();
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HRESULT IMAT_API CreateMat_rct(int rows, int cols, int type, LPMat *_Mat)
|
|
|
|
|
{
|
|
|
|
|
*_Mat = new TMat(rows,cols,type);
|
|
|
|
|
if (*_Mat)
|
|
|
|
|
{
|
|
|
|
|
(*_Mat)->AddRef();
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
|
}
|
2013-05-15 17:55:06 +02:00
|
|
|
|
|
|
|
|
|
// highgui.hpp
|
|
|
|
|
|
|
|
|
|
HRESULT IMAT_API CreateVideoCapture(LPVideoCapture *_VideoCapture)
|
|
|
|
|
{
|
|
|
|
|
*_VideoCapture = new TVideoCapture();
|
|
|
|
|
if (*_VideoCapture)
|
|
|
|
|
{
|
|
|
|
|
(*_VideoCapture)->AddRef();
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HRESULT IMAT_API CreateVideoCapture_dvc(int device, LPVideoCapture *_VideoCapture)
|
|
|
|
|
{
|
|
|
|
|
*_VideoCapture = new TVideoCapture(device);
|
|
|
|
|
if (*_VideoCapture)
|
|
|
|
|
{
|
|
|
|
|
(*_VideoCapture)->AddRef();
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
|
}
|