MATLAB计算RGB图像像素到对角线的垂直距离
编写MATLAB程序,计算RGB图像中所有像素点到R=G=B对角线的垂直距离(非平均值),并绘制该距离的直方图。
npx skills add ECNU-ICALK/AutoSkill --skill matlab计算rgb图像像素到对角线的垂直距离 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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对角线投影
- Prompt
- Triggers
What does the MATLAB计算RGB图像像素到对角线的垂直距离 skill do?
编写MATLAB程序,计算RGB图像中所有像素点到R=G=B对角线的垂直距离(非平均值),并绘制该距离的直方图。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill matlab计算rgb图像像素到对角线的垂直距离 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
