Halcon算子学习笔记(持续更新)

A

abs_diff_image(计算两个图像的绝对差)

abs_diff_image(Image1, Image2 : ImageAbsDiff : Mult : )

①参数:

  • Image1:输入图像1
  • Image2:输入图像2
  • ImageAbsDiff :绝对差异结果图(输出图像)
  • Mult:比例因子(结果图中的像素灰度系数)

Mult=1时:
Mult为1
Mult=4时:
Mult为4

abs_funct_1d(计算输入函数y值的绝对值)

create_funct_1d_array([-3], Function)             //根据输入数组创建一个函数
abs_funct_1d(Function, FunctionAbsolute)			//(输入函数,输出函数Y值绝对值)

abs_image (计算图像的绝对值)

convert_image_type(Image, ImageInt2, 'int2')        //输入图像格式转化为int2类型
texture_laws(ImageInt2, ImageTexture, 'el', 2, 5)   //过滤器,通俗讲提取边缘(从下往上,白->黑边缘为白色,像素值为+;黑->白边缘为黑色,像素为-)
abs_image(ImageTexture, ImageTexture)               //输出图像每个像素点绝对值

abs_matrix(计算矩阵元素的绝对值)

abs_matrix( : : Matrix : MatrixAbs)     //(输入矩阵的矩阵句柄,输出的绝对值矩阵句柄)

111

access_channel(访问多通道图像的通道)

access_channel(MultiChannelImage : Image : Channel :)//(输入多通道图像,输出所选通道图像,通道数)
//以RGB图像为例:
access_channel(Image, Red, 1)   //1为Red通道

acos_image(计算图像的反余弦)

acos_image(Image : ArccosImage : : )

activate_compute_device (激活计算设备)

query_available_compute_devices(DeviceIdentifier)   //获取可用的计算设备列表
open_compute_device(DeviceIdentifier, DeviceHandle) //打开计算设备
activate_compute_device(DeviceHandle)               //激活计算设备
//HALCON线程只能激活一个计算设备。如果之前 调用了其他设备,则该设备将自动停用

adapt_shape_model_high_noise (调整形状模型的参数以适应高噪点图像)

read_image(Image2, 'brochure/brochure_page_01.jpg')
create_shape_model(Image2, 'auto', -0.39, 0.79, 'auto', 'auto', 'use_polarity', 'auto', 'auto', ModelID)
adapt_shape_model_high_noise(Image1, ModelID, 'all', ResultDict)

add_channels(给图像的指定区域填充灰度值)

add_channels(Regions, Image : GrayRegions : : )    //(区域,输入图像,只保留该区域图像)

在这里插入图片描述

add_class_train_data_gmm(gmm:高斯混合模型)

add_class_train_data_gmm( : : GMMHandle, ClassTrainDataHandle : ) //将训练数据添加到高斯混合模型

add_class_train_data_knn(knn:最邻近结点算法)

create_class_knn(10, KNNHandle)        //创建knn句柄
create_class_train_data(10, ClassTrainDataHandle)        //创建knn训练数据
add_class_train_data_knn(KNNHandle, ClassTrainDataHandle)   //将训练数据添加到最邻近结点算法分类器中

add_class_train_data_mlp(mlp:多层感知器)

add_class_train_data_mlp( : : MLPHandle, ClassTrainDataHandle : )//将训练数据添加到多层感知器

add_class_train_data_svm(SVM:支持向量机)

add_class_train_data_svm( : : SVMHandle, ClassTrainDataHandle : )//将训练数据添加到支持向量机

add_deformable_surface_model_reference_point(将参考点添加到可变形曲面模型)

add_deformable_surface_model_reference_point( : : DeformableSurfaceModel, ReferencePointX, ReferencePointY, ReferencePointZ : ReferencePointIndex)
//(可变曲面模型句柄(in),参考点X(in),参考点Y(in),参考点Z(in),新参考点的索引(out))

add_deformable_surface_model_sample(将变形样本添加到可变形曲面模型)

add_deformable_surface_model_sample( : : DeformableSurfaceModel, ObjectModel3D : )
//(可变曲面模型句柄(in),变形的3D对象模型的句柄)

add_image (图像叠加)

add_image(Image1, Image2 : ImageResult : Mult, Add : )
//A:Image1(输入图像1)  B:Image2(输入图像2)   C:ImageResult(输出图像)
//C =  ( A + B ) * Mult + Add

Mult = 0.5; Add = 0;
在这里插入图片描述

add_matrix(矩阵叠加)

add_matrix( : : MatrixAID, MatrixBID : MatrixSumID)  //(in,in,out)

在这里插入图片描述

add_matrix_mod(矩阵叠加)

add_matrix( : : MatrixAID, MatrixBID : MatrixSumID)  //(in ,in) 叠加结果存于A

在这里插入图片描述

-------------------------------------------------------------------------------------------------------------------------

C

create_funct_1d_array (根据y值序列创建一个函数)

create_funct_1d_array([-1,1], Function)    //(Function:类型:function_1d ,结果:0,1,0,-1,1)

convert_image_type (转换图像的类型)

convert_image_type(Image : ImageConverted : NewType ) //(输入图像,输出图像,要转换的图像类型)

create_shape_model()

create_shape_model(Image2, 'auto', -0.39, 0.79, 'auto', 'auto', 'use_polarity', 'auto', 'auto', ModelID)

create_class_knn(创建knn句柄)

create_class_knn(10, KNNHandle)        //创建knn句柄

create_class_train_data(创建knn训练数据)

create_class_train_data(10, ClassTrainDataHandle)        //创建knn训练数据

-------------------------------------------------------------------------------------------------------------------------

O

open_compute_device (打开计算设备)

open_compute_device( : : DeviceIdentifier : DeviceHandle)

-------------------------------------------------------------------------------------------------------------------------

Q

query_available_compute_devices (获取可用的计算设备列表)

query_available_compute_devices( : : : DeviceIdentifier)

-------------------------------------------------------------------------------------------------------------------------

R

read_image (读取图片)

read_image( : Image : FileName : )  //(out,in)

-------------------------------------------------------------------------------------------------------------------------

T

texture_laws (使用Laws纹理过滤器过滤图像)

texture_laws(Image : ImageTexture : FilterTypes, Shift, FilterSize : )

在这里插入图片描述

  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值