zw版【转发·台湾nvp系列Delphi例程】HALCON EdgesImage
procedure TForm1.Button1Click(Sender: TObject);
var
img0, img1, Amp : HImageX;
w, h : OleVariant;
begin
img0 := CoHImageX.Create;
img0.ReadImage(‘fabrik‘);
w := img0.GetImageSize(h);
HWindowXCtrl1.HalconWindow.SetPart(0, 0, h - 1, w - 1);
img0.DispObj(HWindowXCtrl1.HalconWindow);
img1 := img0.EdgesImage(Amp, ‘lanser2‘, 0.5, ‘none‘, -1, -1);
HWindowXCtrl2.HalconWindow.SetPart(0, 0, h - 1, w - 1);
img1.DispObj(HWindowXCtrl2.HalconWindow);
end;
时间: 2024-10-12 11:01:30