很多时候,我们需要知道每个函数的运算周期,以提高程序的运行效率。知道运行时间对于图像算法处理很重要

Halcon提供相关的算子,我们先来看代码:

**获取图像处理时间
read_image(Image,'fuse')//读取图像
count_seconds(Seconds)//读取时间
threshold(Image, Region, , )//阈值分割
count_seconds(Seconds1)//读取时间
PTime:=(*(Seconds-Seconds1))//计算阈值分割时间
count_seconds(Seconds2)//读取时间
auto_threshold(Image, Regions, )//自动阈值分割
count_seconds(Seconds3)//读取时间
PTime2:=(*(Seconds3-Seconds2))//计算自动阈值分割时间

count_seconds()是当前的系统时间,这个时间的值以秒为单位,PTime计算的时间是以毫秒单位。实际上这两个算子都是在毫秒内完成的。

下面看一下控制延时的算子:wai_seconds()的用法。我们设置延时1秒。

**延时一秒
Image_Name:=['adhesive_bead_01','adhesive_bead_02','adhesive_bead_03','adhesive_bead_04','adhesive_bead_05',\
'adhesive_bead_06','adhesive_bead_07','adhesive_bead_ref']//设置图像
read_image(Image,'bead/'+Image_Name)//读取图像
channels_to_image(Image,Image)//把单通道图像转换为一个多通道图像
count_channels(Image, Channels)//计算图像通道 for index:= to Channels by
access_channel(Image,Channel,index)//获取多通道图像的一个通道
dev_display(Channel)
wait_seconds()//等待一秒
endfor phot_stereo(Image,Height,[,,,,,,,],[,,,,,,,])
for Index:= to by
shade_height_field(Height, ImageShade, , Index, , , 'false')
dev_display(ImageShade) endfor

最新文章

  1. Torch7学习笔记(二)nn Package
  2. 淘宝技术发展(Java时代:脱胎换骨)
  3. cocos2d-x动作原理
  4. <a>多颜色标签点击之后保持原色的一次实践, Ext Panel下解决及通用方案思路
  5. 解决UITableViewCell左侧分割线有空白的问题
  6. L12 samba服务器搭建
  7. Objective-c 截取子字符串
  8. Request.getparameternames 获取form表单里面所有的请求参数 。 返回一个Enumeration类型的枚举.
  9. burp基本使用
  10. vscode "find all references" 提示: no result found.
  11. vue2.0的初始化
  12. Android Service解析
  13. windows 下 react-native(v0.56) Android 环境搭建踩坑记录
  14. HTML&CSS精选笔记_列表与超链接
  15. Spring Boot 开发入门
  16. centos7系统nginx下phalcon环境搭建
  17. NetCore下模拟和使用Modbus工业通信协议
  18. linux权限及目录
  19. JSP导入包
  20. 【指数型母函数】hdu1521 排列组合

热门文章

  1. 松软科技课堂:SQL-LEFT-JOIN 关键字
  2. request对象的方法
  3. python语言程序设计部分习题
  4. 无法解析的外部符号,该符号在xxx函数中被引用
  5. git windows 安装 - Github同步 / Vscode源代码管理:Git 安装操作
  6. [Pandas] 01 - A guy based on NumPy
  7. Mysql学习笔记整理之选用B+tree结构
  8. pycharm最新版本激活码(永久有效) python安装教程
  9. Find the Multiple POJ-1426
  10. linux&shell学习系列