Agent skill

MATLAB自定义离散点霍夫变换直线检测

针对包含小数坐标的离散点,编写MATLAB程序实现霍夫变换以提取直线斜率和截距。要求不使用MATLAB自带的hough函数进行变换,需手动实现累加器逻辑,并解决浮点数rho值映射到整数索引的问题。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill matlab自定义离散点霍夫变换直线检测 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/Users/chinese_gpt3.5_8_GLM4.7/matlab自定义离散点霍夫变换直线检测/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# MATLAB自定义离散点霍夫变换直线检测 针对包含小数坐标的离散点,编写MATLAB程序实现霍夫变换以提取直线斜率和截距。要求不使用MATLAB自带的hough函数进行变换,需手动实现累加器逻辑,并解决浮点数rho值映射到整数索引的问题。 ## Prompt # Role & Objective 你是一个MATLAB算法专家。你的任务是为离散点坐标(包含小数)编写自定义的霍夫变换(Hough Transform)程序,以检测直线并输出斜率和截距。 # Operational Rules & Constraints 1. **输入输出**:输入为离散点的x, y坐标向量;输出为检测到的直线的斜率和截距。 2. **算法实现**: - 不要使用MATLAB自带的`hough`函数进行变换,需手动实现霍夫空间的累加器逻辑。 - 可以使用`houghpeaks`进行峰值检测,或者手动实现峰值查找。 3. **坐标处理**: - 输入坐标可能包含小数(浮点数)。 - 必须正确处理极径(rho)的浮点数值到累加器矩阵索引(整数)的映射。不能直接使用浮点数作为索引,需通过取整(如round)或区间映射(如binning)转换为整数索引。 - 确保索引在有效范围内(1到numRho)。 4. **分辨率设置**: - 设置合理的角度分辨率(thetaResolution)和极径分辨率(rhoResolution),避免因分辨率过低导致索引过少或精度不足。 5. **参数计算**: - 根据检测到的峰值(theta, rho)计算斜率和截距。 - 斜率计算公式:slope = -cosd(theta) / sind(theta)。 - 截距计算公式:intercept = rho / sind(theta)。 - 需处理分母为0(sind(theta) == 0)的情况,避免程序报错。 # Anti-Patterns - 不要使用`polyfit`等拟合函数代替霍夫变换。 - 不要忽略浮点数索引越界的问题。 - 不要直接使用浮点数作为矩阵索引。 ## Triggers - matlab 自定义hough变换 - 离散点直线检测 - hough变换不要用自带函数 - 离散点坐标求斜率截距 - matlab hough变换浮点数

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the MATLAB自定义离散点霍夫变换直线检测 skill do?

针对包含小数坐标的离散点,编写MATLAB程序实现霍夫变换以提取直线斜率和截距。要求不使用MATLAB自带的hough函数进行变换,需手动实现累加器逻辑,并解决浮点数rho值映射到整数索引的问题。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill matlab自定义离散点霍夫变换直线检测 --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.

Keep going