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


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;
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
img : HImageX;
rg : HRegionX;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
HomMat2D : HHomMat2DX;
begin
HomMat2D := CoHHomMat2DX.Create;
HomMat2D.HomMat2dIdentity;
HomMat2D := HomMat2D.HomMat2dRotate(Pi / 4, 250, 250);
rg := rg.AffineTransRegion(HomMat2D, 'nearest_neighbor');
HWindowXCtrl1.HalconWindow.ClearWindow;
img.DispObj(HWindowXCtrl1.HalconWindow);
rg.DispObj(HWindowXCtrl1.HalconWindow);
end;
procedure TForm1.FormShow(Sender: TObject);
var
w, h : OleVariant;
begin
img := CoHImageX.Create;
rg := CoHRegionX.Create;
img.ReadImage('ic0');
w := img.GetImageSize(h);
HWindowXCtrl1.HalconWindow.SetPart(0, 0, h - 1, w - 1);
HWindowXCtrl1.HalconWindow.SetDraw('margin');
HWindowXCtrl1.HalconWindow.SetLineWidth(2);
HWindowXCtrl1.HalconWindow.SetColor('red');
rg.GenRectangle1(150, 150, 349, 349);
img.DispObj(HWindowXCtrl1.HalconWindow);
rg.DispObj(HWindowXCtrl1.HalconWindow);
end;
end.
zw版【转发·台湾nvp系列Delphi例程】HALCON AffineTransRegion的更多相关文章
- zw版【转发·台湾nvp系列Delphi例程】HALCON DirectShow (Delphi Prism)
zw版[转发·台湾nvp系列Delphi例程]HALCON DirectShow (Delphi Prism) namespace DirectShow_Prism;interfaceuses Sys ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON HImage与Bitmap格式转换
zw版[转发·台湾nvp系列Delphi例程]HALCON HImage与Bitmap格式转换 (Delphi Prism)namespace HImage_Bitmap_Prism;interfac ...
- zw版【转发·台湾nvp系列Delphi例程】.NET调用HALCON COM控件内存释放模式
zw版[转发·台湾nvp系列Delphi例程].NET调用HALCON COM控件内存释放模式 ------------------------------------方法一 :Imports Sys ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON HWindow Overlayer 1
zw版[转发·台湾nvp系列Delphi例程]HALCON HWindow Overlayer 1 ------------------------------------HALCON HWindow ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON DirectFile
zw版[转发·台湾nvp系列Delphi例程]HALCON DirectFile unit Unit1;interfaceuses Windows, Messages, SysUtils, Varia ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON DirectShow
zw版[转发·台湾nvp系列Delphi例程]HALCON DirectShow unit Unit1;interfaceuses Windows, Messages, SysUtils, Varia ...
- zw版【转发·台湾nvp系列Delphi例程】Delphi 使用 HALCON库件COM控件数据格式转换
zw版[转发·台湾nvp系列Delphi例程]Delphi 使用 HALCON库件COM控件数据格式转换 Delphi 使用 HALCON库件COM控件数据格式转换,与IHObjectX接口有关 va ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON AddNoiseWhite
zw版[转发·台湾nvp系列Delphi例程]HALCON AddNoiseWhite unit Unit1;interfaceuses Windows, Messages, SysUtils, Va ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON CheckDifference
zw版[转发·台湾nvp系列Delphi例程]HALCON CheckDifference unit Unit1;interfaceuses Windows, Messages, SysUtils, ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON BinThreshold
zw版[转发·台湾nvp系列Delphi例程]HALCON BinThreshold unit Unit1;interfaceuses Windows, Messages, SysUtils, Var ...
随机推荐
- 查询数据表,去除符合某些条件的记录,没有自动增长列(not exists)
select distinct ccode,isnull(cexch_name,''),N'',N'',N'2014.03',0,1,1,1,12 from RP_bankrecp where not ...
- 10 Golden Rules of Project Risk Management
The benefits of risk management in projects are huge. You can gain a lot of money if you deal with u ...
- JS手册目录
1.控件篇1.1 文本框 1.2 文本域 1.3 单选按钮 1.4 复选按钮 1.5 下拉列表框 1.6 文件上传组件 1.7 提交按钮 版权所有,转载请注明作者出处. 2016年7月26日15:54 ...
- http://blog.csdn.net/rongyongfeikai2/article/details/41659353
http://blog.csdn.net/rongyongfeikai2/article/details/41659353
- 7z usecaes
1. Archive without compressing 7z a -t7z -mx=0 OutputFilename InputFilename Descryption: a: command, ...
- Linux 技巧:让进程在后台可靠运行的几种方法
我们经常会碰到这样的问题,用 telnet/ssh 登录了远程的 Linux 服务器,运行了一些耗时较长的任务, 结果却由于网络的不稳定导致任务中途失败.如何让命令提交后不受本地关闭终端窗口/网络断开 ...
- 学习RFS,所有文章的参考
所有文章的主要参考: CSDN博客:http://blog.csdn.net/tulituqi 微博:@齐涛-道长
- C# 调用VC++的DLL,VC++封装DLL
VS中新建一个动态库项目 文件生成一个工程名对应的.cpp文件,该文件定义 DLL应用程序的导出函数. 工程内新建一个类OutputInt,我用类向导生成,工程中会添加OutputInt.cpp和Ou ...
- SQLServer数据库的一些全局变量
select APP_NAME ( ) as w --当前会话的应用程序 select @@IDENTITY --返回最后插入的标识值 select USER_NAME() --返回用户数据库用户名 ...
- WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform
参看:http://www.secdoctor.com/html/yyjs/31101.html