Halcon学习之八:图像区域叠加与绘制
版权声明:本文为博主原创文章,未经博主允许不得转载。
overpaint_gray ( ImageDestination, ImageSource : : : ) 将灰度值不相同区域用不同颜色绘制到ImageDestination中, ImageSource包含希望的灰度值图像
overpaint_region ( Image, Region : : Grayval, Type : ) 将Region以一个恒定的灰度值绘制到Image图像中
paint_gray ( ImageSource, ImageDestination : MixedImage : : ) 将ImageSource的图像绘制到ImageDestination中,形成MixedImage。
paint_region ( Region, Image : ImageResult : Grayval, Type : ) 将Region以一个恒定的灰度值绘制到Image图像中
paint_xld ( XLD, Image : ImageResult : Grayval : ) 将XLD以一个恒定的灰度值绘制到Image图像中
set_grayval ( Image : : Row, Column, Grayval : ) 设置Image图像中坐标为(Row,Column)的灰度值
程序:
- read_image (Image, 'G:/Halcon/images/images/claudia.png')
- gen_circle (Circle, 200, 200, 100.5)
- reduce_domain (Image, Circle, ImageReduced)
- gen_image_proto (Image, ImageCleared, 32)
- overpaint_gray (ImageCleared, ImageReduced)
- gen_image_const (Image1, 'byte', 512, 512)
- overpaint_region (Image1, Circle, 255, 'fill')
- * /* Copy a circular part of the image into the image : */
- read_image (Image2, 'G:/Halcon/images/images/brycecanyon1.png')
- paint_gray (ImageReduced, Image2, MixedImage)
- * /* Paint a rectangle into the image */
- read_image (Image3, 'G:/Halcon/images/images/pads.png')
- gen_rectangle1 (Rectangle1, 30, 20, 100, 200)
- paint_region (Rectangle1, Image3, ImageResult, 255, 'fill')
- * /* Paint colored xld objects into a gray image */
- * /* read and copy image to generate a three channel image */
- copy_image (Image2, image0)
- copy_image (Image2, image1)
- compose3 (image0, Image2, image1, MultiChannelImage)
- * /* extract subpixel border */
- threshold_sub_pix (MultiChannelImage, Border, 128)
- * /* select the circle and the arrows */
- circle := Border[14]
- arrow := Border[16]
- ObjectsConcat := [circle,arrow]
- * /* paint a green circle and white arrows (to paint all
- * * objects e.g. blue, pass [0,0,255] tuple for GrayVal) */
- paint_xld (ObjectsConcat, MultiChannelImage, ImageResult1, [0,1,0,1,1,255])
处理效果:

Halcon学习之八:图像区域叠加与绘制的更多相关文章
- 学习 opencv---(3) ROI 区域图像叠加&初级图像混合
在这篇文章里,我们一起学习了在OpenCV中如何定义感兴趣区域ROI,如何使用addWeighted函数进行图像混合操作,以及将ROI和addWeighted函数结合起来使用,对指定区域进行图像混合操 ...
- Halcon学习之七:改变图像的现实方式和大小
change_format ( Image : ImagePart : Width, Height : ) 改变Image图像大小,而且ImagePart图像为灰度值图像. crop_domain ( ...
- Halcon WPF C#采集图像区域灰度值
源码下载地址:https://github.com/lizhiqiang0204/ImageGray.git Halcon代码如下: *读取图片,转换成灰度图片 read_image (Image1, ...
- 跟我学机器视觉-HALCON学习例程中文详解-测量圆环脚宽间距
跟我学机器视觉-HALCON学习例程中文详解-测量圆环脚宽间距 This example program demonstrates the basic usage of a circular meas ...
- 跟我学机器视觉-HALCON学习例程中文详解-QQ摄像头读取条码
跟我学机器视觉-HALCON学习例程中文详解-QQ摄像头读取条码 第一步:插入QQ摄像头,安装好驱动(有的可能免驱动) 第二步:打开HDevelop,点击助手-打开新的Image Acquisitio ...
- 跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量
跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量 Lead Measurement: Example for the application of the measure object in ...
- 在DirectShow的视频图像上叠加线条和文字
在DirectShow的视频图像上叠加线条和文字 最近一直在从事工业测量方面的开发工作,难免会用到各种各样的相机,其中支持DX的USB相机开发起来比较方便,由于工作需要经常要在视频图像上叠加线条和文字 ...
- Halcon学习笔记之支持向量机(二)
例程:classify_halogen_bulbs.hdev 在Halcon中模式匹配最成熟最常用的方式该署支持向量机了,在本例程中展示了使用支持向量机对卤素灯的质量检测方法.通过这个案例,相信大家可 ...
- HALCON学习之算子大全
1.1 Gaussian-Mixture-Models 1.add_sample_class_gmm 功能:把一个训练样本添加到一个高斯混合模型的训练数据上. 2.classify_class_gmm ...
随机推荐
- linux中的网络基础
ifconfig -a 查看所有网口ifconfig eth 查看具体网口 ifup ethoifdown etho 网卡配置文件/etc/sysconfig/networkk-scripts/ifc ...
- 2017年 ACM Journal Latex templates 新模板生成 acmart.cls 文件
假定你的文稿在:/user/acmart-master那么cd /user/acmart-masterlatex acmart.ins最后可得到acmart.cls.
- >=< 在set和dict中的不同
两个dict比较的算法是,长度>键>值,由于dict无序,所以比较的时候会自动将键对齐比较,我们不用担心这个. >>> d1 = dict(x=1, y=2) >& ...
- java分布式(一)
分布式架构的演进 初始阶段架构 应用服务和数据服务分离阶段 使用缓存改善性能 使用应用服务器集群 数据库读写分离 反向代理和CDN加速 分布式文件系统和分布式数据库 使用NoSql和搜索引擎 业务拆分 ...
- (转)spring AOP探索
原文地址:http://www.cnblogs.com/zuoxiaolong/p/spring6.html 自己整理后,供自己学习方便: 目前由AOP联盟给出了AOP的标准,AOP联盟的规范只是提供 ...
- Tornado的入门研究
1.为啥要了解Tornado 首先,Tornado是大神写出来的,如果学习python的话,参照Tornado的源码是一件非常好的事情,属于FaceBook的开源代码 其次,Tornado就是我们在 ...
- 同一台电脑上装两个或两个以上的tomcat服务器
1.下载免安装版tomcat,解压成tomcat1.tomcat2: 2.修改tomcat2中conf下server.xml文件如下: <Server port="8005" ...
- POJ1220 Number Base Conversion
题意 Write a program to convert numbers in one base to numbers in a second base. There are 62 differen ...
- 洛谷 P1098 字符串的展开
题目描述 在初赛普及组的“阅读程序写结果”的问题中,我们曾给出一个字符串展开的例子:如果在输入的字符串中,含有类似于“d-h”或者“4-8”的字串,我们就把它当作一种简写,输出时,用连续递增的字母或数 ...
- Maven中配置生成单元测试报告配置
对junit单元测试的报告: 1. ------------------------------------------------------- 2. T E S T S 3. ------ ...