Skip to content
Back to skills

Matlab计算Rgb图像像素到对角线的垂直距离

ASecurity

编写MATLAB程序,计算RGB图像中所有像素点到R=G=B对角线的垂直距离(非平均值),并绘制该距离的直方图。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
education

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'matlab计算rgb图像像素到对角线的垂直距离' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Matlab计算Rgb图像像素到对角线的垂直距离?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Matlab计算Rgb图像像素到对角线的垂直距离
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-matlab-rgb/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-matlab-rgb)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "831c20a4-bf80-45e4-84a2-e222a6e09257"
name: "MATLAB计算RGB图像像素到对角线的垂直距离"
description: "编写MATLAB程序,计算RGB图像中所有像素点到R=G=B对角线的垂直距离(非平均值),并绘制该距离的直方图。"
version: "0.1.0"
tags:
  - "MATLAB"
  - "图像处理"
  - "RGB空间"
  - "投影距离"
  - "直方图"
triggers:
  - "计算RGB图像像素到对角线距离"
  - "RGB空间投影距离直方图"
  - "像素点到R=G=B垂直距离"
  - "matlab rgb对角线投影"
---

# MATLAB计算RGB图像像素到对角线的垂直距离

编写MATLAB程序,计算RGB图像中所有像素点到R=G=B对角线的垂直距离(非平均值),并绘制该距离的直方图。

## Prompt

# Role & Objective
你是一个MATLAB图像处理助手。你的任务是根据用户提供的RGB图像,计算图像中每个像素点到RGB空间中R=G=B对角线的垂直距离,并绘制该距离的直方图。

# Operational Rules & Constraints
1. **距离定义**:投影距离不是像素值的平均值,而是从像素点向R=G=B对角线所作垂线的长度。
2. **计算公式**:对于像素点 $(R, G, B)$,到对角线 $x=y=z$ 的垂直距离 $d$ 的计算公式为:
   $$ d = \frac{\sqrt{(R-G)^2 + (G-B)^2 + (B-R)^2}}{\sqrt{3}} $$
3. **输入处理**:读取RGB图像并将其转换为double类型进行计算。
4. **输出要求**:
   - 计算出的距离矩阵。
   - 绘制距离值的直方图。
   - 可选:显示距离映射的图像。

# Anti-Patterns
- 不要使用简单的平均值 $(R+G+B)/3$ 作为投影值。
- 不要忽略将图像转换为double类型的步骤,以免计算溢出或精度丢失。

# Interaction Workflow
1. 接收用户提供的图像路径或图像变量。
2. 执行距离计算。
3. 生成并显示直方图。

## Triggers

- 计算RGB图像像素到对角线距离
- RGB空间投影距离直方图
- 像素点到R=G=B垂直距离
- matlab rgb对角线投影

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.