版权声明:本文为博主原创文章,未经博主允许不得转载。

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)的灰度值

程序:

  1. read_image (Image, 'G:/Halcon/images/images/claudia.png')
  2. gen_circle (Circle, 200, 200, 100.5)
  3. reduce_domain (Image, Circle, ImageReduced)
  4. gen_image_proto (Image, ImageCleared, 32)
  5. overpaint_gray (ImageCleared, ImageReduced)
  6. gen_image_const (Image1, 'byte', 512, 512)
  7. overpaint_region (Image1, Circle, 255, 'fill')
  8. * /* Copy a circular part of the image  into the image : */
  9. read_image (Image2, 'G:/Halcon/images/images/brycecanyon1.png')
  10. paint_gray (ImageReduced, Image2, MixedImage)
  11. * /* Paint a rectangle into the image  */
  12. read_image (Image3, 'G:/Halcon/images/images/pads.png')
  13. gen_rectangle1 (Rectangle1, 30, 20, 100, 200)
  14. paint_region (Rectangle1, Image3, ImageResult, 255, 'fill')
  15. * /* Paint colored xld objects into a gray image */
  16. * /* read and copy image to generate a three channel image */
  17. copy_image (Image2, image0)
  18. copy_image (Image2, image1)
  19. compose3 (image0, Image2, image1, MultiChannelImage)
  20. * /* extract subpixel border */
  21. threshold_sub_pix (MultiChannelImage, Border, 128)
  22. * /* select the circle and the arrows */
  23. circle := Border[14]
  24. arrow := Border[16]
  25. ObjectsConcat := [circle,arrow]
  26. * /* paint a green circle and white arrows (to paint all
  27. * * objects e.g. blue, pass [0,0,255] tuple for GrayVal) */
  28. paint_xld (ObjectsConcat, MultiChannelImage, ImageResult1, [0,1,0,1,1,255])

处理效果:

Halcon学习之八:图像区域叠加与绘制的更多相关文章

  1. 学习 opencv---(3) ROI 区域图像叠加&初级图像混合

    在这篇文章里,我们一起学习了在OpenCV中如何定义感兴趣区域ROI,如何使用addWeighted函数进行图像混合操作,以及将ROI和addWeighted函数结合起来使用,对指定区域进行图像混合操 ...

  2. Halcon学习之七:改变图像的现实方式和大小

    change_format ( Image : ImagePart : Width, Height : ) 改变Image图像大小,而且ImagePart图像为灰度值图像. crop_domain ( ...

  3. Halcon WPF C#采集图像区域灰度值

    源码下载地址:https://github.com/lizhiqiang0204/ImageGray.git Halcon代码如下: *读取图片,转换成灰度图片 read_image (Image1, ...

  4. 跟我学机器视觉-HALCON学习例程中文详解-测量圆环脚宽间距

    跟我学机器视觉-HALCON学习例程中文详解-测量圆环脚宽间距 This example program demonstrates the basic usage of a circular meas ...

  5. 跟我学机器视觉-HALCON学习例程中文详解-QQ摄像头读取条码

    跟我学机器视觉-HALCON学习例程中文详解-QQ摄像头读取条码 第一步:插入QQ摄像头,安装好驱动(有的可能免驱动) 第二步:打开HDevelop,点击助手-打开新的Image Acquisitio ...

  6. 跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量

    跟我学机器视觉-HALCON学习例程中文详解-IC引脚测量 Lead Measurement: Example for the application of the measure object in ...

  7. 在DirectShow的视频图像上叠加线条和文字

    在DirectShow的视频图像上叠加线条和文字 最近一直在从事工业测量方面的开发工作,难免会用到各种各样的相机,其中支持DX的USB相机开发起来比较方便,由于工作需要经常要在视频图像上叠加线条和文字 ...

  8. Halcon学习笔记之支持向量机(二)

    例程:classify_halogen_bulbs.hdev 在Halcon中模式匹配最成熟最常用的方式该署支持向量机了,在本例程中展示了使用支持向量机对卤素灯的质量检测方法.通过这个案例,相信大家可 ...

  9. HALCON学习之算子大全

    1.1 Gaussian-Mixture-Models 1.add_sample_class_gmm 功能:把一个训练样本添加到一个高斯混合模型的训练数据上. 2.classify_class_gmm ...

随机推荐

  1. linux中的网络基础

    ifconfig -a 查看所有网口ifconfig eth 查看具体网口 ifup ethoifdown etho 网卡配置文件/etc/sysconfig/networkk-scripts/ifc ...

  2. 2017年 ACM Journal Latex templates 新模板生成 acmart.cls 文件

    假定你的文稿在:/user/acmart-master那么cd /user/acmart-masterlatex acmart.ins最后可得到acmart.cls.

  3. >=< 在set和dict中的不同

    两个dict比较的算法是,长度>键>值,由于dict无序,所以比较的时候会自动将键对齐比较,我们不用担心这个. >>> d1 = dict(x=1, y=2) >& ...

  4. java分布式(一)

    分布式架构的演进 初始阶段架构 应用服务和数据服务分离阶段 使用缓存改善性能 使用应用服务器集群 数据库读写分离 反向代理和CDN加速 分布式文件系统和分布式数据库 使用NoSql和搜索引擎 业务拆分 ...

  5. (转)spring AOP探索

    原文地址:http://www.cnblogs.com/zuoxiaolong/p/spring6.html 自己整理后,供自己学习方便: 目前由AOP联盟给出了AOP的标准,AOP联盟的规范只是提供 ...

  6. Tornado的入门研究

    1.为啥要了解Tornado 首先,Tornado是大神写出来的,如果学习python的话,参照Tornado的源码是一件非常好的事情,属于FaceBook的开源代码 其次,Tornado就是我们在 ...

  7. 同一台电脑上装两个或两个以上的tomcat服务器

    1.下载免安装版tomcat,解压成tomcat1.tomcat2: 2.修改tomcat2中conf下server.xml文件如下: <Server port="8005" ...

  8. POJ1220 Number Base Conversion

    题意 Write a program to convert numbers in one base to numbers in a second base. There are 62 differen ...

  9. 洛谷 P1098 字符串的展开

    题目描述 在初赛普及组的“阅读程序写结果”的问题中,我们曾给出一个字符串展开的例子:如果在输入的字符串中,含有类似于“d-h”或者“4-8”的字串,我们就把它当作一种简写,输出时,用连续递增的字母或数 ...

  10. Maven中配置生成单元测试报告配置

    对junit单元测试的报告: 1.  ------------------------------------------------------- 2.   T E S T S 3.  ------ ...