2013-05-29 21:46:38 +02:00
|
|
|
unit uMainForm;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
2013-05-31 22:29:25 +02:00
|
|
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uOCVTypes, uOCVImageOperation,
|
|
|
|
uOCVCamera, uOCVView, Vcl.StdCtrls;
|
2013-05-29 21:46:38 +02:00
|
|
|
|
|
|
|
type
|
2013-05-31 22:29:25 +02:00
|
|
|
TMainForm = class(TForm)
|
|
|
|
lbl1: TLabel;
|
|
|
|
cbb1: TComboBox;
|
|
|
|
chk1: TCheckBox;
|
|
|
|
ocvw1: TocvView;
|
|
|
|
ocvcmr1: TocvCamera;
|
|
|
|
ocvmgprtn1: TocvImageOperation;
|
|
|
|
procedure FormCreate(Sender: TObject);
|
|
|
|
procedure cbb1Change(Sender: TObject);
|
|
|
|
procedure chk1Click(Sender: TObject);
|
2013-05-29 21:46:38 +02:00
|
|
|
private
|
|
|
|
{ Private declarations }
|
|
|
|
public
|
|
|
|
{ Public declarations }
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
2013-05-31 22:29:25 +02:00
|
|
|
MainForm: TMainForm;
|
2013-05-29 21:46:38 +02:00
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
2013-05-31 22:29:25 +02:00
|
|
|
procedure TMainForm.cbb1Change(Sender: TObject);
|
|
|
|
begin
|
|
|
|
ocvmgprtn1.ImageOperation := TcvImageOperation(cbb1.ItemIndex);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TMainForm.chk1Click(Sender: TObject);
|
|
|
|
begin
|
|
|
|
ocvcmr1.Enabled := chk1.Checked;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TMainForm.FormCreate(Sender: TObject);
|
|
|
|
begin
|
|
|
|
cbb1.ItemIndex := Integer(ocvmgprtn1.ImageOperation);
|
|
|
|
chk1.Checked := ocvcmr1.Enabled;
|
|
|
|
end;
|
|
|
|
|
2013-05-29 21:46:38 +02:00
|
|
|
end.
|