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


procedure TForm1.Button1Click(Sender: TObject);
var
img : HImageX;
w, h : OleVariant;
mtype : OleVariant;
mode : array[0..3] of Variant;
values : OleVariant;
begin
img := CoHImageX.Create;
img.ReadImage('bk45');
img.GetImagePointer1(mtype, w, h);
HWindowX1.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowX1);
mode[0] := 'histogram';
mode[1] := Panel2.ClientHeight div 2;
mode[2] := Panel2.ClientWidth div 2;
mode[3] := 1;
values := VarArrayOf(mode);
HWindowX2.SetPart(0, 0, Panel2.ClientHeight - 1, Panel2.ClientWidth - 1);
HWindowX2.SetPaint(values);
HWindowX2.ClearWindow();
img.DispObj(HWindowX2);
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
op.CloseWindow(HWindowX1.HalconID);
op.CloseWindow(HWindowX2.HalconID);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
ShowMessage('Delphi '+ IntToStr(Sizeof(Pointer)*8));
op := CoHOperatorSetX.Create;
op.SetCheck('~father');
HWindowX1 := CoHWindowX.Create();
HWindowX2 := CoHWindowX.Create();
HWindowX1.OpenWindow(0,0,Panel1.ClientWidth,Panel1.ClientHeight,Int64(Panel1.Handle),'visible','');
HWindowX2.OpenWindow(0,0,Panel2.ClientWidth,Panel2.ClientHeight,Int64(Panel2.Handle),'visible','');
end;
zw版【转发·台湾nvp系列Delphi例程】HALCON HWindowX 01的更多相关文章
- 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 ...
随机推荐
- 说说怎么写clean code
前两天参加了公司组织的一个培训,主题是“如何写出好的代码” ,刚看到这个主题,第一反应是又不知道是哪个培训机构来忽悠钱的!老大安排了,就去听听呗. 说实在的,课程内容没有什么新鲜的东西,就是讲讲如何发 ...
- 使用mysqli_stmt类
在生成网页时,许多PHP脚本通常都会执行除参数以外,其他部分完全相同的查询语句,针对这种重复执行一个查询,每次迭代使用不同的参数情况,MySQL从4.1版本开始提供了一种名为预处理语句(prepare ...
- 验证整数、小数、实数、有效位小数最简单JavaScript正则表达式
输入完按回车后即可验证!(自认为最简单!) 正整数: 负整数: 整 数: 正小数: 负小数: 小 数: 实 数: 保留1位小数: 保留2位小数: 保留3位小数: 说明:IE6.0.IE7 ...
- Layout---poj3169(差分约束+最短路spfa)
题目链接:http://poj.org/problem?id=3169 有n头牛站成一排 在他们之间有一些牛的关系比较好,所以彼此之间的距离不超过一定距离:也有一些关系不好的牛,希望彼此之间的距离大于 ...
- iOS面试题 02
在面试的时候,面试官问我,“你对内存管理了解的多吗?” 我忘了当时是怎么回答的了,但是,肯定是一时没想起来怎么回答. 1.谁创建谁释放 2.autoreleasepool 3.retain,copy, ...
- LeetCode Game of Life
原题链接在这里:https://leetcode.com/problems/game-of-life/ 题目: According to the Wikipedia's article: " ...
- linux 安装apahce的configure: error: APR not found. Please read the documentation解决办法
1.下载所需软件包: 下载apr并配置 wget http://apache.freelamp.com/apr/apr-1.4.2.tar.gz 下载apr ./configure –prefix=/ ...
- android 二维码生成
1,activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); set ...
- Java基础——数组应用之StringBuilder类和StringBuffer类
接上文:Java基础——数组应用之字符串String类 一.StringBuffer类 StringBuffer类和String一样,也用来代表字符串,只是由于StringBuffer的内部实现方式和 ...
- 9G10内核时钟tick实现
9G10中PIT(Periodic Interval Timer)提供OS调度中断,它提供了最高精度和最有效的管理(即使系统长时间响应).一. 硬件PIT目标是提供OS的周期中断.PIT提供一个可编程 ...