00. 目录

文章目录

  • 00. 目录
  • 01. 概述
  • 02. 签名
  • 03. 描述
  • 04. 注意
  • 05. 参数
  • 06. 结果
  • 07. 附录

01. 概述

dev_set_shape - 定义region显示形状。

02. 签名

dev_set_shape( : : Shape : )

03. 描述

dev_set_shape定义了用于显示region的形状。 可用的形状可以用query_shape查询。

支持下列形状:

’original’:

显示的形状不变。 尽管如此,可以通过dev_set_line_width的算子修改参数。 对于所有其他形状也是如此。

’outer_circle’:

每个region由最小的外接圆显示。 (见smallest_circle)

’inner_circle’:

每个region由最大的内接圆显示。 (见inner_circle。)

’ellipse’:

每个region以近似的椭圆(有相同的相矩和方向)显示(见elliptic_axis)。

’rectangle1’:

每个region由平行于坐标轴的最小的外接矩形显示。 (见smallest_rectangle1。)

’rectangle2’:

每个region由最小的外接矩形显示。 (见smallest_rectangle2。)

’convex’:

每个region都由其凸包(convex hull)显示(见shape_trans。)

’icon’:

每个region都在其重心处用set_icon设置的icon来显示。

有关更多信息,请参阅算子set_shape的说明。 但是,与算子set_shape相反,此算子选定的形状也适用于之后打开的所有新图形窗口。

原文描述

dev_set_shape defines the shape that is used for displaying regions. The available shapes can be queried with query_shape.

These shapes are supported:

‘original’:
The shape is displayed unchanged. Nevertheless modifications via parameters like dev_set_line_width can take place. This is also true for all other modes.

‘outer_circle’:
Each region is displayed by the smallest surrounding circle. (See smallest_circle.)

‘inner_circle’:
Each region is displayed by the largest included circle. (See inner_circle.)

‘ellipse’:
Each region is displayed by an ellipse with the same moments and orientation (See elliptic_axis.)

‘rectangle1’:
Each region is displayed by the smallest surrounding rectangle parallel to the coordinate axes. (See smallest_rectangle1.)

‘rectangle2’:
Each region is displayed by the smallest surrounding rectangle. (See smallest_rectangle2.)

‘convex’:
Each region is displayed by its convex hull (See shape_trans.)

‘icon’:
Each region is displayed by the icon set with set_icon in the center of gravity.

For more information see the description of the operator set_shape. However, in contrast to that operator the selected shape is also used for all new graphics windows that are opened afterwards.

04. 注意

使用HDevelop的代码导出功能,为该算子生成的代码可能与相关的HALCON算子具有不同的行为。 有关将HDevelop图形算子导出为不同编程语言的代码的详细说明,请参阅“HDevelop User’s Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。

05. 参数

Shape (input_control)   string → (string)
  Region output mode.
  Default value: ‘original’
  List of values: ‘convex’, ‘ellipse’, ‘icon’, ‘inner_circle’, ‘original’, ‘outer_circle’, ‘rectangle1’, ‘rectangle2’

HDevelop例程

lettert.hdev Train printed characters and reclassify them
letter.hdev Read printed characters with interactive selection
engravedt.hdev Train characters on a metal surface
engraved_cnn.hdev Read characters on a metal surface with a CNN-based OCR classifier
engraved.hdev Read characters on a metal surface with a MLP-based OCR classifier
dotprt.hdev Read a dot print
display_operators.hdev Visualize results
bottlet.hdev Train numbers on a beer bottle

程序示例

read_image(Image,'monkey')
threshold(Image,Region,128,255)
connection(Region,Regions)
dev_set_shape('rectangle1')
dev_set_draw('margin')
dev_set_line_width(5)
dev_clear_window()
dev_display(Regions)

06. 结果

如果指定参数的值正确,则dev_set_shape返回2(H_MSG_TRUE)。 否则会引发异常并返回错误代码

07. 附录

7.1 机器视觉博客汇总
网址:https://dengjin.blog.csdn.net/article/details/116837497

