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


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);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
img : HUntypedObjectX;
rg : HUntypedObjectX;
op : HOperatorSetX;
tp : HTupleX;
w, h : OleVariant;
begin
op := CoHOperatorSetX.Create;
op.GenEmptyObj(img);
op.GenEmptyObj(rg);
tp := CoHTupleX.Create;
w := 512;
h := 512;
op.SetSystem('width', w);
op.SetSystem('height', h);
op.GenRectangle1(rg, tp.TupleConcat(60, 240), tp.TupleConcat(60, 240), tp.TupleConcat(200, 380), tp.TupleConcat(200, 380));
op.GenImageConst(img, 'byte', w, h);
op.OverpaintRegion(img, rg, tp.TupleConcat(128, 255), 'fill');
HWindowXCtrl1.HalconWindow.SetPart(0, 0, h - 1, w - 1);
op.DispObj(img, HWindowXCtrl1.HalconWindow.HalconID);
end;
end.

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

  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, ...

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

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

随机推荐

  1. 关于 Block的使用

    一.类2[类中某个值,需要反向传值到类1中,采用block方式,实现] [1.声明block属性] @property (copy, nonatomic) void(^activityPageView ...

  2. LeetCode Maximal Square

    原题链接在这里:https://leetcode.com/problems/maximal-square/ 这是一道DP题,存储历史信息是到当前点能有的最大square, 用二维数组dp存储. 更新方 ...

  3. 从printf("\40d\n")看转义字符

    1.  八进制  十进制  十六进制 二进制:0 1 2 3 4 5 6 7    \0(或省略0,\) ,\28 按道理是错误的,但是C语言把它解释为 \2,8错误了就不考虑 十进制:0 1 2 3 ...

  4. 图像分割之(五)活动轮廓模型之Snake模型简介

    在"图像分割之(一)概述"中咱们简单了解了目前主流的图像分割方法.下面咱们主要学习下基于能量泛函的分割方法.这里学习下Snake模型简单的知识,Level Set(水平集)模型会在 ...

  5. Android 脚本替换PackageName

    原文简书地址:http://www.jianshu.com/p/dca9c323c686 1 前言 平时如果想要替换包名一般是在AS中右键Rename进行操作.但是如果遇到一份代码希望导出几种不同的包 ...

  6. thinkphp 模板调用数据

    我自己写了个简单的模板是这样的 <!DOCTYPE html> <html> <head> <style> div { width:230px; hei ...

  7. 修改文件中的内容,使用fileinput模块

    import fileinput filename = 'passwd' ,backup='.bak') print line.replace('root','ROOT') a = ' this is ...

  8. hadoop NameNode HA 和ResouceManager HA

    官网配置地址: HDFS HA : http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSHighAvai ...

  9. iOS 瀑布流的基本原理

    /** * 源代码链接 * 链接: https://pan.baidu.com/s/1nvLamEX 密码: kya5 */ #import <UIKit/UIKit.h> @interf ...

  10. Android图片缓存的框架ImageLoader的使用

    DisplayImageOptions options;        // DisplayImageOptions是用于设置图片显示的类 // 使用DisplayImageOptions.Build ...