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

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

时间:2015-10-01 16:37:22      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:

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

procedure TForm1.Button1Click(Sender: TObject);
begin
img.DispObj(win);
sys.WaitSeconds(1);
win.DispObj(img.ConvolImage(‘sobel‘, ‘mirrored‘) as IHObjectX);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
sys := CoHSystemX.Create;
win := HWindowXCtrl1.HalconWindow;
img := CoHImageX.Create;
img.ReadImage(‘fabrik.png‘);
w := img.GetImageSize(h);
win.SetPart(0, 0, h - 1, w - 1);
img.DispObj(win);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
FilterMask : OleVariant;
begin
img.DispObj(win);
sys.WaitSeconds(1);
FilterMask := VarArrayOf([3, 3, -1, 1, 2, 1, 0, 0, 0, -1, -2, -1]);
win.DispObj(img.ConvolImage(FilterMask, ‘mirrored‘) as IHObjectX);
sys.WaitSeconds(1);
FilterMask := VarArrayOf([3, 3, -1, 1, 0, -1, 2, 0, -2, 1, 0, -1]);
win.DispObj(img.ConvolImage(FilterMask, ‘mirrored‘) as IHObjectX);
end;

 

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

标签:

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

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