mirror of
https://github.com/Laex/Delphi-OpenCV.git
synced 2024-11-16 08:15:52 +01:00
2fbe14e387
Signed-off-by: Laex <laex@bk.ru>
36 lines
1.0 KiB
ObjectPascal
36 lines
1.0 KiB
ObjectPascal
unit Mat;
|
|
|
|
interface
|
|
|
|
Uses WinApi.Windows;
|
|
|
|
Type
|
|
IMat = interface
|
|
['{9C458D5C-F577-4A2D-89A0-FC426B80CC56}']
|
|
// ! returns element type, similar to CV_MAT_TYPE(cvmat->type)
|
|
function _type: Integer; stdcall;
|
|
// ! returns element type, similar to CV_MAT_DEPTH(cvmat->type)
|
|
function depth: Integer; stdcall;
|
|
// ! returns element type, similar to CV_MAT_CN(cvmat->type)
|
|
function channels: Integer; stdcall;
|
|
// ! returns true if matrix data is NULL
|
|
function empty: bool; stdcall;
|
|
// -----------------------------------
|
|
function getMat(): Pointer; stdcall;
|
|
end;
|
|
|
|
// ! default constructor
|
|
function CreateMat: IMat; overload; safecall;
|
|
// ! constructs 2D matrix of the specified size and type
|
|
// (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.)
|
|
function CreateMat(rows, cols, _type: Integer): IMat; overload; safecall;
|
|
|
|
implementation
|
|
|
|
Uses uLibName;
|
|
|
|
function CreateMat: IMat; external OpenCV_Classes_DLL index 1;
|
|
function CreateMat(rows, cols, _type: Integer): IMat; external OpenCV_Classes_DLL index 2;
|
|
|
|
end.
|