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


procedure TForm1.Button1Click(Sender: TObject);
var
img, img1 : HImageX;
img2 : IHRegionX;
w , h : OleVariant;
mtype : OleVariant;
begin
img := CoHImageX.Create;
img.ReadImage('razors1');
img.GetImagePointer1(mtype, w, h);
HWindowX1.SetPart(0, 0, h - 1, w - 1);
img.DispObj(HWindowX1);
img1 := CoHImageX.Create;
img1.ReadImage('razors2');
HWindowX2.SetPart(0, 0, h - 1, w - 1);
img1.DispObj(HWindowX2);
img2 := img.CheckDifference(img1, 'diff_inside', 0, 0, 0, 0, 0);
HWindowX3.SetPart(0, 0, h - 1, w - 1);
img2.DispObj(HWindowX3);
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
op.CloseWindow(HWindowX1.HalconID);
op.CloseWindow(HWindowX2.HalconID);
op.CloseWindow(HWindowX3.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();
HWindowX3 := 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','');
HWindowX3.OpenWindow(0,0,Panel3.ClientWidth,Panel3.ClientHeight,Int64(Panel3.Handle),'visible','');
end;
zw版【转发·台湾nvp系列Delphi例程】CheckDifference1的更多相关文章
- 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 ...
随机推荐
- QGridLayout--01
#include "mainwindow.h" #include <QApplication> #include<QLabel> #include<Q ...
- LeetCode -- Triangle 路径求最小和( 动态规划问题)
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent n ...
- magento
打开 magento/app/code/core/Mage/Core/Model/Session/Abstract/varien.php//if (isset($cookieParams['doma ...
- c#中的linq一
c#中的linq 测试数据: using System; using System.Collections.Generic; using System.Linq; using System.Text; ...
- SQLServer User and Login Tips
use master IF EXISTS (SELECT * FROM sys.databases WHERE name = 'gpdb83sp')BEGIN DROP DATABASE gpdb83 ...
- 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=/ ...
- vs2010 问题 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
vs2010 问题 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 在安装 VS2010 后,再安装 VS2012 VS2015 等,原来的 .N ...
- WCF第一个Demo
参考文献:http://www.cnblogs.com/artech/archive/2007/02/26/656901.html 自己学习的Demo 第一个是控制台宿主服务,第二个是Windows服 ...
- git log 常用命令
1.git log 如果不带任何参数,它会列出所有历史记录,最近的排在最上方,显示提交对象的哈希值,作者.提交日期.和提交说明.如果记录过多,则按Page Up.Page Down.↓.↑来控制显示: ...
- spring4 文件下载功能
需要准备的工具和框架 Spring 4.2.0.RELEASE Bootstrap v3.3.2 Maven 3 JDK 1.7 Tomcat 8.0.21 Eclipse JUNO Service ...