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





procedure TForm1.Button1Click(Sender: TObject);
var
w, h : OleVariant;
hv_Fuse, hv_i : Integer;
begin
Op.ReadImage(ho_Image, Tuple.TupleAdd('color/color_fuses_0', hv_Count));
Op.GetImageSize(ho_Image, w, h);
Op.SetPart(hv_WH, 0, 0, h - 1, w - 1);
Op.DispObj(ho_Image, hv_WH);
Op.SetTposition(hv_WH, 12, 512);
Op.WriteString(hv_WH, Tuple.TupleAdd(Tuple.TupleAdd('color/color_fuses0', hv_Count), '.png'));
Op.Decompose3(ho_Image, ho_Red, ho_Green, ho_Blue);
Op.TransFromRgb(ho_Red, ho_Green, ho_Blue, ho_Hue, ho_Saturation, ho_Intensity, 'hsv');
Op.Threshold(ho_Saturation, ho_Saturated, 60, 255);
Op.ReduceDomain(ho_Hue, ho_Saturated, ho_HueSaturated);
for hv_Fuse := 0 to Tuple.TupleSub(Tuple.TupleLength(hv_FuseTypes), 1) do
begin
Op.Threshold(ho_HueSaturated, ho_CurrentFuse, Tuple.TupleSelect(hv_HueRanges, Tuple.TupleMult(hv_Fuse, 2)), Tuple.TupleSelect(hv_HueRanges, Tuple.TupleAdd(Tuple.TupleMult(hv_Fuse, 2), 1)));
Op.Connection(ho_CurrentFuse, ho_CurrentFuseConn);
Op.FillUp(ho_CurrentFuseConn, ho_CurrentFuseFill);
Op.SelectShape(ho_CurrentFuseFill, ho_CurrentFuseSel, 'area', 'and', 6000, 20000);
Op.AreaCenter(ho_CurrentFuseSel, hv_FuseArea, hv_Row1, hv_Column1);
Op.SetColor(hv_WH, 'magenta');
for hv_i := 0 to Tuple.TupleSub(Tuple.TupleLength(hv_FuseArea), 1) do
begin
Op.SetTposition(hv_WH, Tuple.TupleSelect(hv_Row1, hv_i), Tuple.TupleSelect(hv_Column1, hv_i));
Op.WriteString(hv_WH, Tuple.TupleAdd(Tuple.TupleAdd(Tuple.TupleAdd(Tuple.TupleSelect(hv_FuseColors, hv_Fuse), ' '), Tuple.TupleSelect(hv_FuseTypes, hv_Fuse)), ' Ampere'));
end;
Op.SetTposition(hv_WH, Tuple.TupleMult(24, Tuple.TupleAdd(hv_Fuse, 1)), 12);
Op.SetColor(hv_WH, 'slate blue');
Op.WriteString(hv_WH, Tuple.TupleAdd(Tuple.TupleAdd(Tuple.TupleSelect(hv_FuseColors, hv_Fuse), ' Fuses: '), Tuple.TupleLength(hv_FuseArea)));
end;
hv_Count := hv_Count + 1;
if (hv_Count > 4) then
hv_Count := 0;
end;
zw版【转发·台湾nvp系列Delphi例程】HALCON color_fuses1的更多相关文章
- 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 ...
随机推荐
- The Bip Buffer - The Circular Buffer with a Twist
Introduction The Bip-Buffer is like a circular buffer, but slightly different. Instead of keeping on ...
- How to delete expired archive log files using rman?
he following commands will helpful to delete the expired archive log files using Oracle Recovery Man ...
- 使用for打印小九九
使用shell的for语法打印小九九 #!/bin/bash `;do `;do if [ $a -ge $b ];then echo -en "$a x $b = $(expr $a \* ...
- Linux命令行–初识Linux shell
shell及脚本简介 GNU/Linux shell 是个交互工具,它为用户提供了启动程序.管理文件系统上的文件以及管理运行在Linux系统上的进程的途径 . shell的核心是命令行提示符 它是s ...
- Encode & decode
1. 埃特巴什码 (Aitebashen Password) Definition: 最后一个字母代表第一个字母,倒数第二个字母代表第二个字母. 常文:a b c d e f g h i j k l ...
- MySQL 事件跟踪器 , MySQL 无须重启服务 跟踪 SQL , 也无须配置日志
第一步 创建以下两个 日志表 按 Ctrl+C 复制代码 按 Ctrl+C 复制代码 CREATE TABLE `general_log` ( `event_time` timestamp NOT N ...
- 史上最全的iOS面试题及答案
迷途的羔羊--专为路痴量身打造的品牌.史上最精准的定位.想迷路都难!闪电更新中...敬请期待,欢迎提意见.下载地址:https://itunes.apple.com/us/app/mi-tu-de-g ...
- 6、JavaScript进阶篇③——浏览器对象、Dom对象
一.浏览器对象 1. window对象 window对象是BOM的核心,window对象指当前的浏览器窗口. window对象方法: 注意:在JavaScript基础篇中,已讲解了部分属性,windo ...
- MongoDB是?
MongoDB是? MongoDB是一个基于分布式文件存储的数据库 由C++编写 旨在为 WEB 应用提供可扩展的高性能数据存储解决方案 是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当 ...
- ios之无限图片轮播器的实现
首先实现思路:整个collectionView中只有2个cell.中间始终显示第二个cell. 滚动:向前滚动当前cell的脚标为0,向后滚动当前的cell脚标为2.利用当前cell的脚标减去1,得到 ...