【机器视觉】 dev_set_shape算子相关推荐

  1. 机器视觉 边缘检测算子

    1.实验目的 利用opencv python实现对下图实现边缘检测算子. 2.实验过程 (1)在python安装opencv库, pip install opencv-python. (2)在pyth ...

  2. 【机器视觉】机器视觉博客汇总

    00. 目录 文章目录 00. 目录 01. 机器视觉概述 02. 机器视觉环境搭建 03. Halcon初级教程 04. Halcon中级教程 05. Halcon高级教程 06. Halcon与Q ...

  3. 拉普拉斯噪声公式_高斯拉普拉斯算子(Laplace of Gaussian)

    高斯拉普拉斯(Laplace of Gaussian) Laplace算子作为一种优秀的边缘检测算子,在边缘检测中得到了广泛的应用.该方法通过对图像 求图像的二阶倒数的零交叉点来实现边缘的检测,公式表 ...

  4. python 视觉技术_python+opencv实现机器视觉基础技术(边缘提取,图像滤波,边缘检测算子,投影,车牌字符分割)...

    机器视觉是人工智能正在快速发展的一个分支.简单说来,机器视觉就是用机器代替人眼来做测量和判断.它是一项综合技术,包括图像处理.机械工程技术.控制.电光源照明.光学成像.传感器.模拟与数字视频技术.计算 ...

  5. 【机器视觉】 write_measure算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 write_measure - 将measure对 ...

  6. 【机器视觉】 translate_measure算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 translate_measure - 转换一个m ...

  7. 【机器视觉】 set_fuzzy_measure_norm_pair算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 set_fuzzy_measure_norm_pa ...

  8. 【机器视觉】 set_fuzzy_measure算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 set_fuzzy_measure - 指定一个模 ...

  9. 【机器视觉】 serialize_measure算子

    00. 目录 文章目录 00. 目录 01. 概述 02. 签名 03. 描述 04. 注意 05. 参数 06. 结果 07. 附录 01. 概述 serialize_measure - 序列化me ...

最新文章

  1. Anaconda 使用初步
  2. 工作流技术杂谈 --- 2008
  3. java反序列化后不相等_Jackson:使用不同的属性名称序列化/反序列化 - java
  4. 3rd,Python登录模拟
  5. 如何用深度学习 AI 美颜实现天天 P 图疯狂变脸算法? | 技术头条
  6. 2018腾讯内部转岗面试题2——打印A-Z 26个字母的所有子集
  7. 用Java获取当前工作目录
  8. Verizon:2013年数据破坏调查报告(DBIR)【更新版】
  9. react-native学习小结
  10. DSP28335学习记录(一)
  11. 谷歌云实现Google Drive无限空间离线下载(完美版)
  12. 【Esri联邦大会】看点13: “NOAA National Hurricane Center”:应急应用
  13. 轻松搞出一个云盘项目(一),一般人我不告诉哦。
  14. 线程池java submit,详解线程池execute和submit用法
  15. 比较简单的单间租房协议!
  16. CSS FlexBox布局全面详解
  17. loop variable ‘numerator‘ creates a copy from type ‘const std::string‘ [-Wrange-loop-construct]
  18. TypeError: catching classes that do not inherit from BaseException is not allowed
  19. Jenkins Pipeline 小试牛刀以及引入指定的环境变量
  20. 关于lua中显示绝对时间和相对时间

热门文章

  1. Visual Studio 技能GET
  2. size_t和ssie_t的区别
  3. 详解WinCE下USB Host驱动开发(2)
  4. MS讲座:可视化的软件架构设计和Portal Starter Kit挖宝记
  5. vs2017 linux so导出函数,将Visual Studio 2017中的Assembly和C ++与命令行和输出相结合
  6. 近似求PI(15 分)
  7. Java黑皮书课后题第7章:*7.13(随机数选择器)编写一个方法,返回1到54之间的随机数,但不能是传递到实参中的数。指定如下方法头
  8. Java黑皮书课后题第5章:*5.51(最长的共同前缀)编写一个程序,提示用户输入两个字符串,显示两个字符串最长的共同前缀
  9. Java黑皮书课后题第5章:*5.1(统计正数和负数的个数然后计算这些数的平均值)编写程序,读入未指定个数的整数,判断读入的正数有多少个、负数有多少个,然后计算输入值的总和和平均值(不记0,浮点表示)
  10. datetime模块