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

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. BZOJ1412 ZJOI2009 狼和羊的故事 【网络流-最小割】

    BZOJ1412 ZJOI2009 狼和羊的故事 Description “狼爱上羊啊爱的疯狂,谁让他们真爱了一场:狼爱上羊啊并不荒唐,他们说有爱就有方向......” Orez听到这首歌,心想:狼和 ...

  2. jdbcTemplate的一些常用方法

    前言 最近的项目中由于只进行查询,所以使用了jdbcTemplate来直接操作sql进行持久层的操作,初次接触jdbcTemplate,从最开始的什么都不知道到现在基本方法都大致知道什么意思,特此记录 ...

  3. Orders

    The stores manager has sorted all kinds of goods in an alphabetical order of their labels. All the k ...

  4. Apache报错You don't have permission to access on this server

    解决方法: 打开httpd.conf文件 <Directory /> AllowOverride none Require all denied </Directory> 修改 ...

  5. Python 运行其他程序

    10.4 运行其他程序 在Python中可以方便地使用os模块运行其他的脚本或者程序,这样就可以在脚本中直接使用其他脚本,或者程序提供的功能,而不必再次编写实现该功能的代码.为了更好地控制运行的进程, ...

  6. uploadify onComplete 不执行?

    这个问题纠结了2小时.最后发现在最新版的uploadify 没有 onComplete  事件了. 我去.... 详情看官网:http://www.uploadify.com/documentatio ...

  7. iPhone 和 Galaxy高速拍照原理具体分析

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/zoosenpin/article/details/30027263 1 原理分析 首先我们看一下An ...

  8. (转)Android自定义属性时format选项( <attr format="reference" name="background" /> )

    Android自定义属性时format选项可以取用的值   1. reference:参考某一资源ID. (1)属性定义: [html] view plaincopyprint? <declar ...

  9. 7个去伪存真的JavaScript面试题

    1.创建JavaScript对象的两种方法是什么? 这是一个非常简单的问题,如果你用过JavaScript的话.你至少得知道一种方法.但是,尽管如此,根据我的经验,也有很多自称是JavaScript程 ...

  10. Spring链接汇总

    Spring Boot专题 基础入门内容 SpringBoot快速入门 Why Spring Boot 使用Intellij中的Spring Initializr来快速构建Spring Boot/Cl ...