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

mvtec3d

以bagel为例,其中有calibration、

bagel			# 百吉圈(硬面包)calibrationcamera_parameters.jsontestcombinedgt	# 缺陷部位的分割剪影pngrgb	# 原图pngxyz	# tiffcontamination	# 污染物同上crack同上good同上		hole同上		traingoodrgbxyzvalidationgood同trainclass_ids.json

camera_parameters.json

{"camera_type": "area_scan_division","focus": 0.0103431,"kappa": -2205.03,"sx": 3.74983e-06,"sy": 3.75e-06,"cx": 252.046,"cy": 450.07,"image_width": 800,"image_height": 800
}

class_ids.json如下
在这里插入图片描述
其余类别

cable_gland	缆线接头,缺陷:弯曲、末端破裂或者头部凹陷、洞、螺纹损坏
carrot	胡萝卜,缺陷:污染、裂纹、割痕、洞
cookie	饼干
dowel	暗榫(识图的话应该叫塑料膨胀管)
foam	鸡蛋托盘
peach
potato
rope	绞绳,缺陷:污染、裂痕、蓬松
tire

顺便记一下在gpt那问到的处理tiff的代码,可能用到?

import tifffile as tiff# Attempt to read the TIFF file using tifffile
try:tiff_data = tiff.imread(file_path)# Display the shape of the array to understand its dimensionstiff_data_shape = tiff_data.shape
except Exception as e:tiff_data_shape = str(e)tiff_data_shape
(800, 800, 3)

要从这种类型的图像中生成点云,我们可以遵循以下步骤:

将图像转换为灰度图。 遍历每个像素,使用其 x 和 y 坐标以及灰度值(作为 z 坐标)来生成点云。
我将进行这些转换并提供一个点云数据的示例。 ​​

# Convert the image to grayscale
gray_image = np.mean(tiff_data, axis=2)# Generate point cloud data 
points = [] 
for y in range(gray_image.shape[0]):for x in range(gray_image.shape[1]):z = gray_image[y][x]  # Grayscale value as heightpoints.append([x, y, z])# Convert to numpy array for better handling 
point_cloud = np.array(points)# Show the shape of the point cloud and a small sample of the data 
point_cloud_shape = point_cloud.shape 
point_cloud_sample = point_cloud[:5]  # First 5 points as a samplepoint_cloud_shape, point_cloud_sample 
((640000, 3),  
array([[0. , 0.        , 0.14262693],[1.        , 0.        , 0.14268805],[2.        , 0.        , 0.14277673],[3.        , 0.        , 0.14286469],[4.        , 0.        , 0.14295126]]))

成功将图像转换为点云数据。生成的点云由 640,000 个点组成,每个点有三个坐标:x, y, 和 z。
这些坐标中,x 和 y 是像素的位置,而 z 是基于灰度值的高度(或深度)。

现在你可以使用 CloudCompare、MeshLab 或其他点云可视化工具来查看和分析这些数据。如果你选择使用 Python 进行可视化,可以使用 matplotlib、plotly 或类似库来创建三维散点图。

dl

相关文章:

  • [架构之路-265]:目标系统 - 设计方法 - 软件工程 - 软件设计 - 如何做好详细设计
  • D9741 PWM控制器电路,定时闩锁、短路保护电路,输出基准电压(2.5V) 采用SOP16封装
  • 【UE5.1】程序化生成Nanite植被
  • 实战10 角色管理
  • redis 从0到1完整学习 (八):QuickList 数据结构
  • Android画布Canvas drawPath绘制跟随手指移动的圆,Kotlin
  • Springcloud Alibaba 使用Canal将MySql数据实时同步到Elasticsearch
  • Git三种方法从远程仓库拉取指定分支
  • Leetcode 2971. Find Polygon With the Largest Perimeter
  • C#实现串口通讯
  • Unity Shader 实现X光效果
  • 【Qt-Event-信号和槽】
  • go 语言程序设计第2章--程序结构
  • JS-图片预览
  • 图论 | 网络流的基本概念
  • ECS应用管理最佳实践
  • HTML5新特性总结
  • httpie使用详解
  • MD5加密原理解析及OC版原理实现
  • PHP 7 修改了什么呢 -- 2
  • Python爬虫--- 1.3 BS4库的解析器
  • Spark in action on Kubernetes - Playground搭建与架构浅析
  • Spring-boot 启动时碰到的错误
  • storm drpc实例
  • Vue 动态创建 component
  • 从tcpdump抓包看TCP/IP协议
  • 软件开发学习的5大技巧,你知道吗?
  • 提醒我喝水chrome插件开发指南
  • 为视图添加丝滑的水波纹
  • 学习使用ExpressJS 4.0中的新Router
  • 源码之下无秘密 ── 做最好的 Netty 源码分析教程
  • 中文输入法与React文本输入框的问题与解决方案
  • [地铁译]使用SSD缓存应用数据——Moneta项目: 低成本优化的下一代EVCache ...
  • Java数据解析之JSON
  • ​2021半年盘点,不想你错过的重磅新书
  • #{}和${}的区别是什么 -- java面试
  • (2)(2.4) TerraRanger Tower/Tower EVO(360度)
  • (4)事件处理——(2)在页面加载的时候执行任务(Performing tasks on page load)...
  • (层次遍历)104. 二叉树的最大深度
  • (附源码)计算机毕业设计SSM疫情居家隔离服务系统
  • (六)激光线扫描-三维重建
  • (没学懂,待填坑)【动态规划】数位动态规划
  • (转)Android中使用ormlite实现持久化(一)--HelloOrmLite
  • (状压dp)uva 10817 Headmaster's Headache
  • .htaccess 强制https 单独排除某个目录
  • .NET Core 网络数据采集 -- 使用AngleSharp做html解析
  • .NET 的程序集加载上下文
  • .Net 中Partitioner static与dynamic的性能对比
  • .net和php怎么连接,php和apache之间如何连接
  • .NET开发不可不知、不可不用的辅助类(三)(报表导出---终结版)
  • @JsonSerialize注解的使用
  • @Tag和@Operation标签失效问题。SpringDoc 2.2.0(OpenApi 3)和Spring Boot 3.1.1集成
  • @WebServiceClient注解,wsdlLocation 可配置
  • [ vulhub漏洞复现篇 ] JBOSS AS 4.x以下反序列化远程代码执行漏洞CVE-2017-7504
  • [.NET]桃源网络硬盘 v7.4