mirror of
https://github.com/Laex/Delphi-OpenCV.git
synced 2024-11-15 07:45:53 +01:00
Merge branch 'master' of github.com:Laex/Delphi-OpenCV
Signed-off-by: Laentir Valetov <laex@bk.ru>
This commit is contained in:
commit
5d9f45efa6
2
.gitignore
vendored
2
.gitignore
vendored
@ -39,7 +39,9 @@ lib
|
||||
*.vlb
|
||||
*.sdf
|
||||
eng.*
|
||||
*.z
|
||||
/3rdParty/!leptonica
|
||||
/3rdParty/!tesseract
|
||||
/3rdParty/!tesseract_classes
|
||||
/component/ModelSupport_OpenCV/*.txaPackage
|
||||
/component/ModelSupport_OpenCV
|
||||
|
@ -1,10 +1,9 @@
|
||||
###Delphi-OpenCV
|
||||
----------
|
||||
* OpenCV version - 2.4.9<br>
|
||||
* Development environment - Delphi XE2-XE6<br>
|
||||
|
||||
Requires installed [Visual C++ redistributable for Visual Studio 2012][2]<br>
|
||||
----------
|
||||
Requires installed [Visual C++ redistributable for Visual Studio 2013][2]<br>
|
||||
|
||||
#####Contributors:
|
||||
```
|
||||
Laentir Valetov (email: laex@bk.ru)
|
||||
@ -73,10 +72,10 @@ To install the components, open and install
|
||||
<PROJECT_ROOT>\include\component\OpenCV.dpk
|
||||
```
|
||||
When installing the components in your PATH variable must be available should the library "opencv_*.dll".
|
||||
Must also be installed visual C + + redistributable for Visual Studio 2012 is available on the [link][2]<br>
|
||||
Must also be installed visual C + + redistributable for Visual Studio 2013 is available on the [link][2]<br>
|
||||
Examples of the use of components - open:
|
||||
```
|
||||
<PROJECT_ROOT>\samples\Components\cCameraCapture\cCameraCapture.dproj
|
||||
```
|
||||
[1]: https://github.com/Laex/Delphi-OpenCV/archive/master.zip
|
||||
[2]: http://www.microsoft.com/en-US/download/details.aspx?id=30679
|
||||
[2]: http://www.microsoft.com/ru-US/download/details.aspx?id=40784
|
||||
|
@ -24,7 +24,6 @@
|
||||
package OpenCV;
|
||||
|
||||
{$R *.res}
|
||||
//{$R *.dres}
|
||||
{$R *.dcr}
|
||||
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
|
||||
{$ALIGN 8}
|
||||
|
@ -109,26 +109,15 @@
|
||||
<None Include="ModelSupport_OpenCV\default.txvpck"/>
|
||||
<None Include="ModelSupport_OpenCV\uOCVSource\default.txvpck"/>
|
||||
<None Include="ModelSupport_OpenCV\uOCVSource\default.txaPackage"/>
|
||||
<RcItem Include="..\bin\facedetectxml\haarcascade_frontalface_alt.xml">
|
||||
<ContainerId>ResourceItem</ContainerId>
|
||||
<ResourceType>RCDATA</ResourceType>
|
||||
<ResourceId>HCFFA</ResourceId>
|
||||
</RcItem>
|
||||
<RcItem Include="..\bin\facedetectxml\haarcascade_frontalface_alt_tree.xml">
|
||||
<ContainerId>ResourceItem</ContainerId>
|
||||
<ResourceType>RCDATA</ResourceType>
|
||||
<ResourceId>HCFFAT</ResourceId>
|
||||
</RcItem>
|
||||
<RcItem Include="..\bin\facedetectxml\haarcascade_frontalface_alt2.xml">
|
||||
<ContainerId>ResourceItem</ContainerId>
|
||||
<ResourceType>RCDATA</ResourceType>
|
||||
<ResourceId>HCFFA2</ResourceId>
|
||||
</RcItem>
|
||||
<RcItem Include="..\bin\facedetectxml\haarcascade_frontalface_default.xml">
|
||||
<ContainerId>ResourceItem</ContainerId>
|
||||
<ResourceType>RCDATA</ResourceType>
|
||||
<ResourceId>HCFFD</ResourceId>
|
||||
</RcItem>
|
||||
<RcCompile Include="..\bin\facedetectxml\haarcascade.rc">
|
||||
<Form>haarcascade.res</Form>
|
||||
</RcCompile>
|
||||
<None Include="ModelSupport_OpenCV\uOCVImageOperation\default.txvpck"/>
|
||||
<None Include="ModelSupport_OpenCV\uOCVTypes\default.txvpck"/>
|
||||
<None Include="ModelSupport_OpenCV\uOCVView\default.txvpck"/>
|
||||
<None Include="ModelSupport_OpenCV\uOCVIOProperties\default.txvpck"/>
|
||||
<None Include="ModelSupport_OpenCV\uOCVRegister\default.txvpck"/>
|
||||
<None Include="ModelSupport_OpenCV\uOCVImageOperation\default.txaPackage"/>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
@ -1,4 +0,0 @@
|
||||
HCFFA RCDATA "..\\bin\\facedetectxml\\haarcascade_frontalface_alt.xml"
|
||||
HCFFAT RCDATA "..\\bin\\facedetectxml\\haarcascade_frontalface_alt_tree.xml"
|
||||
HCFFA2 RCDATA "..\\bin\\facedetectxml\\haarcascade_frontalface_alt2.xml"
|
||||
HCFFD RCDATA "..\\bin\\facedetectxml\\haarcascade_frontalface_default.xml"
|
BIN
component/haarcascade.res
Normal file
BIN
component/haarcascade.res
Normal file
Binary file not shown.
@ -1,36 +1,41 @@
|
||||
Delphi-OpenCV Components
|
||||
Visual and non-visual components for working with the library OpenCV
|
||||
------------------------
|
||||
|
||||
Visual and non-visual components for working with the library OpenCV.
|
||||
Version: OpenCV 2.4.9
|
||||
Package: OpenCV.dpk
|
||||
|
||||
Requires installed [Visual C++ redistributable for Visual Studio 2013][1]<br>
|
||||
|
||||
Components:
|
||||
|
||||
TocvView
|
||||
--------
|
||||
Showcases the work of a visual component to display video camera images
|
||||
|
||||
TocvCamera
|
||||
TocvCamera, TocvFileSource, TocvIPCamSource
|
||||
----------
|
||||
|
||||
Showcases the work of non-visual component connection to the camera and image transmission receivers TOpenCVCamera
|
||||
Showcases the work of non-visual component connection to the video source
|
||||
|
||||
TocvImageOperation
|
||||
------------------
|
||||
Component that handles images
|
||||
|
||||
> TocvNoneOperation, TocvGrayScaleOperation, TovcCannyOperation,
|
||||
> TovcSmoothOperation, TovcErodeOperation, TovcDilateOperation,
|
||||
> TocvLaplaceOperation, TovcSobelOperation, TocvThresholdOperation,
|
||||
> TocvAdaptiveThresholdOperation, TocvContoursOperation,
|
||||
> TocvRotateOperation, TocvAbsDiff, TocvHaarCascade,
|
||||
> TocvMatchTemplate, TocvMotionDetect
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add to system variable PATH path to DLL libraries OpenCV.
|
||||
Also may need to specify a path to msvcp120d.dll, msvcp120.dll, msvcr100d.dll, msvcr100.dll ([link][1])
|
||||
(if they are not in the same directory).
|
||||
2. To install, open <PROJECT_ROOT>\component\OpenCV.dpk. Install package.
|
||||
3. In the panel component will be part OpenCV.
|
||||
4. Open the sample
|
||||
> <PROJECT_ROOT>\Samples\Components\cCameraCapture\cCameraCapture.dpr
|
||||
> <PROJECT_ROOT>\samples\Components\cCameraCapture\cCameraCapture.dproj
|
||||
> <PROJECT_ROOT>\samples\Components\cMatchTemplate\cMatchTemplate.dproj
|
||||
|
||||
Run the sample.
|
||||
*TODO:*
|
||||
*Wanted beautiful icons for the components.*
|
||||
[1]: http://www.microsoft.com/en-US/download/details.aspx?id=30679
|
||||
|
||||
[1]: http://www.microsoft.com/ru-US/download/details.aspx?id=40784
|
@ -32,6 +32,7 @@ Uses
|
||||
uOCVImageOperation;
|
||||
|
||||
Type
|
||||
/// Èñïîëüçóåòñÿ â TocvImageOperation
|
||||
TImageOperationProperty = class(TComponentProperty)
|
||||
private
|
||||
FInstance: TPersistent;
|
||||
@ -47,6 +48,7 @@ Type
|
||||
property Instance: TPersistent read GetInstance;
|
||||
end;
|
||||
|
||||
/// Èñïîëüçóåòñÿ â TocvImageOperationCollectionItem
|
||||
TImageOperationCollectionItemProperty = class(TClassProperty)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
@ -55,12 +57,16 @@ Type
|
||||
procedure SetValue(const Value: string); override;
|
||||
end;
|
||||
|
||||
TImagePreprocessingProperty = class(TImageOperationCollectionItemProperty)
|
||||
/// Èñïîëüçóåòñÿ â TocvContourOperation äëÿ Preprocessing
|
||||
TImageContourPrepProperty = class(TImageOperationCollectionItemProperty)
|
||||
public
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
end;
|
||||
|
||||
/// Èñïîëüçóåòñÿ â TocvMotionDetectOperation äëÿ Threshold
|
||||
TImageMotionDetectThresholdProperty = class(TImageOperationCollectionItemProperty)
|
||||
public
|
||||
// function GetAttributes: TPropertyAttributes; override;
|
||||
// function GetValue: string; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
// procedure SetValue(const Value: string); override;
|
||||
end;
|
||||
|
||||
TocvIOPropertyChangeEvent = procedure(Sender: TObject; const PropName: string) of object;
|
||||
@ -136,43 +142,15 @@ begin
|
||||
Modified;
|
||||
end;
|
||||
|
||||
{TImagePreprocessingProperty}
|
||||
{TImageContourPrepProperty}
|
||||
|
||||
//function TImagePreprocessingProperty.GetAttributes: TPropertyAttributes;
|
||||
//begin
|
||||
// Result := inherited GetAttributes;
|
||||
// Result := Result - [paReadOnly] + [paValueList, paSortList, paRevertable, paSubProperties];
|
||||
//end;
|
||||
|
||||
//function TImagePreprocessingProperty.GetValue: string;
|
||||
//begin
|
||||
// Result := GetRegisteredImageOperations.GetNameByClass(TocvImageOperation(GetOrdValue).ClassType);
|
||||
//end;
|
||||
|
||||
procedure TImagePreprocessingProperty.GetValues(Proc: TGetStrProc);
|
||||
procedure TImageContourPrepProperty.GetValues(Proc: TGetStrProc);
|
||||
begin
|
||||
Proc('None');
|
||||
Proc('Threshold');
|
||||
Proc('AdaptiveThreshold');
|
||||
end;
|
||||
|
||||
//procedure TImagePreprocessingProperty.SetValue(const Value: string);
|
||||
//Var
|
||||
// APropertiesClass: TocvImageOperationClass;
|
||||
// I: Integer;
|
||||
// AIntf: IocvEditorPropertiesContainer;
|
||||
//begin
|
||||
// APropertiesClass := GetRegisteredImageOperations.FindByName(Value);
|
||||
// if APropertiesClass = nil then
|
||||
// APropertiesClass := TocvImageOperationClass(GetRegisteredImageOperations.Objects[0]);
|
||||
//
|
||||
// for I := 0 to PropCount - 1 do
|
||||
// if Supports(GetComponent(I), IocvEditorPropertiesContainer, AIntf) then
|
||||
// AIntf.SetPropertiesClass(APropertiesClass);
|
||||
//
|
||||
// Modified;
|
||||
//end;
|
||||
|
||||
{TocvCustomImageOperationProperty}
|
||||
|
||||
procedure TocvCustomImageOperationProperty.BeginUpdate;
|
||||
@ -265,16 +243,7 @@ begin
|
||||
begin
|
||||
TocvCustomImageOperation(LInstance).Name := LPersistentPropertyName;
|
||||
end;
|
||||
end
|
||||
// else
|
||||
// if LInstance is TocvImageOperationCollectionItem then
|
||||
// begin
|
||||
// if (TocvImageOperationCollectionItem(LInstance).DisplayName = '') and (TocvImageOperationCollectionItem(LInstance).DisplayName <> LPersistentPropertyName)
|
||||
// then
|
||||
// begin
|
||||
// TocvImageOperationCollectionItem(LInstance).DisplayName := LPersistentPropertyName;
|
||||
// end;
|
||||
// end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{TImageOperationCollectionItemProperty}
|
||||
@ -317,16 +286,25 @@ begin
|
||||
Modified;
|
||||
end;
|
||||
|
||||
{TImageMotionDetectThresholdProperty}
|
||||
|
||||
procedure TImageMotionDetectThresholdProperty.GetValues(Proc: TGetStrProc);
|
||||
begin
|
||||
Proc('Threshold');
|
||||
Proc('AdaptiveThreshold');
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
RegisterPropertyEditor(TypeInfo(TocvCustomImageOperation), TocvImageOperation, 'Operation', TImageOperationProperty);
|
||||
RegisterPropertyEditor(TypeInfo(TocvCustomImageOperation), TocvImageOperationCollectionItem, 'Operation',TImageOperationCollectionItemProperty);
|
||||
//RegisterPropertyEditor(TypeInfo(TocvCustomImageOperation), TocvImageOperationCollectionItem, 'Operation',TImageOperationProperty);
|
||||
RegisterPropertyEditor(TypeInfo(TocvCustomImageOperation), TocvContoursOperation, 'Preprocessing', TImagePreprocessingProperty);
|
||||
RegisterPropertyEditor(TypeInfo(TocvCustomImageOperation), TocvImageOperationCollectionItem, 'Operation', TImageOperationCollectionItemProperty);
|
||||
RegisterPropertyEditor(TypeInfo(TocvCustomImageOperation), TocvContoursOperation, 'Preprocessing', TImageContourPrepProperty);
|
||||
RegisterPropertyEditor(TypeInfo(TocvCustomImageOperation), TocvMotionDetect, 'Threshold', TImageMotionDetectThresholdProperty);
|
||||
|
||||
UnlistPublishedProperty(TocvCustomImageOperation, 'Name');
|
||||
UnlistPublishedProperty(TocvImageOperation, 'OperationClassName');
|
||||
UnlistPublishedProperty(TocvImageOperationCollectionItem, 'OperationClassName');
|
||||
UnlistPublishedProperty(TocvContoursOperation, 'OperationClassName');
|
||||
UnlistPublishedProperty(TocvMotionDetect, 'OperationClassName');
|
||||
|
||||
end.
|
||||
|
@ -76,6 +76,44 @@ type
|
||||
|
||||
TocvImageOperationClass = class of TocvCustomImageOperation;
|
||||
|
||||
IocvEditorPropertiesContainer = interface
|
||||
['{418F88DD-E35D-4425-BF24-E753E83D35D6}']
|
||||
function GetProperties: TocvCustomImageOperation;
|
||||
function GetPropertiesClass: TocvImageOperationClass;
|
||||
procedure SetPropertiesClass(Value: TocvImageOperationClass);
|
||||
end;
|
||||
|
||||
TocvCustomImageOperationWithNestedOperation = class(TocvCustomImageOperation, IocvEditorPropertiesContainer)
|
||||
private
|
||||
FOperation: TocvCustomImageOperation;
|
||||
FOperationClass: TocvImageOperationClass;
|
||||
CS: TCriticalSection;
|
||||
protected
|
||||
function LockTransform: Boolean;
|
||||
procedure UnlockTransform;
|
||||
// ---------------------------------------------
|
||||
procedure CreateProperties;
|
||||
procedure DestroyProperties;
|
||||
procedure RecreateProperties;
|
||||
// ---------------------------------------------
|
||||
function GetPropertiesClassName: string;
|
||||
procedure SetPropertiesClassName(const Value: string);
|
||||
|
||||
function GetProperties: TocvCustomImageOperation;
|
||||
procedure SetProperties(const Value: TocvCustomImageOperation);
|
||||
|
||||
function GetPropertiesClass: TocvImageOperationClass; virtual;
|
||||
procedure SetPropertiesClass(Value: TocvImageOperationClass);
|
||||
|
||||
property Operation: TocvCustomImageOperation read GetProperties write SetProperties;
|
||||
public
|
||||
constructor Create(AOwner: TPersistent); override;
|
||||
destructor Destroy; override;
|
||||
property OperationClass: TocvImageOperationClass read GetPropertiesClass write SetPropertiesClass;
|
||||
published
|
||||
property OperationClassName: string read GetPropertiesClassName write SetPropertiesClassName;
|
||||
end;
|
||||
|
||||
TocvNoneOperation = class(TocvCustomImageOperation)
|
||||
public
|
||||
function DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean; override;
|
||||
@ -295,28 +333,65 @@ type
|
||||
property OnMathTemplateRect: TOnOcvRect read FOnMathTemplateRect write FOnMathTemplateRect;
|
||||
end;
|
||||
|
||||
TocvFaceDraw = class(TocvDraw)
|
||||
TocvMotionDetectCalcRectType = (mdBoundingRect, mdMinAreaRect);
|
||||
|
||||
TocvContourApproximationMethods = (CHAIN_CODE, CHAIN_APPROX_NONE, CHAIN_APPROX_SIMPLE, CHAIN_APPROX_TC89_L1,
|
||||
CHAIN_APPROX_TC89_KCOS, LINK_RUNS);
|
||||
|
||||
TocvDrawMotionRect = class(TocvDraw)
|
||||
published
|
||||
property Color;
|
||||
end;
|
||||
|
||||
TocvMotionDetect = class(TocvCustomImageOperationWithNestedOperation)
|
||||
protected
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
function GetPropertiesClass: TocvImageOperationClass; override;
|
||||
private
|
||||
FCalcRectType: TocvMotionDetectCalcRectType;
|
||||
FPrevFrame: IocvImage;
|
||||
FSmoothOperation: TocvSmoothOperations;
|
||||
FDrawMotionRect: TocvDrawMotionRect;
|
||||
FOnMotion: TOnOcvRects;
|
||||
public
|
||||
constructor Create(AOwner: TPersistent); override;
|
||||
destructor Destroy; override;
|
||||
function DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean; override;
|
||||
published
|
||||
property RemoveSmallObject: Boolean index 0 Read GetBoolParam write SetBoolParam;
|
||||
property MinObjectSize: Integer index 0 Read GetIntParam write SetIntParam;
|
||||
property CalcRectType: TocvMotionDetectCalcRectType read FCalcRectType write FCalcRectType default mdBoundingRect;
|
||||
property Smooth: TocvSmoothOperations read FSmoothOperation write FSmoothOperation default BLUR;
|
||||
property Threshold: TocvCustomImageOperation read GetProperties write SetProperties;
|
||||
property DrawMotionRect: TocvDrawMotionRect read FDrawMotionRect Write FDrawMotionRect;
|
||||
property OnMotion: TOnOcvRects read FOnMotion write FOnMotion;
|
||||
property NotifyOnlyWhenFound: Boolean index 1 Read GetBoolParam write SetBoolParam;
|
||||
end;
|
||||
|
||||
TocvHaarCascadeDraw = class(TocvDraw)
|
||||
published
|
||||
property Color;
|
||||
property Shift;
|
||||
end;
|
||||
|
||||
TocvHaarFrontalFace = (HCFFA, HCFFA2, HCFFD, HCFFAT);
|
||||
TocvHaarCascadeType = (hcFrontalFaceAlt, hcFrontalFaceAlt2, hcFrontalFaceDefaut, hcFrontalFaceAltTree, hcEye,
|
||||
hcEyeTreeEyeGlasses, hcFullBody, hcLeftEye2Splits, hcLowerBody, hcMcsEyePairBig, hcMcsEyePair, hcMcsLeftEar, hcMcsLeftEye,
|
||||
hcMcsMouth, hcMcsNose, hcMcsRightEar, hcMcsRightEye, hcMcsUpperBody, hcProfileFace, hcRightEye2Splits, hcSmile, hcUpperBody);
|
||||
|
||||
TocvHaarCascadeFlag = (HAAR_DO_CANNY_PRUNING, HAAR_SCALE_IMAGE, HAAR_FIND_BIGGEST_OBJECT, HAAR_DO_ROUGH_SEARCH);
|
||||
TocvHaarCascadeFlagSet = set of TocvHaarCascadeFlag;
|
||||
|
||||
TocvFaceDetect = class(TocvCustomImageOperation)
|
||||
TocvHaarCascade = class(TocvCustomImageOperation)
|
||||
private
|
||||
FFrontalFace: TocvHaarFrontalFace;
|
||||
FHaarCascade: TocvHaarCascadeType;
|
||||
FLockFrontalFaceChange: TCriticalSection;
|
||||
FCascade: pCvHaarClassifierCascade;
|
||||
FMinSize: TocvPoint;
|
||||
FMaxSize: TocvPoint;
|
||||
FDrawFace: TocvFaceDraw;
|
||||
FDrawHaarCascade: TocvHaarCascadeDraw;
|
||||
FCascadeFlags: TocvHaarCascadeFlagSet;
|
||||
FOnFace: TOnOcvFaces;
|
||||
procedure SetFrontalFace(const Value: TocvHaarFrontalFace);
|
||||
FOnHaarCascade: TOnOcvHaarCascade;
|
||||
procedure SetHaarCascade(const Value: TocvHaarCascadeType);
|
||||
procedure ReleaseCascade;
|
||||
function GetHaarCascadeFlag: Integer;
|
||||
protected
|
||||
@ -326,22 +401,16 @@ type
|
||||
destructor Destroy; override;
|
||||
function DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean; override;
|
||||
published
|
||||
property FrontalFace: TocvHaarFrontalFace read FFrontalFace write SetFrontalFace default HCFFA;
|
||||
property HaarCascade: TocvHaarCascadeType read FHaarCascade write SetHaarCascade default hcFrontalFaceAlt;
|
||||
property Equalize: Boolean index 1 Read GetBoolParam write SetBoolParam;
|
||||
property Scale: Double index 0 Read GetFloatParam write SetFloatParam; // 1.3
|
||||
property MinNeighbors: Integer index 0 Read GetIntParam write SetIntParam; // 3
|
||||
property MinSize: TocvPoint read FMinSize write FMinSize; // CV_DEFAULT(cvSize(0,0))
|
||||
property MaxSize: TocvPoint read FMaxSize write FMaxSize; // {CV_DEFAULT(cvSize(0,0))}
|
||||
property DrawFace: TocvFaceDraw read FDrawFace write FDrawFace;
|
||||
property DrawHaarCascade: TocvHaarCascadeDraw read FDrawHaarCascade write FDrawHaarCascade;
|
||||
property CascadeFlags: TocvHaarCascadeFlagSet read FCascadeFlags write FCascadeFlags default [];
|
||||
property OnFaces: TOnOcvFaces read FOnFace write FOnFace;
|
||||
end;
|
||||
|
||||
IocvEditorPropertiesContainer = interface
|
||||
['{418F88DD-E35D-4425-BF24-E753E83D35D6}']
|
||||
function GetProperties: TocvCustomImageOperation;
|
||||
function GetPropertiesClass: TocvImageOperationClass;
|
||||
procedure SetPropertiesClass(Value: TocvImageOperationClass);
|
||||
property OnHaarCascade: TOnOcvHaarCascade read FOnHaarCascade write FOnHaarCascade;
|
||||
property NotifyOnlyWhenFound: Boolean index 2 Read GetBoolParam write SetBoolParam;
|
||||
end;
|
||||
|
||||
TocvContourDraw = class(TocvDraw)
|
||||
@ -360,9 +429,6 @@ type
|
||||
|
||||
TocvContourRetrievalModes = (RETR_EXTERNAL, RETR_LIST, RETR_CCOMP, RETR_TREE, RETR_FLOODFILL);
|
||||
|
||||
TocvContourApproximationMethods = (CHAIN_CODE, CHAIN_APPROX_NONE, CHAIN_APPROX_SIMPLE, CHAIN_APPROX_TC89_L1,
|
||||
CHAIN_APPROX_TC89_KCOS, LINK_RUNS);
|
||||
|
||||
TocvContourApprox = class(TPersistent)
|
||||
protected
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
@ -380,11 +446,8 @@ type
|
||||
property Recursive: Boolean read FRecursive write FRecursive default True;
|
||||
end;
|
||||
|
||||
TocvContoursOperation = class(TocvCustomImageOperation, IocvEditorPropertiesContainer)
|
||||
TocvContoursOperation = class(TocvCustomImageOperationWithNestedOperation)
|
||||
private
|
||||
CS: TCriticalSection;
|
||||
FOperation: TocvCustomImageOperation;
|
||||
FOperationClass: TocvImageOperationClass;
|
||||
FRetrievalMode: TocvContourRetrievalModes;
|
||||
FApproximationMethod: TocvContourApproximationMethods;
|
||||
FOffset: TocvPoint;
|
||||
@ -392,31 +455,14 @@ type
|
||||
FApprox: TocvContourApprox;
|
||||
FOnContour: TOnOcvContour;
|
||||
FContours: pCvSeq;
|
||||
function LockTransform: Boolean;
|
||||
procedure UnlockTransform;
|
||||
procedure CreateProperties;
|
||||
procedure DestroyProperties;
|
||||
procedure RecreateProperties;
|
||||
function GetPropertiesClassName: string;
|
||||
procedure SetProperties(const Value: TocvCustomImageOperation);
|
||||
procedure SetPropertiesClass(Value: TocvImageOperationClass);
|
||||
procedure SetPropertiesClassName(const Value: string);
|
||||
procedure DoNotifyContours(const Image: IocvImage; const ContourCount: Integer; const Contours: pCvSeq);
|
||||
protected
|
||||
function GetProperties: TocvCustomImageOperation;
|
||||
function GetPropertiesClass: TocvImageOperationClass;
|
||||
{IInterface}
|
||||
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
|
||||
function _AddRef: Integer; stdcall;
|
||||
function _Release: Integer; stdcall;
|
||||
public
|
||||
constructor Create(AOwner: TPersistent); override;
|
||||
destructor Destroy; override;
|
||||
function DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean; override;
|
||||
property OperationClass: TocvImageOperationClass read GetPropertiesClass write SetPropertiesClass;
|
||||
property Contours: pCvSeq read FContours;
|
||||
published
|
||||
property OperationClassName: string read GetPropertiesClassName write SetPropertiesClassName;
|
||||
property Preprocessing: TocvCustomImageOperation read GetProperties write SetProperties;
|
||||
property RetrievalMode: TocvContourRetrievalModes read FRetrievalMode write FRetrievalMode default RETR_LIST;
|
||||
property ApproximationMethod: TocvContourApproximationMethods read FApproximationMethod write FApproximationMethod
|
||||
@ -514,16 +560,51 @@ function GetRegisteredImageOperations: TRegisteredImageOperations;
|
||||
|
||||
implementation
|
||||
|
||||
{$R opencv.dres}
|
||||
///
|
||||
// Run utils\CompressHaar\uCompressHaar.dpr
|
||||
// Add to serarch path \Delphi-OpenCV\bin\facedetectxml\
|
||||
///
|
||||
{$R haarcascade.rc haarcascade.res}
|
||||
{$R haarcascade.res}
|
||||
|
||||
Uses
|
||||
core_c,
|
||||
imgproc_c,
|
||||
imgproc.types_c, cvUtils;
|
||||
imgproc.types_c, cvUtils, System.ZLib;
|
||||
|
||||
type
|
||||
TPersistentAccessProtected = class(TPersistent);
|
||||
|
||||
TocvHaarCascadeRecord = record
|
||||
Name: String;
|
||||
FileName: String;
|
||||
end;
|
||||
|
||||
const
|
||||
FrontalFaceXML: array [TocvHaarCascadeType] of TocvHaarCascadeRecord =
|
||||
{} ((Name: 'HCFFA'; FileName: 'haarcascade_frontalface_alt.xml'),
|
||||
{} (Name: 'HCFFA2'; FileName: 'haarcascade_frontalface_alt2.xml'),
|
||||
{} (Name: 'HCFFD'; FileName: 'haarcascade_frontalface_default.xml'),
|
||||
{} (Name: 'HCFFAT'; FileName: 'haarcascade_frontalface_alt_tree.xml'),
|
||||
{} (Name: 'EYE'; FileName: 'haarcascade_eye.xml'),
|
||||
{} (Name: 'ETEG'; FileName: 'haarcascade_eye_tree_eyeglasses.xml'),
|
||||
{} (Name: 'EFB'; FileName: 'haarcascade_fullbody.xml'),
|
||||
{} (Name: 'LE2S'; FileName: 'haarcascade_lefteye_2splits.xml'),
|
||||
{} (Name: 'LB'; FileName: 'haarcascade_lowerbody.xml'),
|
||||
{} (Name: 'MEB'; FileName: 'haarcascade_mcs_eyepair_big.xml'),
|
||||
{} (Name: 'MEP'; FileName: 'haarcascade_mcs_eyepair_small.xml'),
|
||||
{} (Name: 'MLEEAR'; FileName: 'haarcascade_mcs_leftear.xml'),
|
||||
{} (Name: 'MLEEYE'; FileName: 'haarcascade_mcs_lefteye.xml'),
|
||||
{} (Name: 'MM'; FileName: 'haarcascade_mcs_mouth.xml'),
|
||||
{} (Name: 'MN'; FileName: 'haarcascade_mcs_nose.xml'),
|
||||
{} (Name: 'MREAR'; FileName: 'haarcascade_mcs_rightear.xml'),
|
||||
{} (Name: 'MREYE'; FileName: 'haarcascade_mcs_righteye.xml'),
|
||||
{} (Name: 'MUB'; FileName: 'haarcascade_mcs_upperbody.xml'),
|
||||
{} (Name: 'PF'; FileName: 'haarcascade_profileface.xml'),
|
||||
{} (Name: 'RE2S'; FileName: 'haarcascade_righteye_2splits.xml'),
|
||||
{} (Name: 'SM'; FileName: 'haarcascade_smile.xml'),
|
||||
{} (Name: 'UB'; FileName: 'haarcascade_upperbody.xml'));
|
||||
|
||||
Var
|
||||
_RegisteredImageOperations: TRegisteredImageOperations = nil;
|
||||
|
||||
@ -651,11 +732,11 @@ begin
|
||||
if OperationsEnabled and (FOperations.Count > 0) then
|
||||
begin
|
||||
for i := 0 to FOperations.Count - 1 do
|
||||
if not(FOperations.Items[i] as TocvImageOperationCollectionItem).Transform(Destanation, Destanation) then
|
||||
if not(FOperations.Items[i] as TocvImageOperationCollectionItem).Transform(Destanation.Clone, Destanation) then
|
||||
Exit;
|
||||
end
|
||||
else if Assigned(FOperation) then
|
||||
FOperation.Transform(IplImage, Destanation);
|
||||
FOperation.Transform(IplImage.Clone, Destanation);
|
||||
|
||||
NotifyReceiver(Destanation);
|
||||
finally
|
||||
@ -1219,7 +1300,7 @@ end;
|
||||
|
||||
function TocvThresholdOperation.DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean;
|
||||
begin
|
||||
Destanation := TocvImage.Create(cvCreateImage(cvGetSize(Source.IpImage), IPL_DEPTH_8U, 1));
|
||||
Destanation := Source.GrayImage.Same;
|
||||
cvThreshold(Source.GrayImage.IpImage, Destanation.IpImage, Threshold, MaxValue, cThreshold[ThresholdType]);
|
||||
Result := True;
|
||||
end;
|
||||
@ -1261,7 +1342,6 @@ end;
|
||||
constructor TocvContoursOperation.Create {(AOwner: TComponent)};
|
||||
begin
|
||||
inherited;
|
||||
CS := TCriticalSection.Create;
|
||||
FOffset := TocvPoint.Create;
|
||||
FContourDraw := TocvContourDraw.Create(Self);
|
||||
FApprox := TocvContourApprox.Create(Self);
|
||||
@ -1277,84 +1357,14 @@ begin
|
||||
MinArea := 100;
|
||||
end;
|
||||
|
||||
procedure TocvContoursOperation.CreateProperties;
|
||||
begin
|
||||
if FOperationClass <> nil then
|
||||
FOperation := FOperationClass.Create(nil);
|
||||
end;
|
||||
|
||||
destructor TocvContoursOperation.Destroy;
|
||||
begin
|
||||
if Assigned(FOperation) then
|
||||
FOperation.Free;
|
||||
CS.Free;
|
||||
FOffset.Free;
|
||||
FContourDraw.Free;
|
||||
FApprox.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TocvContoursOperation.DestroyProperties;
|
||||
begin
|
||||
FreeAndNil(FOperation);
|
||||
end;
|
||||
|
||||
function TocvContoursOperation.GetProperties: TocvCustomImageOperation;
|
||||
begin
|
||||
if not Assigned(FOperation) then
|
||||
FOperation := TocvNoneOperation.Create(nil);
|
||||
Result := FOperation;
|
||||
end;
|
||||
|
||||
function TocvContoursOperation.GetPropertiesClass: TocvImageOperationClass;
|
||||
begin
|
||||
Result := TocvImageOperationClass(Preprocessing.ClassType);
|
||||
end;
|
||||
|
||||
function TocvContoursOperation.GetPropertiesClassName: string;
|
||||
begin
|
||||
Result := Preprocessing.ClassName;
|
||||
end;
|
||||
|
||||
function TocvContoursOperation.LockTransform: Boolean;
|
||||
begin
|
||||
Result := CS.TryEnter;
|
||||
end;
|
||||
|
||||
function TocvContoursOperation.QueryInterface(const IID: TGUID; out Obj): HResult;
|
||||
begin
|
||||
if GetInterface(IID, Obj) then
|
||||
Result := 0
|
||||
else
|
||||
Result := E_NOINTERFACE;
|
||||
end;
|
||||
|
||||
procedure TocvContoursOperation.RecreateProperties;
|
||||
begin
|
||||
DestroyProperties;
|
||||
CreateProperties;
|
||||
end;
|
||||
|
||||
procedure TocvContoursOperation.SetProperties(const Value: TocvCustomImageOperation);
|
||||
begin
|
||||
if (FOperation <> nil) and (Value <> nil) then
|
||||
FOperation.Assign(Value);
|
||||
end;
|
||||
|
||||
procedure TocvContoursOperation.SetPropertiesClass(Value: TocvImageOperationClass);
|
||||
begin
|
||||
if FOperationClass <> Value then
|
||||
begin
|
||||
FOperationClass := Value;
|
||||
RecreateProperties;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TocvContoursOperation.SetPropertiesClassName(const Value: string);
|
||||
begin
|
||||
OperationClass := TocvImageOperationClass(GetRegisteredImageOperations.FindByClassName(Value));
|
||||
end;
|
||||
|
||||
function TocvContoursOperation.DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean;
|
||||
Var
|
||||
th_image: IocvImage;
|
||||
@ -1412,21 +1422,6 @@ begin
|
||||
OnContour(Self, Image, ContourCount, Contours);
|
||||
end;
|
||||
|
||||
procedure TocvContoursOperation.UnlockTransform;
|
||||
begin
|
||||
CS.Leave;
|
||||
end;
|
||||
|
||||
function TocvContoursOperation._AddRef: Integer;
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TocvContoursOperation._Release: Integer;
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
{TocvRotateOperation}
|
||||
|
||||
procedure TocvRotateOperation.AssignTo(Dest: TPersistent);
|
||||
@ -1584,30 +1579,31 @@ end;
|
||||
|
||||
{TocvFaceDetect}
|
||||
|
||||
constructor TocvFaceDetect.Create(AOwner: TPersistent);
|
||||
constructor TocvHaarCascade.Create(AOwner: TPersistent);
|
||||
begin
|
||||
inherited;
|
||||
FLockFrontalFaceChange := TCriticalSection.Create;
|
||||
FMinSize := TocvPoint.Create(30, 30);
|
||||
FMaxSize := TocvPoint.Create;
|
||||
FrontalFace := HCFFA;
|
||||
FDrawFace := TocvFaceDraw.Create(Self);
|
||||
HaarCascade := hcFrontalFaceAlt;
|
||||
FDrawHaarCascade := TocvHaarCascadeDraw.Create(Self);
|
||||
Scale := 1.3;
|
||||
MinNeighbors := 3;
|
||||
Equalize := True;
|
||||
NotifyOnlyWhenFound := False;
|
||||
end;
|
||||
|
||||
destructor TocvFaceDetect.Destroy;
|
||||
destructor TocvHaarCascade.Destroy;
|
||||
begin
|
||||
FLockFrontalFaceChange.Free;
|
||||
FMinSize.Free;
|
||||
FMaxSize.Free;
|
||||
FDrawFace.Free;
|
||||
FDrawHaarCascade.Free;
|
||||
ReleaseCascade;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TocvFaceDetect.DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean;
|
||||
function TocvHaarCascade.DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean;
|
||||
Var
|
||||
storage: pCvMemStorage;
|
||||
gray: IocvImage;
|
||||
@ -1615,7 +1611,7 @@ Var
|
||||
i: Integer;
|
||||
cvr: pCvRect;
|
||||
r, g, b: byte;
|
||||
Faces: TocvFaces;
|
||||
Faces: TocvRects;
|
||||
begin
|
||||
Destanation := Source;
|
||||
if Assigned(FCascade) then
|
||||
@ -1631,7 +1627,7 @@ begin
|
||||
if Assigned(detected_objects) then
|
||||
begin
|
||||
|
||||
if Assigned(OnFaces) then
|
||||
if Assigned(OnHaarCascade) and ((not NotifyOnlyWhenFound) or (detected_objects^.total > 0)) then
|
||||
begin
|
||||
SetLength(Faces, detected_objects^.total);
|
||||
i := 0;
|
||||
@ -1641,18 +1637,18 @@ begin
|
||||
Faces[i] := ocvRect(cvr^.X, cvr^.Y, (cvr^.X) + (cvr^.width), (cvr^.Y) + (cvr^.height));
|
||||
Inc(i);
|
||||
end;
|
||||
OnFaces(Self, Destanation, Faces);
|
||||
OnHaarCascade(Self, Destanation, Faces);
|
||||
end;
|
||||
|
||||
if DrawFace.Enabled then
|
||||
if DrawHaarCascade.Enabled then
|
||||
begin
|
||||
GetRGBValue(DrawFace.Color, r, g, b);
|
||||
GetRGBValue(DrawHaarCascade.Color, r, g, b);
|
||||
i := 0;
|
||||
While i < detected_objects^.total do
|
||||
begin
|
||||
cvr := pCvRect(cvGetSeqElem(detected_objects, i));
|
||||
cvRectangle(Destanation.IpImage, cvPoint(cvr^.X, cvr^.Y), cvPoint((cvr^.X) + (cvr^.width), (cvr^.Y) + (cvr^.height)),
|
||||
CV_RGB(r, g, b), DrawFace.Thickness, cLineType[DrawFace.LineType], DrawFace.Shift);
|
||||
CV_RGB(r, g, b), DrawHaarCascade.Thickness, cLineType[DrawHaarCascade.LineType], DrawHaarCascade.Shift);
|
||||
Inc(i);
|
||||
end;
|
||||
end;
|
||||
@ -1666,7 +1662,7 @@ begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TocvFaceDetect.GetHaarCascadeFlag: Integer;
|
||||
function TocvHaarCascade.GetHaarCascadeFlag: Integer;
|
||||
Var
|
||||
i: TocvHaarCascadeFlag;
|
||||
j: Integer;
|
||||
@ -1681,26 +1677,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TocvFaceDetect.ReleaseCascade;
|
||||
procedure TocvHaarCascade.ReleaseCascade;
|
||||
begin
|
||||
if Assigned(FCascade) then
|
||||
cvReleaseHaarClassifierCascade(FCascade);
|
||||
FCascade := nil;
|
||||
end;
|
||||
|
||||
procedure TocvFaceDetect.SetFrontalFace(const Value: TocvHaarFrontalFace);
|
||||
Type
|
||||
TFrontalFaceData = record
|
||||
Name: String;
|
||||
FileName: String;
|
||||
end;
|
||||
|
||||
const
|
||||
FrontalFaceXML: array [TocvHaarFrontalFace] of TFrontalFaceData =
|
||||
{} ((Name: 'HCFFA'; FileName: 'haarcascade_frontalface_alt.xml'),
|
||||
{} (Name: 'HCFFA2'; FileName: 'haarcascade_frontalface_alt2.xml'),
|
||||
{} (Name: 'HCFFD'; FileName: 'haarcascade_frontalface_default.xml'),
|
||||
{} (Name: 'HCFFAT'; FileName: 'haarcascade_frontalface_alt_tree.xml'));
|
||||
procedure TocvHaarCascade.SetHaarCascade(const Value: TocvHaarCascadeType);
|
||||
|
||||
function TempPath: string;
|
||||
var
|
||||
@ -1714,28 +1698,34 @@ const
|
||||
|
||||
Var
|
||||
FullFileName: String;
|
||||
|
||||
RS: TResourceStream;
|
||||
DC: TZDecompressionStream;
|
||||
FS: TFileStream;
|
||||
begin
|
||||
FLockFrontalFaceChange.Enter;
|
||||
try
|
||||
if FFrontalFace <> Value then
|
||||
if FHaarCascade <> Value then
|
||||
begin
|
||||
FFrontalFace := Value;
|
||||
FHaarCascade := Value;
|
||||
ReleaseCascade;
|
||||
end;
|
||||
if not(csDesigning in ComponentState) then
|
||||
begin
|
||||
if not Assigned(FCascade) then
|
||||
try
|
||||
FullFileName := TempPath + FrontalFaceXML[FFrontalFace].FileName;
|
||||
FullFileName := TempPath + FrontalFaceXML[FHaarCascade].FileName;
|
||||
if not FileExists(FullFileName) then
|
||||
begin
|
||||
with TResourceStream.Create(hInstance, FrontalFaceXML[FFrontalFace].Name, RT_RCDATA) do
|
||||
try
|
||||
SaveToFile(FullFileName);
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
RS := TResourceStream.Create(hInstance, FrontalFaceXML[FHaarCascade].Name, RT_RCDATA);
|
||||
DC := TZDecompressionStream.Create(RS);
|
||||
FS := TFileStream.Create(FullFileName, fmCreate);
|
||||
try
|
||||
FS.CopyFrom(DC, DC.Size);
|
||||
finally
|
||||
DC.Free;
|
||||
FS.Free;
|
||||
RS.Free;
|
||||
end;
|
||||
end;
|
||||
if FileExists(FullFileName) then
|
||||
FCascade := cvLoad(c_str(FullFileName), nil, nil, nil);
|
||||
@ -1866,6 +1856,224 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{TocvMotionDetect}
|
||||
|
||||
procedure TocvMotionDetect.AssignTo(Dest: TPersistent);
|
||||
begin
|
||||
inherited;
|
||||
if Dest is TocvMotionDetect then
|
||||
begin
|
||||
FCalcRectType := (Dest as TocvMotionDetect).FCalcRectType;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TocvMotionDetect.Create(AOwner: TPersistent);
|
||||
begin
|
||||
inherited;
|
||||
RemoveSmallObject := True;
|
||||
MinObjectSize := 100;
|
||||
FSmoothOperation := BLUR;
|
||||
FDrawMotionRect := TocvDrawMotionRect.Create(Self);
|
||||
OperationClass := TocvThresholdOperation;
|
||||
With (Operation as TocvThresholdOperation) do
|
||||
begin
|
||||
Threshold := 25;
|
||||
MaxValue := 255;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TocvMotionDetect.Destroy;
|
||||
begin
|
||||
FDrawMotionRect.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TocvMotionDetect.DoTransform(const Source: IocvImage; var Destanation: IocvImage): Boolean;
|
||||
Var
|
||||
CurrentGrayImage: IocvImage;
|
||||
DifferenceImage: IocvImage;
|
||||
storage: pCvMemStorage;
|
||||
Contours: pCvSeq;
|
||||
area: Double;
|
||||
ThresholdImage: IocvImage;
|
||||
black, white: TCvScalar;
|
||||
c: pCvSeq;
|
||||
Rects: TocvRects;
|
||||
Rect: TCvRect;
|
||||
Rect2d: TCvBox2D;
|
||||
i: Integer;
|
||||
r, g, b: byte;
|
||||
begin
|
||||
Destanation := Source;
|
||||
CurrentGrayImage := Source.GrayImage;
|
||||
|
||||
if not Assigned(FPrevFrame) then
|
||||
FPrevFrame := CurrentGrayImage;
|
||||
|
||||
DifferenceImage := CurrentGrayImage.Same;
|
||||
cvAbsDiff(FPrevFrame.IpImage, CurrentGrayImage.IpImage, DifferenceImage.IpImage);
|
||||
cvSmooth(DifferenceImage.IpImage, DifferenceImage.IpImage, Integer(Smooth));
|
||||
|
||||
if Threshold.DoTransform(DifferenceImage, ThresholdImage) then
|
||||
begin
|
||||
// img_out := DifferenceImage.Clone;
|
||||
storage := cvCreateMemStorage(0);
|
||||
Contours := AllocMem(SizeOf(TCvSeq));
|
||||
try
|
||||
cvFindContours(ThresholdImage.IpImage, storage, @Contours, SizeOf(TCvContour), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE, cvPoint(0, 0));
|
||||
|
||||
black := CV_RGB(0, 0, 0);
|
||||
white := CV_RGB(255, 255, 255);
|
||||
|
||||
while (Contours <> nil) do
|
||||
begin
|
||||
area := cvContourArea(Contours, CV_WHOLE_SEQ);
|
||||
if (abs(area) <= MinObjectSize) and RemoveSmallObject then // Åñëè ïëîùàäü ìåíüøå ïîðîãà, òî óäàëÿåì
|
||||
cvDrawContours(ThresholdImage.IpImage, Contours, black, black, -1, CV_FILLED, 8, cvPoint(0, 0))
|
||||
else
|
||||
cvDrawContours(ThresholdImage.IpImage, Contours, white, white, -1, CV_FILLED, 8, cvPoint(0, 0));
|
||||
|
||||
Contours := Contours.h_next; // Ïåðåõîäèì ê ñëåäóþùåìó êîíòóðó
|
||||
end;
|
||||
|
||||
cvClearMemStorage(storage);
|
||||
SetLength(Rects, 0);
|
||||
|
||||
cvFindContours(ThresholdImage.IpImage, storage, @Contours, SizeOf(TCvContour), CV_RETR_LIST, CV_CHAIN_APPROX_NONE, cvPoint(0, 0));
|
||||
|
||||
if Assigned(Contours) then
|
||||
begin
|
||||
c := Contours;
|
||||
i := 0;
|
||||
while (c <> nil) do
|
||||
begin
|
||||
SetLength(Rects, i + 1);
|
||||
if CalcRectType = mdBoundingRect then
|
||||
begin
|
||||
Rect := cvBoundingRect(c, 0);
|
||||
Rects[i] := ocvRect(Rect.X, Rect.Y, Rect.X + Rect.width, Rect.Y + Rect.height);
|
||||
end
|
||||
else if CalcRectType = mdMinAreaRect then
|
||||
begin
|
||||
Rect2d := cvMinAreaRect2(c);
|
||||
Rects[i] := ocvRect(Round(Rect2d.center.X - Rect2d.Size.width / 2), Round(Rect2d.center.Y - Rect2d.Size.height / 2),
|
||||
Round(Rect2d.center.X + Rect2d.Size.width / 2), Round(Rect2d.center.Y + Rect2d.Size.height / 2));
|
||||
end;
|
||||
|
||||
if DrawMotionRect.Enabled then
|
||||
begin
|
||||
GetRGBValue(DrawMotionRect.Color, r, g, b);
|
||||
cvRectangle(Destanation.IpImage, cvPoint(Rects[i].Left, Rects[i].Top), cvPoint(Rects[i].Right, Rects[i].Bottom),
|
||||
CV_RGB(r, g, b), DrawMotionRect.Thickness, cLineType[DrawMotionRect.LineType], DrawMotionRect.Shift);
|
||||
end;
|
||||
Inc(i);
|
||||
c := c.h_next;
|
||||
end;
|
||||
end;
|
||||
|
||||
if Assigned(OnMotion) and ((not NotifyOnlyWhenFound) or (Length(Rects) > 0)) then
|
||||
OnMotion(Self, Destanation, Rects);
|
||||
|
||||
finally
|
||||
cvReleaseMemStorage(storage);
|
||||
end;
|
||||
end;
|
||||
|
||||
FPrevFrame := CurrentGrayImage;
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TocvMotionDetect.GetPropertiesClass: TocvImageOperationClass;
|
||||
begin
|
||||
if not Assigned(FOperation) then
|
||||
Result := TocvThresholdOperation
|
||||
else
|
||||
Result := inherited;
|
||||
end;
|
||||
|
||||
{TocvCustomImageOperationWithNestedOperation}
|
||||
|
||||
constructor TocvCustomImageOperationWithNestedOperation.Create(AOwner: TPersistent);
|
||||
begin
|
||||
inherited;
|
||||
CS := TCriticalSection.Create;
|
||||
end;
|
||||
|
||||
procedure TocvCustomImageOperationWithNestedOperation.CreateProperties;
|
||||
begin
|
||||
FOperation := FOperationClass.Create(Self);
|
||||
end;
|
||||
|
||||
function TocvCustomImageOperationWithNestedOperation.GetProperties: TocvCustomImageOperation;
|
||||
begin
|
||||
if not Assigned(FOperation) then
|
||||
FOperation := OperationClass.Create(Self);
|
||||
Result := FOperation;
|
||||
end;
|
||||
|
||||
function TocvCustomImageOperationWithNestedOperation.GetPropertiesClass: TocvImageOperationClass;
|
||||
begin
|
||||
if Assigned(FOperation) then
|
||||
Result := TocvImageOperationClass(FOperation.ClassType)
|
||||
else
|
||||
Result := TocvNoneOperation;
|
||||
end;
|
||||
|
||||
destructor TocvCustomImageOperationWithNestedOperation.Destroy;
|
||||
begin
|
||||
CS.Free;
|
||||
DestroyProperties;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TocvCustomImageOperationWithNestedOperation.DestroyProperties;
|
||||
begin
|
||||
if Assigned(FOperation) then
|
||||
FreeAndNil(FOperation);
|
||||
end;
|
||||
|
||||
function TocvCustomImageOperationWithNestedOperation.GetPropertiesClassName: string;
|
||||
begin
|
||||
Result := Operation.ClassName;
|
||||
end;
|
||||
|
||||
procedure TocvCustomImageOperationWithNestedOperation.RecreateProperties;
|
||||
begin
|
||||
DestroyProperties;
|
||||
CreateProperties;
|
||||
end;
|
||||
|
||||
procedure TocvCustomImageOperationWithNestedOperation.SetProperties(const Value: TocvCustomImageOperation);
|
||||
begin
|
||||
if (FOperation <> nil) and (Value <> nil) then
|
||||
FOperation.Assign(Value);
|
||||
end;
|
||||
|
||||
procedure TocvCustomImageOperationWithNestedOperation.SetPropertiesClass(Value: TocvImageOperationClass);
|
||||
begin
|
||||
if FOperationClass <> Value then
|
||||
begin
|
||||
FOperationClass := Value;
|
||||
RecreateProperties;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TocvCustomImageOperationWithNestedOperation.SetPropertiesClassName(const Value: string);
|
||||
begin
|
||||
OperationClass := TocvImageOperationClass(GetRegisteredImageOperations.FindByClassName(Value));
|
||||
end;
|
||||
|
||||
function TocvCustomImageOperationWithNestedOperation.LockTransform: Boolean;
|
||||
begin
|
||||
Result := CS.TryEnter;
|
||||
end;
|
||||
|
||||
procedure TocvCustomImageOperationWithNestedOperation.UnlockTransform;
|
||||
begin
|
||||
CS.Leave;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvNoneOperation, 'None');
|
||||
@ -1881,8 +2089,9 @@ GetRegisteredImageOperations.RegisterIOClass(TocvAdaptiveThresholdOperation, 'Ad
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvContoursOperation, 'Contours');
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvRotateOperation, 'Rotate');
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvAbsDiff, 'AbsDiff');
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvFaceDetect, 'FaceDetect');
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvHaarCascade, 'HaarCascade');
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvMatchTemplate, 'MatchTemplate');
|
||||
GetRegisteredImageOperations.RegisterIOClass(TocvMotionDetect, 'MotionDetect');
|
||||
|
||||
finalization
|
||||
|
||||
|
@ -40,7 +40,7 @@ begin
|
||||
RegisterComponents('OpenCV', [TocvImageOperation, TocvCameraSource, TocvView, TocvFileSource, TocvIPCamSource]);
|
||||
RegisterClasses([TocvNoneOperation, TocvGrayScaleOperation, TovcCannyOperation, TovcSmoothOperation, TovcErodeOperation,
|
||||
TovcDilateOperation, TocvLaplaceOperation, TovcSobelOperation, TocvThresholdOperation, TocvAdaptiveThresholdOperation,
|
||||
TocvContoursOperation, TocvRotateOperation, TocvAbsDiff, TocvFaceDetect, TocvMatchTemplate]);
|
||||
TocvContoursOperation, TocvRotateOperation, TocvAbsDiff, TocvHaarCascade, TocvMatchTemplate,TocvMotionDetect]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -114,8 +114,8 @@ type
|
||||
published
|
||||
property Enabled: Boolean Read GetEnabled write SetEnabled default False;
|
||||
property OnImage: TOnOcvNotify read FOnImage write FOnImage;
|
||||
property Width: Integer Read GetWidth;
|
||||
property Height: Integer Read GetHeight;
|
||||
property ImageWidth: Integer Read GetWidth;
|
||||
property ImageHeight: Integer Read GetHeight;
|
||||
end;
|
||||
|
||||
TocvResolution = (r160x120, r320x240, r424x240, r640x360, r800x448, r960x544, r1280x720);
|
||||
|
@ -29,7 +29,8 @@ Uses
|
||||
System.SysUtils,
|
||||
System.Classes,
|
||||
System.Generics.Collections,
|
||||
core.types_c, System.Types;
|
||||
core.types_c,
|
||||
System.Types;
|
||||
|
||||
Type
|
||||
IocvImage = interface
|
||||
@ -67,11 +68,11 @@ Type
|
||||
of object;
|
||||
|
||||
TocvRect = Type TRect;
|
||||
TocvFace = TocvRect;
|
||||
TocvFaces = TArray<TocvRect>;
|
||||
TocvRects = TArray<TocvRect>;
|
||||
|
||||
TOnOcvFaces = procedure(Sender: TObject; const IplImage: IocvImage; const Faces: TocvFaces) of object;
|
||||
TOnOcvHaarCascade = procedure(Sender: TObject; const IplImage: IocvImage; const HaarRects: TocvRects) of object;
|
||||
TOnOcvRect = procedure(Sender: TObject; const IplImage: IocvImage; const Rect: TocvRect) of object;
|
||||
TOnOcvRects = procedure(Sender: TObject; const IplImage: IocvImage; const Rects: TocvRects) of object;
|
||||
|
||||
IocvDataReceiver = interface
|
||||
['{F67DEC9E-CCE0-49D2-AB9B-AD7E1020C5DC}']
|
||||
@ -86,10 +87,14 @@ Type
|
||||
function GetName: string;
|
||||
function GetImage: IocvImage;
|
||||
function GetEnabled: Boolean;
|
||||
property Enabled:Boolean read GetEnabled;
|
||||
property Enabled: Boolean read GetEnabled;
|
||||
end;
|
||||
|
||||
TocvReceiverList = TThreadList<IocvDataReceiver>;
|
||||
TocvReceiverList = class(TThreadList) // <IocvDataReceiver>;
|
||||
public
|
||||
procedure Add(Item: IocvDataReceiver);
|
||||
procedure Remove(Item: IocvDataReceiver); inline;
|
||||
end;
|
||||
|
||||
TocvDataSource = class(TComponent, IocvDataSource)
|
||||
protected
|
||||
@ -185,13 +190,13 @@ end;
|
||||
|
||||
procedure TocvDataSource.NotifyReceiver(const IplImage: IocvImage);
|
||||
Var
|
||||
R: IocvDataReceiver;
|
||||
LockList: TList<IocvDataReceiver>;
|
||||
R: Pointer; //IocvDataReceiver;
|
||||
LockList: TList;//<IocvDataReceiver>;
|
||||
begin
|
||||
LockList := FOpenCVVideoReceivers.LockList;
|
||||
try
|
||||
for R in LockList do
|
||||
R.TakeImage(IplImage);
|
||||
IocvDataReceiver(R).TakeImage(IplImage);
|
||||
finally
|
||||
FOpenCVVideoReceivers.UnlockList;
|
||||
end;
|
||||
@ -317,4 +322,16 @@ begin
|
||||
Result := TocvImage.Create(cvCreateImage(cvGetSize(FImage), FImage^.depth, FImage^.nChannels));
|
||||
end;
|
||||
|
||||
{TocvReceiverList}
|
||||
|
||||
procedure TocvReceiverList.Add(Item: IocvDataReceiver);
|
||||
begin
|
||||
inherited Add(Pointer(Item));
|
||||
end;
|
||||
|
||||
procedure TocvReceiverList.Remove(Item: IocvDataReceiver);
|
||||
begin
|
||||
inherited Remove(Pointer(Item));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -4,8 +4,8 @@ object MainForm: TMainForm
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'OpenCV - Component demo'
|
||||
ClientHeight = 550
|
||||
ClientWidth = 616
|
||||
ClientHeight = 669
|
||||
ClientWidth = 624
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -19,14 +19,14 @@ object MainForm: TMainForm
|
||||
TextHeight = 13
|
||||
object lbl1: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Top = 338
|
||||
Width = 79
|
||||
Height = 13
|
||||
Caption = 'Image operation'
|
||||
end
|
||||
object cbb1: TComboBox
|
||||
Left = 93
|
||||
Top = 5
|
||||
Top = 335
|
||||
Width = 145
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
@ -45,8 +45,8 @@ object MainForm: TMainForm
|
||||
end
|
||||
object chk1: TCheckBox
|
||||
Left = 8
|
||||
Top = 29
|
||||
Width = 97
|
||||
Top = 5
|
||||
Width = 117
|
||||
Height = 17
|
||||
Caption = 'Camera enabled'
|
||||
Checked = True
|
||||
@ -56,35 +56,54 @@ object MainForm: TMainForm
|
||||
end
|
||||
object ocvw1: TocvView
|
||||
Left = 8
|
||||
Top = 52
|
||||
Width = 285
|
||||
Height = 229
|
||||
Top = 28
|
||||
Width = 300
|
||||
Height = 300
|
||||
VideoSource = ocvcmrsrc1
|
||||
end
|
||||
object ocvw2: TocvView
|
||||
Left = 8
|
||||
Top = 307
|
||||
Width = 285
|
||||
Height = 229
|
||||
Top = 358
|
||||
Width = 300
|
||||
Height = 300
|
||||
VideoSource = ocvmgprtn1
|
||||
end
|
||||
object ocvw3: TocvView
|
||||
Left = 316
|
||||
Top = 307
|
||||
Width = 285
|
||||
Height = 229
|
||||
Top = 358
|
||||
Width = 300
|
||||
Height = 300
|
||||
VideoSource = ocvflsrc1
|
||||
end
|
||||
object ocvw4: TocvView
|
||||
Left = 316
|
||||
Top = 52
|
||||
Width = 285
|
||||
Height = 229
|
||||
Top = 28
|
||||
Width = 300
|
||||
Height = 300
|
||||
VideoSource = ocvpcmsrc1
|
||||
end
|
||||
object chk2: TCheckBox
|
||||
Left = 314
|
||||
Top = 5
|
||||
Width = 129
|
||||
Height = 17
|
||||
Caption = 'IP Camera enabled'
|
||||
TabOrder = 6
|
||||
OnClick = chk2Click
|
||||
end
|
||||
object chk3: TCheckBox
|
||||
Left = 314
|
||||
Top = 338
|
||||
Width = 187
|
||||
Height = 17
|
||||
Caption = 'File source'
|
||||
TabOrder = 7
|
||||
OnClick = chk3Click
|
||||
end
|
||||
object ocvmgprtn1: TocvImageOperation
|
||||
VideoSource = ocvcmrsrc1
|
||||
OperationClassName = 'TocvFaceDetect'
|
||||
OperationClassName = 'TocvHaarCascade'
|
||||
Operation.HaarCascade = hcLeftEye2Splits
|
||||
Operation.Equalize = True
|
||||
Operation.Scale = 1.300000000000000000
|
||||
Operation.MinNeighbors = 3
|
||||
@ -92,10 +111,12 @@ object MainForm: TMainForm
|
||||
Operation.MinSize.Y = 30
|
||||
Operation.MaxSize.X = 0
|
||||
Operation.MaxSize.Y = 0
|
||||
Operation.DrawFace.Thickness = 1
|
||||
Operation.DrawFace.Offset.X = 0
|
||||
Operation.DrawFace.Offset.Y = 0
|
||||
Operation.CascadeFlags = [HAAR_DO_CANNY_PRUNING]
|
||||
Operation.DrawHaarCascade.Thickness = 3
|
||||
Operation.DrawHaarCascade.Offset.X = 0
|
||||
Operation.DrawHaarCascade.Offset.Y = 0
|
||||
Operation.DrawHaarCascade.Color = clRed
|
||||
Operation.CascadeFlags = [HAAR_DO_CANNY_PRUNING, HAAR_SCALE_IMAGE, HAAR_FIND_BIGGEST_OBJECT]
|
||||
Operation.NotifyOnlyWhenFound = False
|
||||
Operations = <
|
||||
item
|
||||
OperationClassName = 'TocvContoursOperation'
|
||||
@ -107,42 +128,40 @@ object MainForm: TMainForm
|
||||
Operation.Offset.Y = 0
|
||||
Operation.MinArea = 100
|
||||
Operation.ContourDraw.Enabled = False
|
||||
Operation.ContourDraw.MaxLevel = 0
|
||||
Operation.ContourDraw.Thickness = 1
|
||||
Operation.ContourDraw.LineType = LT_FILLED
|
||||
Operation.ContourDraw.Offset.X = 0
|
||||
Operation.ContourDraw.Offset.Y = 0
|
||||
Operation.ContourDraw.ExternalColor = clBlack
|
||||
Operation.ContourDraw.HoleColor = clBlack
|
||||
Operation.ContourDraw.MaxLevel = 0
|
||||
Operation.ApproxPoly.Eps = 3.000000000000000000
|
||||
end
|
||||
item
|
||||
OperationClassName = 'TocvNoneOperation'
|
||||
end>
|
||||
OperationsEnabled = False
|
||||
Left = 24
|
||||
Top = 316
|
||||
Left = 36
|
||||
Top = 392
|
||||
end
|
||||
object ocvflsrc1: TocvFileSource
|
||||
Enabled = True
|
||||
Delay = 120
|
||||
FileName = '.\Resource\768x576.avi'
|
||||
Left = 336
|
||||
Top = 328
|
||||
Left = 372
|
||||
Top = 396
|
||||
end
|
||||
object ocvcmrsrc1: TocvCameraSource
|
||||
Enabled = True
|
||||
Resolution = r160x120
|
||||
Resolution = r960x544
|
||||
Left = 32
|
||||
Top = 64
|
||||
Top = 40
|
||||
end
|
||||
object ocvpcmsrc1: TocvIPCamSource
|
||||
Enabled = True
|
||||
UserName = 'admin'
|
||||
Password = 'admin'
|
||||
IP = '10.1.1.202'
|
||||
Postfix = 'cam/realmonitor?channel=1&subtype=0'
|
||||
Left = 336
|
||||
Top = 68
|
||||
Top = 44
|
||||
end
|
||||
end
|
||||
|
@ -43,9 +43,13 @@ type
|
||||
ocvcmrsrc1: TocvCameraSource;
|
||||
ocvw4: TocvView;
|
||||
ocvpcmsrc1: TocvIPCamSource;
|
||||
chk2: TCheckBox;
|
||||
chk3: TCheckBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure cbb1Change(Sender: TObject);
|
||||
procedure chk1Click(Sender: TObject);
|
||||
procedure chk2Click(Sender: TObject);
|
||||
procedure chk3Click(Sender: TObject);
|
||||
private
|
||||
public
|
||||
end;
|
||||
@ -67,12 +71,23 @@ begin
|
||||
ocvcmrsrc1.Enabled := chk1.Checked;
|
||||
end;
|
||||
|
||||
procedure TMainForm.chk2Click(Sender: TObject);
|
||||
begin
|
||||
ocvpcmsrc1.Enabled := chk2.Checked;
|
||||
end;
|
||||
|
||||
procedure TMainForm.chk3Click(Sender: TObject);
|
||||
begin
|
||||
ocvflsrc1.Enabled := chk3.Checked;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cbb1.Items.Assign(GetRegisteredImageOperations);
|
||||
cbb1.ItemIndex := cbb1.Items.IndexOf(GetRegisteredImageOperations.GetNameByClass(ocvmgprtn1.OperationClass));
|
||||
// ocvcmrsrc1.Enabled := True;
|
||||
// ocvpcmsrc1.Enabled := True;
|
||||
chk3.Checked := ocvflsrc1.Enabled;
|
||||
chk2.Checked := ocvpcmsrc1.Enabled;
|
||||
chk1.Checked := ocvcmrsrc1.Enabled;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -2,8 +2,8 @@ object MainForm: TMainForm
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'cMatchTemplate'
|
||||
ClientHeight = 342
|
||||
ClientWidth = 747
|
||||
ClientHeight = 348
|
||||
ClientWidth = 777
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -13,16 +13,30 @@ object MainForm: TMainForm
|
||||
OldCreateOrder = False
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object lbl1: TLabel
|
||||
Left = 451
|
||||
Top = 3
|
||||
Width = 121
|
||||
Height = 13
|
||||
Caption = 'Select the rectangle area'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clMaroon
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object ocvw1: TocvView
|
||||
Left = 8
|
||||
Top = 16
|
||||
Top = 22
|
||||
Width = 320
|
||||
Height = 320
|
||||
VideoSource = ocvmgprtn1
|
||||
end
|
||||
object ocvw2: TocvView
|
||||
Left = 424
|
||||
Top = 14
|
||||
Left = 451
|
||||
Top = 22
|
||||
Width = 320
|
||||
Height = 320
|
||||
OnAfterPaint = ocvw2AfterPaint
|
||||
@ -32,19 +46,19 @@ object MainForm: TMainForm
|
||||
end
|
||||
object btn1: TButton
|
||||
Left = 334
|
||||
Top = 148
|
||||
Width = 75
|
||||
Top = 154
|
||||
Width = 111
|
||||
Height = 25
|
||||
Caption = 'Snap ->'
|
||||
Caption = 'Get snapshot ->'
|
||||
TabOrder = 2
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object btn2: TButton
|
||||
Left = 334
|
||||
Top = 188
|
||||
Width = 75
|
||||
Top = 194
|
||||
Width = 111
|
||||
Height = 25
|
||||
Caption = '<- Math'
|
||||
Caption = '<- Match template'
|
||||
Enabled = False
|
||||
TabOrder = 3
|
||||
OnClick = btn2Click
|
||||
@ -53,7 +67,7 @@ object MainForm: TMainForm
|
||||
Enabled = True
|
||||
Resolution = r320x240
|
||||
Left = 364
|
||||
Top = 12
|
||||
Top = 18
|
||||
end
|
||||
object ocvmgprtn1: TocvImageOperation
|
||||
VideoSource = ocvcmrsrc1
|
||||
@ -63,6 +77,6 @@ object MainForm: TMainForm
|
||||
Operation.DrawRect.Offset.Y = 0
|
||||
Operations = <>
|
||||
Left = 364
|
||||
Top = 76
|
||||
Top = 82
|
||||
end
|
||||
end
|
||||
|
@ -15,6 +15,7 @@ type
|
||||
ocvmgprtn1: TocvImageOperation;
|
||||
btn1: TButton;
|
||||
btn2: TButton;
|
||||
lbl1: TLabel;
|
||||
procedure btn1Click(Sender: TObject);
|
||||
procedure ocvw2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure ocvw2MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||
@ -49,15 +50,16 @@ begin
|
||||
mX1 := 0;
|
||||
mY1 := 0;
|
||||
ocvw2.DrawImage(SnapImage);
|
||||
lbl1.Visible := True;
|
||||
end;
|
||||
|
||||
procedure TMainForm.btn2Click(Sender: TObject);
|
||||
begin
|
||||
(ocvmgprtn1.Operation as TocvMatchTemplate).IPLTemplate := CropIplImage(SnapImage.IpImage, CvRect(
|
||||
{} Trunc(ocvcmrsrc1.Width * mX / ocvw2.Width),
|
||||
{} Trunc(ocvcmrsrc1.Height * mY / ocvw2.Height),
|
||||
{} Trunc(ocvcmrsrc1.Width * (mX1 - mX) / ocvw2.Width),
|
||||
{} Trunc(ocvcmrsrc1.Height * (mY1 - mY) / ocvw2.Height)));
|
||||
{} Trunc(ocvcmrsrc1.ImageWidth * mX / ocvw2.Width),
|
||||
{} Trunc(ocvcmrsrc1.ImageHeight * mY / ocvw2.Height),
|
||||
{} Trunc(ocvcmrsrc1.ImageWidth * (mX1 - mX) / ocvw2.Width),
|
||||
{} Trunc(ocvcmrsrc1.ImageHeight * (mY1 - mY) / ocvw2.Height)));
|
||||
end;
|
||||
|
||||
procedure TMainForm.ocvw2AfterPaint(Sender: TObject; const IplImage: IocvImage);
|
||||
@ -71,7 +73,7 @@ end;
|
||||
|
||||
procedure TMainForm.ocvw2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
mDown := true;
|
||||
mDown := True;
|
||||
mX := X;
|
||||
mY := Y;
|
||||
mX1 := X;
|
||||
|
41
utils/CompressHaar/uCompressHaar.dpr
Normal file
41
utils/CompressHaar/uCompressHaar.dpr
Normal file
@ -0,0 +1,41 @@
|
||||
program uCompressHaar;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
{$R *.res}
|
||||
|
||||
uses
|
||||
System.SysUtils,
|
||||
System.Classes,
|
||||
System.ZLib;
|
||||
|
||||
Const
|
||||
Path = '.\facedetectxml\';
|
||||
|
||||
Var
|
||||
S: TSearchRec;
|
||||
ZC: TZCompressionStream;
|
||||
Fs, Fd: TFileStream;
|
||||
|
||||
begin
|
||||
try
|
||||
if FindFirst(Path+'*.xml', faAnyFile, S) = 0 then
|
||||
repeat
|
||||
Fs := TFileStream.Create(Path + S.Name, fmOpenRead);
|
||||
Fd := TFileStream.Create(Path + S.Name + '.z', fmCreate);
|
||||
ZC := TZCompressionStream.Create(clMax,Fd);
|
||||
try
|
||||
WriteLn(S.Size:8,' ',S.Name);
|
||||
ZC.CopyFrom(Fs, S.Size);
|
||||
finally
|
||||
ZC.Free;
|
||||
Fs.Free;
|
||||
Fd.Free;
|
||||
end;
|
||||
until FindNext(S) <> 0;
|
||||
FindClose(S);
|
||||
except
|
||||
on E: Exception do
|
||||
Writeln(E.ClassName, ': ', E.Message);
|
||||
end;
|
||||
|
||||
end.
|
166
utils/CompressHaar/uCompressHaar.dproj
Normal file
166
utils/CompressHaar/uCompressHaar.dproj
Normal file
@ -0,0 +1,166 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{60367AB6-E988-4578-B75D-75F2CA065860}</ProjectGuid>
|
||||
<ProjectVersion>15.4</ProjectVersion>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<MainSource>uCompressHaar.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Console</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Android' and '$(Base)'=='true') or '$(Base_Android)'!=''">
|
||||
<Base_Android>true</Base_Android>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice' and '$(Base)'=='true') or '$(Base_iOSDevice)'!=''">
|
||||
<Base_iOSDevice>true</Base_iOSDevice>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSSimulator' and '$(Base)'=='true') or '$(Base_iOSSimulator)'!=''">
|
||||
<Base_iOSSimulator>true</Base_iOSSimulator>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='OSX32' and '$(Base)'=='true') or '$(Base_OSX32)'!=''">
|
||||
<Base_OSX32>true</Base_OSX32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
|
||||
<SanitizedProjectName>uCompressHaar</SanitizedProjectName>
|
||||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Android)'!=''">
|
||||
<Android_LauncherIcon72>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png</Android_LauncherIcon72>
|
||||
<DCC_UsePackage>DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;CustomIPTransport;dsnap;IndyIPServer;IndyCore;CloudService;FmxTeeUI;FireDACIBDriver;dsnapxml;bindcompfmx;RESTBackendComponents;dbrtl;FireDACCommon;bindcomp;xmlrtl;ibxpress;FireDACCommonDriver;bindengine;soaprtl;FMXTee;inet;soapmidas;dxPSDBTeeChartRS19;RESTComponents;dbexpress;IndyIPClient;FireDACSqliteDriver;autoupgrXE5;FireDACDSDriver;DBXSqliteDriver;fmx;IndySystem;tethering;DataSnapClient;DataSnapProviderClient;fmxFireDAC;IndyIPCommon;DataSnapFireDAC;FireDACDBXDriver;soapserver;dxPSTeeChartRS19;rtl;DbxClientDriver;DataSnapNativeClient;IndyProtocols;bindcompdbx;FireDAC;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<Android_LauncherIcon96>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png</Android_LauncherIcon96>
|
||||
<Android_LauncherIcon48>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png</Android_LauncherIcon48>
|
||||
<Android_LauncherIcon36>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png</Android_LauncherIcon36>
|
||||
<Android_LauncherIcon144>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png</Android_LauncherIcon144>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSDevice)'!=''">
|
||||
<DCC_UsePackage>DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;CustomIPTransport;dsnap;IndyIPServer;IndyCore;CloudService;FmxTeeUI;FireDACIBDriver;dsnapxml;bindcompfmx;RESTBackendComponents;dbrtl;FireDACCommon;bindcomp;xmlrtl;ibxpress;FireDACCommonDriver;bindengine;soaprtl;FMXTee;inet;soapmidas;RESTComponents;dbexpress;IndyIPClient;FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;fmx;IndySystem;tethering;DataSnapClient;DataSnapProviderClient;fmxFireDAC;fmxase;IndyIPCommon;DataSnapFireDAC;FireDACDBXDriver;soapserver;rtl;DbxClientDriver;DataSnapNativeClient;IndyProtocols;bindcompdbx;FireDAC;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSSimulator)'!=''">
|
||||
<DCC_UsePackage>DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;CustomIPTransport;dsnap;IndyIPServer;IndyCore;CloudService;FmxTeeUI;FireDACIBDriver;dsnapxml;bindcompfmx;RESTBackendComponents;dbrtl;FireDACCommon;bindcomp;xmlrtl;ibxpress;FireDACCommonDriver;bindengine;soaprtl;FMXTee;inet;soapmidas;RESTComponents;dbexpress;IndyIPClient;FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;fmx;IndySystem;tethering;DataSnapClient;DataSnapProviderClient;fmxFireDAC;fmxase;IndyIPCommon;DataSnapFireDAC;FireDACDBXDriver;soapserver;rtl;DbxClientDriver;DataSnapNativeClient;IndyProtocols;bindcompdbx;FireDAC;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_OSX32)'!=''">
|
||||
<DCC_UsePackage>FireDACPgDriver;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;DbxCommonDriver;dbxcds;CustomIPTransport;dsnap;IndyIPServer;IndyCore;CloudService;FmxTeeUI;FireDACIBDriver;dsnapxml;FireDACDb2Driver;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;dbrtl;FireDACCommon;bindcomp;inetdb;xmlrtl;ibxpress;FireDACCommonDriver;bindengine;soaprtl;FMXTee;FireDACMSSQLDriver;DBXInformixDriver;DataSnapServerMidas;DBXFirebirdDriver;inet;FireDACMySQLDriver;soapmidas;DBXSybaseASADriver;RESTComponents;dbexpress;IndyIPClient;FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;fmx;IndySystem;tethering;DataSnapClient;DataSnapProviderClient;fmxFireDAC;DBXOracleDriver;fmxase;IndyIPCommon;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;FireDACInfxDriver;FireDACASADriver;rtl;DbxClientDriver;DataSnapNativeClient;IndyProtocols;DBXMySQLDriver;bindcompdbx;FireDACADSDriver;FireDAC;fmxobj;FireDACOracleDriver;fmxdae;FireDACMSAccDriver;DataSnapIndy10ServerTransport;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
|
||||
<DCC_UsePackage>dxSkinOffice2007BlackRS19;JvGlobus;JvMM;JvManagedThreads;dxSkinLiquidSkyRS19;cxBarEditItemRS19;OverbyteIcsDXE5Run;FireDACPgDriver;dxWizardControlRS19;dxPScxCommonRS19;tmswizdXE5;dxThemeRS19;JvCrypt;XiButtonXE4;cxGridRS19;dxPScxExtCommonRS19;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;cxSchedulerRS19;JvNet;JvDotNetCtrls;DbxCommonDriver;OpenCV;vclimg;dbxcds;dxFlowChartRS19;DatasnapConnectorsFreePascal;JvXPCtrls;dxdbtrRS19;dxSkinSpringTimeRS19;vcldb;dxdborRS19;dxDockingRS19;dxSkinsdxDLPainterRS19;cxSpreadSheetRS19;dxtrmdRS19;dxSpellCheckerRS19;CustomIPTransport;dxTileControlRS19;dsnap;IndyIPServer;dxPSCoreRS19;dxSkinFoggyRS19;IndyCore;cxSchedulerGridRS19;cxPivotGridOLAPRS19;dxSkinStardustRS19;CloudService;FmxTeeUI;FireDACIBDriver;dxSkinXmas2008BlueRS19;JvDB;JvRuntimeDesign;dxSkinValentineRS19;fsIBX20;dsnapxml;dxPScxSchedulerLnkRS19;dxSkinDarkSideRS19;FireDACDb2Driver;dxSkinLondonLiquidSkyRS19;JclDeveloperTools;dxBarExtDBItemsRS19;dxTabbedMDIRS19;dxSkinOffice2013WhiteRS19;dxSkinSharpRS19;bindcompfmx;dxSkinBlueprintRS19;dxSkinOffice2007PinkRS19;frx20;vcldbx;cxExportRS19;FireDACODBCDriver;RESTBackendComponents;dxSkinCoffeeRS19;dbrtl;FireDACCommon;bindcomp;inetdb;dxSkinBlueRS19;JvPluginSystem;dxServerModeRS19;DBXOdbcDriver;JvCmp;vclFireDAC;dxSkinMoneyTwinsRS19;cxPivotGridChartRS19;xmlrtl;dxSkiniMaginaryRS19;ibxpress;JvTimeFramework;dxSkinOffice2007GreenRS19;FireDACCommonDriver;bindengine;vclactnband;soaprtl;FMXTee;dxRibbonRS19;bindcompvcl;dxADOServerModeRS19;Jcl;vclie;dxPSdxLCLnkRS19;dxSkinBlackRS19;dxSkinOffice2010BlackRS19;dxSkinSevenClassicRS19;FireDACMSSQLDriver;DBXInformixDriver;Intraweb;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;dxSkinsdxNavBarPainterRS19;inet;dxPSdxFCLnkRS19;dxSkinscxSchedulerPainterRS19;JvPascalInterpreter;FireDACMySQLDriver;soapmidas;vclx;dxPSPrVwRibbonRS19;dxPSDBTeeChartRS19;DBXSybaseASADriver;RESTComponents;dxSkinLilianRS19;dxSkinscxPCPainterRS19;dbexpress;IndyIPClient;JvBDE;tmsdXE5;cxSchedulerTreeBrowserRS19;dxPScxSSLnkRS19;dxPScxPivotGridLnkRS19;dxSkinSharpPlusRS19;FireDACSqliteDriver;autoupgrXE5;FireDACDSDriver;ZComponent;DBXSqliteDriver;dxPSdxDBTVLnkRS19;dxSkinOffice2007BlueRS19;cxDataRS19;cxLibraryRS19;fmx;JvDlgs;IndySystem;RVButtonXE6;TeeDB;tethering;dxPsPrVwAdvRS19;dxSkinHighContrastRS19;inetdbbde;vclib;DataSnapClient;DataSnapProviderClient;DBXSybaseASEDriver;dxmdsRS19;dxSkinOffice2010SilverRS19;dxSkinsdxBarPainterRS19;fsBDE20;MetropolisUILiveTile;dxPSdxOCLnkRS19;vcldsnap;fmxFireDAC;DBXDb2Driver;dxSkinDevExpressDarkStyleRS19;DBXOracleDriver;dxBarDBNavRS19;JvCore;vclribbon;dxSkinSilverRS19;dxSkinVS2010RS19;fmxase;vcl;dxPSdxDBOCLnkRS19;DBXMSSQLDriver;IndyIPCommon;CodeSiteExpressPkg;dxBarRS19;cxTreeListdxBarPopupMenuRS19;DataSnapFireDAC;FireDACDBXDriver;JvAppFrm;soapserver;dxFireDACServerModeRS19;inetdbxpress;fsTee20;frxTee20;cxEditorsRS19;dxSkinMcSkinRS19;FireDACInfxDriver;JvDocking;adortl;dxSkinOffice2007SilverRS19;frxDB20;JvWizards;FireDACASADriver;dxSkinSevenRS19;JvHMI;dxDBXServerModeRS19;dxLayoutControlRS19;dxPSTeeChartRS19;dxSkinWhiteprintRS19;cxPageControlRS19;fsADO20;JvBands;ZDbc;rtl;dcldxSkinsCoreRS19;DbxClientDriver;ZPlain;dxPScxGridLnkRS19;Tee;cxPageControldxBarPopupMenuRS19;cxVerticalGridRS19;JclContainers;CPortLibDXE;JvSystem;DataSnapNativeClient;svnui;dxSkinsdxRibbonPainterRS19;dxSkinSummer2008RS19;cxPivotGridRS19;dxComnRS19;IndyProtocols;DBXMySQLDriver;dxSkinTheAsphaltWorldRS19;JvControls;tmsxlsdXE5;dxPSLnksRS19;viTimeLineDPK;bindcompdbx;TeeUI;JvJans;JvPrintPreview;JvPageComps;dxSkinDarkRoomRS19;JvStdCtrls;JvCustom;dxSkinPumpkinRS19;dxBarExtItemsRS19;FireDACADSDriver;vcltouch;ZCore;dxNavBarRS19;VclSmp;FireDAC;VCLRESTComponents;dxGDIPlusRS19;DataSnapConnectors;dxCoreRS19;dxPScxVGridLnkRS19;fsDB20;dxPScxTLLnkRS19;dxSkinsCoreRS19;fmxobj;dxSkinGlassOceansRS19;JclVcl;ZParseSql;dxPScxPCProdRS19;fs20;svn;tmsexdXE5;dxSkinOffice2010BlueRS19;FireDACOracleDriver;fmxdae;dxorgcRS19;bdertl;cxTreeListRS19;FireDACMSAccDriver;DataSnapIndy10ServerTransport;dxSkinDevExpressStyleRS19;dxSkinCaramelRS19;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_ExeOutput>..\..\bin\</DCC_ExeOutput>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<Manifest_File>None</Manifest_File>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_UsePackage>dxSkinOffice2007BlackRS19;dxSkinLiquidSkyRS19;cxBarEditItemRS19;OverbyteIcsDXE5Run;FireDACPgDriver;dxWizardControlRS19;dxPScxCommonRS19;dxThemeRS19;cxGridRS19;dxPScxExtCommonRS19;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;cxSchedulerRS19;DbxCommonDriver;vclimg;dbxcds;dxFlowChartRS19;DatasnapConnectorsFreePascal;dxdbtrRS19;dxSkinSpringTimeRS19;vcldb;dxdborRS19;dxDockingRS19;dxSkinsdxDLPainterRS19;cxSpreadSheetRS19;dxtrmdRS19;dxSpellCheckerRS19;CustomIPTransport;dxTileControlRS19;dsnap;IndyIPServer;dxPSCoreRS19;dxSkinFoggyRS19;IndyCore;cxSchedulerGridRS19;cxPivotGridOLAPRS19;dxSkinStardustRS19;CloudService;FmxTeeUI;FireDACIBDriver;dxSkinXmas2008BlueRS19;dxSkinValentineRS19;dsnapxml;dxPScxSchedulerLnkRS19;dxSkinDarkSideRS19;FireDACDb2Driver;dxSkinLondonLiquidSkyRS19;dxBarExtDBItemsRS19;dxTabbedMDIRS19;dxSkinOffice2013WhiteRS19;dxSkinSharpRS19;bindcompfmx;dxSkinBlueprintRS19;dxSkinOffice2007PinkRS19;cxExportRS19;FireDACODBCDriver;RESTBackendComponents;dxSkinCoffeeRS19;dbrtl;FireDACCommon;bindcomp;inetdb;dxSkinBlueRS19;dxServerModeRS19;DBXOdbcDriver;vclFireDAC;dxSkinMoneyTwinsRS19;cxPivotGridChartRS19;xmlrtl;dxSkiniMaginaryRS19;ibxpress;dxSkinOffice2007GreenRS19;FireDACCommonDriver;bindengine;vclactnband;soaprtl;FMXTee;dxRibbonRS19;bindcompvcl;dxADOServerModeRS19;vclie;dxPSdxLCLnkRS19;dxSkinBlackRS19;dxSkinOffice2010BlackRS19;dxSkinSevenClassicRS19;FireDACMSSQLDriver;DBXInformixDriver;Intraweb;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;dxSkinsdxNavBarPainterRS19;inet;dxPSdxFCLnkRS19;dxSkinscxSchedulerPainterRS19;FireDACMySQLDriver;soapmidas;vclx;dxPSPrVwRibbonRS19;DBXSybaseASADriver;RESTComponents;dxSkinLilianRS19;dxSkinscxPCPainterRS19;dbexpress;IndyIPClient;tmsdXE5;cxSchedulerTreeBrowserRS19;dxPScxSSLnkRS19;dxPScxPivotGridLnkRS19;dxSkinSharpPlusRS19;FireDACSqliteDriver;FireDACDSDriver;ZComponent;DBXSqliteDriver;dxPSdxDBTVLnkRS19;dxSkinOffice2007BlueRS19;cxDataRS19;cxLibraryRS19;fmx;IndySystem;TeeDB;tethering;dxPsPrVwAdvRS19;dxSkinHighContrastRS19;vclib;DataSnapClient;DataSnapProviderClient;DBXSybaseASEDriver;dxmdsRS19;dxSkinOffice2010SilverRS19;dxSkinsdxBarPainterRS19;MetropolisUILiveTile;dxPSdxOCLnkRS19;vcldsnap;fmxFireDAC;DBXDb2Driver;dxSkinDevExpressDarkStyleRS19;DBXOracleDriver;dxBarDBNavRS19;vclribbon;dxSkinSilverRS19;dxSkinVS2010RS19;fmxase;vcl;dxPSdxDBOCLnkRS19;DBXMSSQLDriver;IndyIPCommon;dxBarRS19;cxTreeListdxBarPopupMenuRS19;DataSnapFireDAC;FireDACDBXDriver;soapserver;dxFireDACServerModeRS19;inetdbxpress;cxEditorsRS19;dxSkinMcSkinRS19;FireDACInfxDriver;adortl;dxSkinOffice2007SilverRS19;FireDACASADriver;dxSkinSevenRS19;dxDBXServerModeRS19;dxLayoutControlRS19;dxSkinWhiteprintRS19;cxPageControlRS19;ZDbc;rtl;dcldxSkinsCoreRS19;DbxClientDriver;ZPlain;dxPScxGridLnkRS19;Tee;cxPageControldxBarPopupMenuRS19;cxVerticalGridRS19;DataSnapNativeClient;dxSkinsdxRibbonPainterRS19;dxSkinSummer2008RS19;cxPivotGridRS19;dxComnRS19;IndyProtocols;DBXMySQLDriver;dxSkinTheAsphaltWorldRS19;tmsxlsdXE5;dxPSLnksRS19;bindcompdbx;TeeUI;dxSkinDarkRoomRS19;dxSkinPumpkinRS19;dxBarExtItemsRS19;FireDACADSDriver;vcltouch;ZCore;dxNavBarRS19;VclSmp;FireDAC;VCLRESTComponents;dxGDIPlusRS19;DataSnapConnectors;dxCoreRS19;dxPScxVGridLnkRS19;dxPScxTLLnkRS19;dxSkinsCoreRS19;fmxobj;dxSkinGlassOceansRS19;ZParseSql;dxPScxPCProdRS19;tmsexdXE5;dxSkinOffice2010BlueRS19;FireDACOracleDriver;fmxdae;dxorgcRS19;cxTreeListRS19;FireDACMSAccDriver;DataSnapIndy10ServerTransport;dxSkinDevExpressStyleRS19;dxSkinCaramelRS19;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">uCompressHaar.dpr</Source>
|
||||
</Source>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k200.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp200.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment/>
|
||||
<Platforms>
|
||||
<Platform value="Android">False</Platform>
|
||||
<Platform value="iOSDevice">False</Platform>
|
||||
<Platform value="iOSSimulator">False</Platform>
|
||||
<Platform value="OSX32">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
</Project>
|
BIN
utils/CompressHaar/uCompressHaar.res
Normal file
BIN
utils/CompressHaar/uCompressHaar.res
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user