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 ...
随机推荐
- 【剑指offer】09-3变态跳台阶
原创博文,转载请注明出处! # 本文是牛客网<剑指offer>刷题笔记,笔记索引连接 1.题目 # 一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级.求该青蛙跳上一个n级的 ...
- Android:数据持久化(1/2)文件、SharedPreferences
Summary 持久化的3种方法: 普通文件:I/O流操作文件: SharedPreferences:XML文件,通过key-value pair的形式存储数据: SQLite:Android自带数据 ...
- django-xhtml2pdf的使用(加入图片,指定字体,设置样式)
新博客地址:http://muker.net/django-xhtml2pdf.html 这里仅仅讨论直接利用html生成pdf这种最常见也最简单的情况. 1.要利用html生成带中文的pdf要指定中 ...
- Python系列文章索引
>>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is ...
- 关于时间戳和QDateTime相互转换的有关问题(转)
1.toTime_t()把2014年12月19日10:24:40这样的QDateTime的格式转变为1418955940这样的时间戳 QDateTime time = QDateTime::curre ...
- ‘close’ was not declared in this scope(转)
‘close’ was not declared in this scope 没有包含头文件 unistd.h 造成的. 加上' #include <unistd.h>
- C#开机启动与退出程序
最新用到的项目中需要使用开机自启和退出程序,于是需要 http://www.cnblogs.com/Gaoswatou/p/6605760.html C# WinForm程序退出的方法 1.this. ...
- 手写html表格熟练度练习
table中的colspan和rowspan 经常手写表格时 查半天的两个属性,记下来 <!DOCTYPE html> <html lang="en" > ...
- java Annotation的应用
一.Annotation 示例 Override Annotation @Override public void onCreate(Bundle savedInstanceState); 二.Ann ...
- java bean 合并
package com.hainabo.mgcmall.util; import java.beans.BeanInfo;import java.beans.Introspector;import j ...