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

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

时间:2015-10-01 20:31:25      阅读:478      评论:0      收藏:0      [点我收藏+]

标签:

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

 技术分享

 

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, HALCONXLib_TLB;
type
TForm1 = class(TForm)
HWindowXCtrl1: THWindowXCtrl;
Button1: TButton;
HWindowXCtrl2: THWindowXCtrl;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
img : HImageX;
w , h : OleVariant;
mtype : OleVariant;
begin
img := CoHImageX.Create;
img.ReadImage(‘fabrik‘);
img.GetImagePointer1(mtype, w, h);
HWindowXCtrl1.HalconWindow.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowXCtrl1.HalconWindow);
img := img.AddNoiseWhite(90);
HWindowXCtrl2.HalconWindow.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowXCtrl2.HalconWindow);
end;
end.

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

标签:

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

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