标签:
zw版【转发·台湾nvp系列Delphi例程】HALCON MoveRectangle2
procedure TForm1.Button1Click(Sender: TObject);
var
img : HUntypedObjectX;
w, h : OleVariant;
r0, c0, r1, c1, r2, c2 : OleVariant;
ht : HTupleX;
op : HOperatorSetX;
begin
op := CoHOperatorSetX.Create;
ht := CoHTupleX.Create;
op.ReadImage(img, ‘fabrik‘);
op.GetImageSize(img, w, h);
HWindowXCtrl1.HalconWindow.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowXCtrl1.HalconWindow);
r0 := ht.TupleConcat(10, 200);
c0 := ht.TupleConcat(10, 200);
r1 := ht.TupleConcat(100, 300);
c1 := ht.TupleConcat(100, 300);
r2 := ht.TupleConcat(100, 300);
c2 := ht.TupleConcat(100, 300);
HWindowXCtrl2.HalconWindow.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowXCtrl2.HalconWindow);
HWindowXCtrl2.HalconWindow.MoveRectangle(r0, c0, r1, c1, r2, c2);
op.ClearObj(img);
end;
zw版【转发·台湾nvp系列Delphi例程】HALCON MoveRectangle2
标签:
原文地址:http://www.cnblogs.com/ziwang/p/4851058.html