2013-09-12 12:50:55 +02:00
|
|
|
unit uMainForm;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
|
|
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uOCVTypes, uOCVImageOperation,
|
2013-09-16 13:49:10 +02:00
|
|
|
uOCVCamera, uOCVView, Vcl.StdCtrls, uOCVSplitter;
|
2013-09-12 12:50:55 +02:00
|
|
|
|
|
|
|
type
|
|
|
|
TMainForm = class(TForm)
|
|
|
|
lbl1: TLabel;
|
|
|
|
cbb1: TComboBox;
|
|
|
|
chk1: TCheckBox;
|
|
|
|
ocvcmr1: TocvCamera;
|
2013-12-02 19:39:13 +01:00
|
|
|
ocvw1: TocvView;
|
2013-09-12 12:50:55 +02:00
|
|
|
ocvmgprtn1: TocvImageOperation;
|
2013-12-02 19:39:13 +01:00
|
|
|
ocvw2: TocvView;
|
2013-09-16 13:49:10 +02:00
|
|
|
ocvspltr1: TocvSplitter;
|
2013-09-12 12:50:55 +02:00
|
|
|
procedure FormCreate(Sender: TObject);
|
|
|
|
procedure cbb1Change(Sender: TObject);
|
|
|
|
procedure chk1Click(Sender: TObject);
|
|
|
|
private
|
|
|
|
public
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
MainForm: TMainForm;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
procedure TMainForm.cbb1Change(Sender: TObject);
|
|
|
|
begin
|
2013-12-02 19:39:13 +01:00
|
|
|
ocvmgprtn1.Operation := TcvImageOperations(cbb1.ItemIndex);
|
2013-09-12 12:50:55 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TMainForm.chk1Click(Sender: TObject);
|
|
|
|
begin
|
|
|
|
ocvcmr1.Enabled := chk1.Checked;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TMainForm.FormCreate(Sender: TObject);
|
|
|
|
begin
|
2013-12-02 19:39:13 +01:00
|
|
|
ocvw1.VideoSource := ocvspltr1.Channels[0];
|
|
|
|
|
|
|
|
ocvmgprtn1.VideoSource := ocvspltr1.Channels[1];
|
|
|
|
ocvw2.VideoSource := ocvmgprtn1;
|
|
|
|
|
|
|
|
cbb1.ItemIndex := Integer(ocvmgprtn1.Operation);
|
2013-09-12 12:50:55 +02:00
|
|
|
chk1.Checked := ocvcmr1.Enabled;
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|