← Back to Skills Marketplace
xrayxiaoruiyang-pixel

Afm Image Analysis 1.0.0

by xrayxiaoruiyang-pixel · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
85
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install afm-image-analysis-1-0-0
Description
Analyze AFM images to compute surface roughness, detect nanoparticles, extract line profiles, generate 3D renderings, and process batches with detailed reports.
README (SKILL.md)

afm-image-analysis-1.0.0

AFM图像分析工具 — 表面粗糙度、纳米颗粒统计、线轮廓、3D可视化、批量处理

快速使用

# 单文件
python ~/.openclaw/skills/afm-image-analysis-1.0.0/scripts/analyze_afm.py sample.afm -o ./output

# 批量目录
python ~/.openclaw/skills/afm-image-analysis-1.0.0/scripts/analyze_afm.py ./afm_data/ -o ./output -r

# 带线轮廓(px坐标)
python analyze_afm.py sample.npy --profile 100,50,400,250 -o ./out

输入格式

格式 说明
.npy/.npz NumPy 二进制数组(推荐)
.txt/.csv/.asc/.dat 文本矩阵,空白分隔或CSV
.jpg/.png/.tif 图像文件(灰度→高度映射)

⚠️ 图像模式默认 1 gray level = 1 nm,用 --scale 调整。

功能模块

1. 表面粗糙度(自动平面校正)

Ra(nm)    — 算术平均粗糙度(最常用)
Rq(nm)    — 均方根粗糙度
Rpv(nm)   — 峰谷总值 (max−min)
Rsk       — 偏度(对称性)
Rku       — 峰度(分布锐度)
Ra_g(nm)  — 高斯滤波粗糙度

步骤:①一阶平面拟合去倾斜 ②计算粗糙度参数

2. 纳米颗粒/突起检测

  • Otsu自动阈值分割
  • OpenCV连通域分析
  • 等效圆直径 (Ø_eq = 2√(area/π))
  • 高度统计(mean/max/min)
  • 批量CSV导出

3. 线轮廓截面

指定两个像素坐标,提取沿线的 높이变化曲线:

--profile x1,y1,x2,y2

4. 3D表面渲染

LightSource shading,颜色映射 terrain,垂直夸张 2×。

5. 批量处理

# 递归扫描
python analyze_afm.py ./afm_data/ -r -o ./afm_results/

输出文件

每个输入文件生成独立子目录({文件名}/):

文件 内容
afm_heatmap.png AFM高度热图
afm_3d.png 3D表面渲染图
roughness.png 粗糙度参数柱状图
roughness.csv 粗糙度数据表
particles_annotated.png 颗粒标注图
particle_hist.png 颗粒直径/高度分布直方图
particles.csv 颗粒详细数据
line_profile.png 线轮廓截面图
report.json 完整JSON报告

根目录额外输出:summary.csv(多文件汇总表)

常用参数

参数 说明 默认值
--threshold 颗粒检测阈值(%) 20
--min-size 最小颗粒面积(px) 10
--scale 灰度→nm比例 auto/1.0
--no-3d 跳过3D渲染 False
-r 递归扫描子目录 False

典型分析场景

催化剂薄膜粗糙度评估:

python analyze_afm.py catalyst_film.npy -o ./results
# → 查看 Ra/Rq 判断表面平整度(Ra\x3C5nm 很平整,Ra>30nm 较粗糙)

纳米颗粒尺寸统计:

python analyze_afm.py nano_particles.npy --threshold 25 --min-size 15 -o ./np_stats

批量对比不同样品:

python analyze_afm.py ./sample_series/ -r -o ./compare/
# → 对比 summary.csv 中 Ra/Rq 值

技术栈

  • numpy — 数据处理
  • opencv-python — 连通域/阈值分割
  • scipy — 平面拟合/统计分析
  • matplotlib — 全套绘图
  • numpy/csv — 报告导出
Usage Guidance
This skill appears coherent for local AFM image analysis: it runs a Python script that reads local files and writes analysis/plots. Before installing or running: (1) inspect the remainder of scripts/analyze_afm.py (the provided preview was truncated) to confirm there are no network calls or hidden behaviors; (2) ensure the required Python packages (numpy, scipy, opencv-python, matplotlib) are installed in a contained environment (venv/conda) to avoid dependency conflicts; (3) run the tool on non-sensitive sample data first to verify outputs; and (4) run it with least privilege (no elevated/system directories) so outputs are isolated. If you want, provide the rest of the script and I can re-check for any network or exfiltration code and raise the confidence level.
Capability Analysis
Type: OpenClaw Skill Name: afm-image-analysis-1-0-0 Version: 1.0.0 The skill bundle provides a legitimate tool for Atomic Force Microscopy (AFM) image analysis, including surface roughness calculation, nanoparticle statistics, and 3D visualization. The Python script `analyze_afm.py` uses standard scientific libraries (NumPy, SciPy, OpenCV, Matplotlib) to process data and generate reports, with no evidence of malicious intent, data exfiltration, or unauthorized system access.
Capability Assessment
Purpose & Capability
Name/description (AFM image analysis) match the included SKILL.md and the Python script: functions compute roughness, detect particles, extract profiles, produce plots and reports. Required tools (numpy, scipy, opencv, matplotlib) are exactly what such a tool needs — nothing extraneous like cloud credentials or unrelated binaries is requested.
Instruction Scope
SKILL.md instructs the agent/user to run the included Python script on local files or directories and describes expected input/output files. The instructions do not ask the agent to read unrelated system files, secrets, or send data to remote endpoints. They are narrowly scoped to file processing and plotting.
Install Mechanism
No install spec is provided (instruction-only skill) and the script expects standard Python packages. There are no downloads, archives, or third-party installers embedded in the skill metadata.
Credentials
The skill declares no environment variables, credentials, or config paths. The runtime code also contains no obvious access to environment secrets or external service tokens in the reviewed portion.
Persistence & Privilege
Flags show no always:true and the skill is user-invocable only. It does not request persistent system-wide privileges or modify other skills' configuration in the reviewed content.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install afm-image-analysis-1-0-0
  3. After installation, invoke the skill by name or use /afm-image-analysis-1-0-0
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of AFM image analysis tool - Analyze surface roughness with automated plane correction and multiple roughness parameters (Ra, Rq, Rpv, Rsk, Rku, Ra_g) - Detect and quantify nanoparticles or protrusions, outputting statistics and annotated images - Extract line profiles between specified coordinates for cross-sectional analysis - 3D surface rendering with shading and vertical exaggeration - Batch process support for multiple files or directories, detailed per-file outputs and summary CSV - Supports various AFM data formats: NumPy arrays, text/csv, and grayscale images
Metadata
Slug afm-image-analysis-1-0-0
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Afm Image Analysis 1.0.0?

Analyze AFM images to compute surface roughness, detect nanoparticles, extract line profiles, generate 3D renderings, and process batches with detailed reports. It is an AI Agent Skill for Claude Code / OpenClaw, with 85 downloads so far.

How do I install Afm Image Analysis 1.0.0?

Run "/install afm-image-analysis-1-0-0" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Afm Image Analysis 1.0.0 free?

Yes, Afm Image Analysis 1.0.0 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Afm Image Analysis 1.0.0 support?

Afm Image Analysis 1.0.0 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Afm Image Analysis 1.0.0?

It is built and maintained by xrayxiaoruiyang-pixel (@xrayxiaoruiyang-pixel); the current version is v1.0.0.

💬 Comments