十五.halcon学习之数据结构

本文介绍了Halcon图像处理库中的关键数据结构,包括图像、区域和XLD数据的定义与使用方法,并概述了基本的区域运算及图形显示参数设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Halcon数据结构总结:

    一.两类参数:图形参数Iconic (image, region, XLD)与控制参数Control (string, integer, real, handle),在Halcon算子的参数中,依次为:输入图形参数、输出图形参数、输入控制参数、输出控制参数;并且其输入参数不会被算子改变。

图形参数Iconic:

1.Images

Halcon中,Image = Channel + Domain , 像素点存放在Channel矩阵中,根据ROI来描述Image。

Image相关操作:

输入:从文件、从设备

生成:外部图像数据、空内存区域;

显示:disp_image()图像首通道灰度图;disp_color() 彩色图;disp_channel()某特定通道;disp_obj() 自动判别类别;

缩放:set_part() 设置显示区域;set_part_style() 设置显示参数;

说明:

(1)Multiple channels    //多通道图像,可以是灰度图像或RGB图像

(2)Arbitrary region of interest //ROI区域图像

(3)Multiple pixel types(byte, (u)int1/2/4,real, complex, direction, cyclic, vector_field)

  byte, uint2        //灰度图像的标准编码

  int1, int2         //Difference of two images or derivates with integer precision    int4                 //两幅灰度图的频谱

direction           //图片边缘的梯度方向

real                //边缘提取及特定灰度值的轮廓

complex            //图片频率

cyclic             //Assigning one "gray" value to each color(??)

vector_field      //连续图形的光学流分布

2.Regions

以行列坐标形式储存,有广泛的应用,特点是高效,可利用同态算子。比如用阈值对图像分割的结果,其他系统中称为BOLB,AREA等。

3. Extended Line Description (XLD)

图像均用像素点保存,而像素点是整型的,不连续的,Halcon做了拓展,定义了亚像素(subpixel)的描述几何轮廓的对象:xld,主要用在亚像素测量的背景下,可用于如提取边缘、构建轮廓等等,xld在模板匹配、图形校准等多方面有重要的用途。

   Subpixel accurate line and edge detection(亚像素精度的线和边缘检测)

   Generic point list based data structure(依据数据结构产生点的表)

   Handling of contours, polygons, lines, parallels, etc.(对轮廓,多边形,线等进行操作)

   此外,Halcon支持的类型还包括图形元组、控制变量元组及句柄:

元组使得可以用一个变量传递数个对象,可以由重载后的函数来进行处理;图形元组的下标从1开始,控制变量元组下标从0开始;句柄则可以用来描述窗体、文件等等,句柄不能是常量。

二.区域运算:

并:union1()、union2();

交:intersection();

差:difference();

补:complement();

图形显示参数设置:

显示模式:set_draw(); 参数:margin、filled

线宽线形:set_line_width(); set_line_style();

颜色:set_color(); set_colored(); set_rgb(); set_gray();

显示图形:set_shape(); 参数:original、outer circle、inner circle、rectangle1、rectangle2、ellipse、icon

set_icon

三.附加重要名词解释 

Domain: Part of the image which is used for processing. In other systems called ROI (region of interest).(待处理的区域)

Channel: One image matrix of a multi-spectral image. One example is the red channel of an RGB image.

Iconic data: Overall term for images, regions, and XLD data. In object oriented languages (C++ and COM) and in HDevelop iconic data is represented by a polymorphic data type. In object oriented languages iconic data is also called iconic object.

Control data: All non iconic data. Examples are single values (integer, real, and string), coordinates, arrays of values.

Tuple: an array of values where each element can be of a different type. One can have both iconic and control tuples.

HALCON object: Synonym for Iconic object / data

Image acquisition interface: Interface between the frame grabber /camera driver (SDK) and the HALCON library. The Image acquisition interface is a DLL which is dynamically loaded when calling open_framegrabber.

Language interface: Software that enables the programmer to use the HALCON library in a given language (e.g., C++).

Extension Package: A mechanism that enables the user to fully integrate user-defined procedures into the HALCON environment. The extension package concept gives full access to the internal data structures of HALCON.

License file: File “license.dat“ in the directory “license“.  This file is used together with hardware components (dongle or Ethernet card) to check if a correct license is available.

Help files: Files in the directory “help“ which are used to get online information about all HALCON operators. This is extensively used by HDevelop.

Shape-Based Matching: Finding of an object in an image based on a predefined model. The shape based matching uses features to quickly locate objects very precisely.

Variation Model: A method to do print checking by presenting multiple good patterns to the system. The variation model learns the normal variation a good pattern and based on this information can detect real defects.

Measure Tool: A set of operators to find the exact location of edges along lines or circular arcs. Other systems call the similar tool, e.g., caliper.

Accuracy: The deviation from the true value(准确性,和真值之间的差)

Precision: The standard deviation of the measurement(精度,测量标准差)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值