当前位置: 首页 > news >正文

调试代码0

dev_update_off ()
* read_image (Image, 'C:/Users/Public/Documents/MVTec/HALCON-12.0/examples/images/smd/smd_on_chip_01.png')
read_image (Image, 'D:/图像文件/图片/图片/基板/20230609-103004-0.bmp')
get_image_size (Image, Width, Height)
* dev_close_window ()
* dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
* set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
* dev_set_color ('green')
* dev_set_draw ('margin')

* draw_rectangle2 (WindowHandle, Row1, Column1, Phi, Length1, Length2)
gen_rectangle2 (Rectangle, 1160.3527336860, 1339.7735849056,0.10059596322155395, 486.22061690051726, 452.83619153113818)
area_center (Rectangle, Area, RowRef, ColumnRef)
reduce_domain (Image, Rectangle, ImageReduced)
create_ncc_model (ImageReduced, 'auto', rad(-45), rad(90), 'auto', 'use_polarity', ModelID)
dev_display (Image)
dev_display (Rectangle)
* disp_continue_message (WindowHandle, 'black', 'true')
stop ()
list_files ('D:/图像文件/图片/图片/基板', 'files', ImageFiles)
tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima)$','ignore_case'], ImageFiles)  
for J := 0 to |ImageFiles| by 1
    read_image (Image1, ImageFiles[J])
    find_ncc_model (Image, ModelID,rad(-45), rad(90), 0.5, 1, 0.5, 'true', 0, Row, Column, Angle, Score)
    gen_cross_contour_xld (Cross, Row, Column, 6, Angle)
    vector_angle_to_rigid (RowRef, ColumnRef, -0, Row, Column, Angle, HomMat2D)
    affine_trans_region (Rectangle, RegionAffineTrans, HomMat2D, 'nearest_neighbor')
    gen_contour_region_xld (RegionAffineTrans, Contours, 'border')
    dev_display (Image1)
    dev_display (Contours)
*     if (J < 11)
*         disp_continue_message (WindowHandle, 'black', 'true')
*     endif
    stop ()
endfor
clear_ncc_model (ModelID)

http://www.lryc.cn/news/224767.html

相关文章:

  • 【C++心愿便利店】No.12---C++之探索string底层实现
  • Android Studio(列表视图ListView)
  • 让深度神经网络绘画以了解它们是如何工作的
  • https://www.jianshu.com/p/34bf240b85a9
  • 如何导出PPT画的图为高清图片?插入到world后不压缩图像的设置方法?
  • 【Spring】Spring IOC DI
  • 一招解密网络流量瓶颈!
  • 某校帮签到小程序m 加密参数解析
  • Node.js |(六)express框架 | 尚硅谷2023版Node.js零基础视频教程
  • 包教包会:Mysql主从复制搭建
  • Subset Selection
  • 【测开求职】面试题:计算机网络 精简版整理
  • 设计模式-代理模式(delegate)
  • MongoDB 安装与配置
  • rabbitMq创建交换机,以及路由键绑定队列教程
  • odoo16前端框架源码阅读——ormService.js
  • 详谈滑动窗口算法与KMP算法区别以及二者在什么场景下使用
  • k8s、数据存储
  • Vue生命周期全解析:从工厂岗位到任务执行,一览无遗!
  • 常见产品结构四大类型 优劣势比较
  • 如何优雅的开发?试试这个低代码项目
  • 个人开发常用idea插件
  • 如何使用ArcGIS Pro制作个性三维地形图
  • 支撑企业数字化经营,《2023指标平台白皮书》正式发布
  • 【Linux】Linux的两种连接文件方法(ln | 符号链接和硬链接)
  • vue 点击滑动到页面指定位置(点击下滑滚动)的功能
  • LCD婴儿电子秤pcba/芯片方案设计
  • 2023年开发语言和数据库排行
  • 实现http请求-hutool
  • Ubuntu22.04 FTP 搭建以及挂载