Delphi-OpenCV/opencv_classes/opencv_classes.cpp
Laex 51d00889d3 Add sample:
[*] samples/LibTest/CvLatentSvmDetector/latentsvmdetect.dpr

Initiated translation of the C++ part OpenCV library using wrapper in the form of interfaces
An example of technology - see
* Opencv_classes\opencv_classes.sln (VC2010)
* Include\opencv_classes\opencv_classes.pas
* Samples\Classes\Mat\Mat.dpr

Submitted comments and suggestions

Signed-off-by: Laex <laex@bk.ru>
2013-05-15 01:36:16 +04:00

34 lines
636 B
C++

// opencv_classes.cpp: îïðåäåëÿåò ýêñïîðòèðîâàííûå ôóíêöèè äëÿ ïðèëîæåíèÿ DLL.
//
#include "stdafx.h"
#define IMAT_EXPORTS 1
#include "opencv_classes.h"
#include "TMat.h"
#include "imat.h"
#include "opencv2\core\mat.hpp"
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;
}