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

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

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

标签:

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

 技术分享

procedure TForm1.Button1Click(Sender: TObject);
var
image0, result1, result2 : HImageX;
w, h : OleVariant;
begin
image0 := CoHImageX.Create;

image0.ReadImage(‘engraved‘);
w := image0.GetImageSize(h);
HWindowXCtrl1.HalconWindow.SetPart(0, 0, h - 1, w - 1);
image0.DispObj(HWindowXCtrl1.HalconWindow);

result1 := image0.ZoomImageFactor(0.5, 0.5, ‘constant‘);
w := result1.GetImageSize(h);
HWindowXCtrl2.HalconWindow.SetPart(0, 0, h - 1, w - 1);
result1.DispObj(HWindowXCtrl2.HalconWindow);

result2 := image0.ZoomImageFactor(0.5, 0.5, ‘weighted‘);
w := result2.GetImageSize(h);
HWindowXCtrl3.HalconWindow.SetPart(0, 0, h - 1, w - 1);
result2.DispObj(HWindowXCtrl3.HalconWindow);
end;

 

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

标签:

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

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