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

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, HALCONXLib_TLB, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
HWindowXCtrl1: THWindowXCtrl;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
Set8087CW($27f);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
ho_Egypt1 : HImageX;
ho_Region : HRegionX;
ho_Histo1 : HRegionX;
hv_AbsoluteHisto, hv_RelativeHisto : OleVariant;
win : HWindowX;
mtype : OleVariant;
w, h : OleVariant;
begin
win := HWindowXCtrl1.HalconWindow;
ho_Egypt1 := CoHImageX.Create;
ho_Egypt1.ReadImage('egypt1');
ho_Egypt1.GetImagePointer1(mtype, w, h);
win.SetPart(0, 0, h - 1, w - 1);
win.SetColor('white');
win.ClearWindow;
ho_Region := ho_Egypt1.BinThreshold;
ho_Region.DispObj(win);
hv_AbsoluteHisto := ho_Region.GrayHisto(ho_Egypt1, hv_RelativeHisto);
ho_Histo1 := CoHRegionX.Create;
ho_Histo1.GenRegionHisto(hv_RelativeHisto, 255, 255, 1);
win.SetColor('red');
ho_Histo1.DispObj(win);
end;
end.

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

  1. zw版【转发·台湾nvp系列Delphi例程】HALCON DirectShow (Delphi Prism)

    zw版[转发·台湾nvp系列Delphi例程]HALCON DirectShow (Delphi Prism) namespace DirectShow_Prism;interfaceuses Sys ...

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

    zw版[转发·台湾nvp系列Delphi例程]HALCON HImage与Bitmap格式转换 (Delphi Prism)namespace HImage_Bitmap_Prism;interfac ...

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

    zw版[转发·台湾nvp系列Delphi例程].NET调用HALCON COM控件内存释放模式 ------------------------------------方法一 :Imports Sys ...

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

    zw版[转发·台湾nvp系列Delphi例程]HALCON HWindow Overlayer 1 ------------------------------------HALCON HWindow ...

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

    zw版[转发·台湾nvp系列Delphi例程]HALCON DirectFile unit Unit1;interfaceuses Windows, Messages, SysUtils, Varia ...

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

    zw版[转发·台湾nvp系列Delphi例程]HALCON DirectShow unit Unit1;interfaceuses Windows, Messages, SysUtils, Varia ...

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

    zw版[转发·台湾nvp系列Delphi例程]Delphi 使用 HALCON库件COM控件数据格式转换 Delphi 使用 HALCON库件COM控件数据格式转换,与IHObjectX接口有关 va ...

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

    zw版[转发·台湾nvp系列Delphi例程]HALCON AddNoiseWhite unit Unit1;interfaceuses Windows, Messages, SysUtils, Va ...

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

    zw版[转发·台湾nvp系列Delphi例程]HALCON CheckDifference unit Unit1;interfaceuses Windows, Messages, SysUtils, ...

随机推荐

  1. android动态调试samli代码(转)

    转载自看雪http://bbs.pediy.com/showthread.php?t=189610,非常感谢原作者分享! 跟踪apk一般的做法是在反编译的smali代码中插入log输出,然后重新编译运 ...

  2. LeetCode -- Triangle 路径求最小和( 动态规划问题)

    Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent n ...

  3. BetterZip,支持rar等多种压缩解压方式(Xcode自身不能解压rar)

    百度云盘下载链接: http://pan.baidu.com/s/1sk7Faw9密码: muw7 rarosx-5.3.0.tar.gz1.解压之后放到/usr/local/目录下(位置可选,不过要 ...

  4. CodeTimer

    using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using S ...

  5. A Word (Or Two) On Quality

    In the world of interactive project management the promise of quality has become cliché. Quality is ...

  6. block iOS 块

    block 是个很陌生的东西啊.以前没有学会,现在再看它,还是觉得很稀奇古怪. 无奈,之后硬着头皮学了.. //有参返回值 格式: 返回值类型 (^变量名)(参数类型及个数) = ^(形参列表){ 代 ...

  7. leetcode算法

    Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull. Follo ...

  8. js 事件监听封装

    var eventUtil={//添加句柄 //element,节点 //type,事件类型 //handler,函数 addHandler:function(element,type,handler ...

  9. 微信接口请求万能函数http_request

    关键字:http_request http_request post get http request原文: http://www.cnblogs.com/txw1958/p/http_request ...

  10. Medical image computing

    Processing and analysis of medical images using computer comprises the following: image formation an ...