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

用lines_gauss的width属性提取缺陷

自己做了一个图,这个图放在资源里了

结果图是这样(这里只结算了窄区)

代码和备注如下


read_image (Image11, 'C:/Users/Administrator/Desktop/分享/15/11.png')
rgb1_to_gray (Image11, GrayImage)
invert_image (GrayImage, ImageInvert)
threshold (ImageInvert, Region, 128, 255)
dilation_circle (Region, RegionDilation, 5)
reduce_domain (ImageInvert, RegionDilation, ImageReduced)
***线宽大概是10
calculate_lines_gauss_parameters (12,240, Sigma, Low, High)
lines_gauss (ImageReduced, Lines,Sigma, Low, High, 'light', 'true', 'bar-shaped', 'true')
clip_end_points_contours_xld (Lines, Lines, 'num_points', 10)
get_contour_xld (Lines, Row, Col)
get_contour_attrib_xld (Lines, 'width_right', r_width)
get_contour_attrib_xld (Lines, 'width_left', l_width)
widths:=(r_width+l_width)/2***看看跟邻居的比例情况
mean_width :=sort(widths)[round(|widths|*0.5)]
low_width:=mean_width*0.8
high_width:=mean_width*1.1tuple_less_elem (widths, low_width, Less)
tuple_find (Less, 1, Indices)rows:=Row[Indices]
colums:=Col[Indices]
gen_circle (Circle, rows, colums, 2)union1 (Circle, RegionUnion)
connection (RegionUnion, ConnectedRegions)
area_center (ConnectedRegions, Area, Row1, Column)
gen_circle (Circle2, Row1, Column,20)
dev_display (Image11)
dev_display (Circle2)

http://www.dtcms.com/a/264351.html

相关文章:

  • 视频内存太大怎么压缩变小一点?视频压缩的常用方法
  • 复现nanoGPT——train.py(详细版拆解)
  • k8s将service的IP对应的不同端口分配到不同的pod上
  • 【普通人学AI】玩转 Prompt 提示词工程 (一)
  • 使用 icinga2 写入 TDengine
  • 翻译《The Old New Thing》- 解除路径的 MAX_PATH 限制仅适用于路径本身
  • 通过http调用来访问neo4j时报错,curl -X POST 执行指令报错
  • C# 程序:查看 PageUp 热键消息映射表
  • torch.nn
  • Vue 安装使用教程
  • [Python] -基础篇8-Python中的注释与代码风格PEP8指南
  • muduo
  • SQL学习笔记6
  • OpenCV篇——项目(一)OCR识别读取银行卡号码
  • 在 Docker 容器中使用内网穿透
  • ubuntu 安装QT
  • 【python】三元表达式
  • Jeecg前端经验汇总
  • 扫描电子显微镜(SEM)夏令营面试基础题及答案
  • 五个元素一行均分三个换行且有间距,如何均分布局
  • 设计模式之上下文对象设计模式
  • 机器学习在智能金融风险评估中的应用:信用评分与欺诈检测
  • 电脑键盘不能打字了怎么解决 查看恢复方法
  • 无人机一机多控技术要点难点
  • Redis 概述及安装
  • 设计模式之组合模式
  • RabbitMQ:消息队列的轻量级王者
  • 系统安全之大模型案例分析
  • 用openCV实现基础的人脸检测与情绪识别
  • 磐维数据库panweidb3.1.0单节点多实例安装