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

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

procedure TForm1.Button1Click(Sender: TObject);
var
img, img1: HImageX;
w, h: OleVariant;
rg: HRegionX;
begin
img := CoHImageX.Create;
img.ReadImage(‘clip‘);
w := img.GetImageSize(h);
HWindowX1.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowX1);
img1 := img.Roberts(‘roberts_max‘);
rg := img1.Threshold(50, 150);
HWindowX2.SetPart(0, 0, h - 1, w - 1);
HWindowX2.SetColor(‘white‘);
HWindowX2.SetDraw(‘margin‘);
img1.DispObj(HWindowX2);
rg.DispObj(HWindowX2);
HWindowX2.SetColor(‘red‘);
HWindowX2.SetTposition(10, 10);
HWindowX2.WriteString(‘roberts_max‘);
img1 := img.Roberts(‘gradient_max‘);
rg := img1.Threshold(50, 150);
HWindowX3.SetPart(0, 0, h - 1, w - 1);
HWindowX3.SetColor(‘white‘);
HWindowX3.SetDraw(‘margin‘);
img1.DispObj(HWindowX3);
rg.DispObj(HWindowX3);
HWindowX3.SetColor(‘red‘);
HWindowX3.SetTposition(10, 10);
HWindowX3.WriteString(‘gradient_max‘);
img1 := img.Roberts(‘gradient_sum‘);
rg := img1.Threshold(50, 150);
HWindowX4.SetPart(0, 0, h - 1, w - 1);
HWindowX4.SetColor(‘white‘);
HWindowX4.SetDraw(‘margin‘);
img1.DispObj(HWindowX4);
rg.DispObj(HWindowX4);
HWindowX4.SetColor(‘red‘);
HWindowX4.SetTposition(10, 10);
HWindowX4.WriteString(‘gradient_sum‘);
end;

时间: 10-01

zw版【转发·台湾nvp系列Delphi例程】HALCON Roberts1的相关文章

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

zw版[转发·台湾nvp系列Delphi例程]HALCON DirectFile unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, HALCONXLib_TLB, StdCtrls, ExtCtrls;type TForm1 = class(TForm) HWindowXCtrl1: THWindowXCtrl

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

zw版[转发·台湾nvp系列Delphi例程]HALCON CheckDifference unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, HALCONXLib_TLB;type TForm1 = class(TForm) HWindowXCtrl1: THWindowXCtrl; But

zw版【转发·台湾nvp系列Delphi例程】.NET调用HALCON COM控件内存释放模式

zw版[转发·台湾nvp系列Delphi例程].NET调用HALCON COM控件内存释放模式 ------------------------------------方法一 :Imports System.Runtime.InteropServices Marshal.ReleaseComObject(COM物件)COM 物件 = Nothing 方法二 :COM 物件 = NothingGC.Collect()GC.WaitForPendingFinalizers() 方法三 :Import

zw版【转发·台湾nvp系列Delphi例程】HALCON HImage与Bitmap格式转换

zw版[转发·台湾nvp系列Delphi例程]HALCON HImage与Bitmap格式转换 (Delphi Prism)namespace HImage_Bitmap_Prism;interfaceuses System.Drawing, System.Collections, System.Collections.Generic, System.Windows.Forms, System.ComponentModel, System.Drawing, System.Drawing.Imag

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

zw版[转发·台湾nvp系列Delphi例程]HALCON AddNoiseWhite unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, HALCONXLib_TLB;type TForm1 = class(TForm) HWindowXCtrl1: THWindowXCtrl; Butto

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

zw版[转发·台湾nvp系列Delphi例程]HALCON HWindow Overlayer 1 ------------------------------------HALCON HWindow Overlayer 1 unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, HALCONXLib_TLB, St

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

zw版[转发·台湾nvp系列Delphi例程]HALCON Component Histogram unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, HALCONXLib_TLB;type TForm1 = class(TForm) HWindowXCtrl1: THWindowXCtrl;

zw版【转发·台湾nvp系列Delphi例程】HALCON Cast 使用方式

zw版[转发·台湾nvp系列Delphi例程]HALCON Cast 使用方式 procedure TForm1.Button1Click(Sender: TObject);var img, img1 : HImageX; img2, img3 : IHUntypedObjectX; w , h : OleVariant; mtype : OleVariant;begin img := CoHImageX.Create; img.ReadImage('fabrik'); img.GetImage

zw版【转发·台湾nvp系列Delphi例程】Delphi 使用 HALCON库件COM控件数据格式转换

zw版[转发·台湾nvp系列Delphi例程]Delphi 使用 HALCON库件COM控件数据格式转换 Delphi 使用 HALCON库件COM控件数据格式转换,与IHObjectX接口有关 var rg0,rg1 : HRegionX;begin rg0 := CoHRegionX.Create; rg0.GenRectangle1(10,10,150,150); rg1 := CoHRegionX.Create; rg1.GenRectangle1(200,200,250,250); r

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

zw版[转发·台湾nvp系列Delphi例程]HALCON BinThreshold unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, HALCONXLib_TLB, StdCtrls;type TForm1 = class(TForm) Button1: TButton; HWindowXCtrl1: THW