码迷,mamicode.com
首页 > Windows程序 > 详细

zw版【转发·台湾nvp系列Delphi例程】HALCON AngleLl

时间:2015-10-01 16:36:47      阅读:248      评论:0      收藏:0      [点我收藏+]

标签:

zw版【转发·台湾nvp系列Delphi例程】HALCON AngleLl

技术分享

 

技术分享

procedure TForm1.Button1Click(Sender: TObject);
var
Row1, Row2 : OleVariant;
Column1, Column2 : OleVariant;
AngleLl : OleVariant;
sys : HSystemX;
op : HOperatorSetX;
deg : OleVariant;
ht : HTupleX;
val : double;
begin
Randomize;
sys := CoHSystemX.Create;
op := CoHOperatorSetX.Create;
ht := CoHTupleX.Create;
sys.SetSystem(‘width‘, 640);
sys.SetSystem(‘height‘, 480);
HWindowXCtrl1.HalconWindow.SetPart(0, 0, 479, 639);
HWindowXCtrl1.HalconWindow.ClearWindow;
HWindowXCtrl1.HalconWindow.SetColor(ht.TupleConcat(‘red‘, ‘white‘));
Row1 := ht.TupleConcat(240, 460);
Column1 := ht.TupleConcat(10, 10);
Row2 := ht.TupleConcat(240, 10);
Column2 := ht.TupleConcat(630, Random(630));
HWindowXCtrl1.HalconWindow.DispLine(Row1, Column1, Row2, Column2);
op.AngleLl(ht.TupleSelect(Row1, 0), ht.TupleSelect(Column1, 0), ht.TupleSelect(Row2, 0), ht.TupleSelect(Column2, 0), ht.TupleSelect(Row1, 1), ht.TupleSelect(Column1, 1), ht.TupleSelect(Row2, 1), ht.TupleSelect(Column2, 1), AngleLl);
op.TupleDeg(AngleLl, deg);
val := double(deg);
Label1.Caption := Format(‘%7.3f‘, [val]);
end;

 

zw版【转发·台湾nvp系列Delphi例程】HALCON AngleLl

标签:

原文地址:http://www.cnblogs.com/ziwang/p/4851104.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!