Delphi-OpenCV/source/ocv.features2d.pas
Laentir Valetov b26d8af92f Fixed #32
Signed-off-by: Laentir Valetov <laex@bk.ru>
2015-01-23 15:50:01 +03:00

49 lines
1.2 KiB
ObjectPascal

unit ocv.features2d;
interface
Uses
WinApi.Windows;
// nonfree
Type
TSURF = class
// ------------------------------------------------
class function Create: TSURF; overload;
class function Create(hessianThreshold: double; nOctaves: Integer = 4; nOctaveLayers: Integer = 2; extended: BOOL = true;
upright: BOOL = false): TSURF; overload;
procedure Free; reintroduce;
end;
TSurfFeatureDetector = TSURF;
TSurfDescriptorExtractor = TSURF;
implementation
uses
ocv.lib;
function CreateSURF: TSURF; stdcall; external opencv_classes_lib;
function CreateSURFFromValue(hessianThreshold: double; nOctaves: Integer = 4; nOctaveLayers: Integer = 2; extended: BOOL = true;
upright: BOOL = false): TSURF; stdcall; external opencv_classes_lib;
procedure ReleaseSURF(ex: TSURF); stdcall; external opencv_classes_lib;
{ TSURF }
class function TSURF.Create: TSURF;
begin
Result := CreateSURF;
end;
class function TSURF.Create(hessianThreshold: double; nOctaves, nOctaveLayers: Integer; extended, upright: BOOL): TSURF;
begin
Result := CreateSURFFromValue(hessianThreshold, nOctaves, nOctaveLayers, extended, upright);
end;
procedure TSURF.Free;
begin
ReleaseSURF(Self);
end;
end.