MATLAB离散点Hough变换直线检测

实现离散点Hough变换算法,输入包含浮点数的坐标点,输出检测到的直线斜率和截距,不使用MATLAB自带函数

16 stars

Best use case

MATLAB离散点Hough变换直线检测 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

实现离散点Hough变换算法,输入包含浮点数的坐标点,输出检测到的直线斜率和截距,不使用MATLAB自带函数

Teams using MATLAB离散点Hough变换直线检测 should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/matlab-hough/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/matlab-hough/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/matlab-hough/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How MATLAB离散点Hough变换直线检测 Compares

Feature / AgentMATLAB离散点Hough变换直线检测Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

实现离散点Hough变换算法,输入包含浮点数的坐标点,输出检测到的直线斜率和截距,不使用MATLAB自带函数

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# MATLAB离散点Hough变换直线检测

实现离散点Hough变换算法,输入包含浮点数的坐标点,输出检测到的直线斜率和截距,不使用MATLAB自带函数

## Prompt

# Role & Objective
实现一个MATLAB函数,对输入的离散点坐标(包含小数)进行Hough变换,检测直线并输出斜率和截距。不使用MATLAB自带的hough函数。

# Communication & Style Preferences
- 使用MATLAB语法编写
- 代码注释清晰
- 输出格式为斜率和截距

# Operational Rules & Constraints
1. 输入参数:x坐标向量和y坐标向量
2. 设置角度分辨率thetaResolution和极径分辨率rhoResolution
3. 计算numTheta = ceil(180/thetaResolution)
4. 计算点集范围D = sqrt((max(x)-min(x))^2 + (max(y)-min(y))^2)
5. 计算numRho = ceil(D/rhoResolution)
6. 初始化Hough累加器H = zeros(numRho, numTheta)
7. 遍历每个点,对每个角度计算rho = x(i)*cosd(theta) + y(i)*sind(theta)
8. 使用rhoIdx = round(rho)确保索引为整数
9. 检查rhoIdx在有效范围内:if rhoIdx >= 1 && rhoIdx <= numRho
10. 设置阈值threshold = 0.5 * max(H(:))
11. 使用houghpeaks检测峰值
12. 计算斜率:slope = -cosd(theta) / sind(theta)
13. 计算截距:intercept = rho / sind(theta)
14. 避免除以0:检查sind(theta) ~= 0

# Anti-Patterns
- 不要使用polyfit等拟合函数
- 不要使用MATLAB自带的hough函数进行变换
- 不要忽略浮点数坐标的处理
- 不要忽略索引边界检查

# Interaction Workflow
1. 接收x,y坐标向量
2. 执行Hough变换
3. 检测峰值
4. 计算并输出直线参数

## Triggers

- 离散点Hough变换
- MATLAB直线检测
- 浮点坐标直线提取
- 不用自带函数的Hough变换
- 离散点斜率截距计算

Related Skills

thoughtful-and-accurate-responses

16
from diegosouzapw/awesome-omni-skill

Instructs the AI to provide accurate, factual, and thoughtful answers, emphasizing reasoning and accuracy in all contexts.

copilot-thought-logging

16
from diegosouzapw/awesome-omni-skill

See process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed Triggers on: **

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

moai-lang-{{LANGUAGE_SLUG}}

16
from diegosouzapw/awesome-omni-skill

{{LANGUAGE_NAME}} best practices with modern frameworks, {{PRIMARY_DOMAIN}}, and performance optimization for 2025

moai-lang-elixir

16
from diegosouzapw/awesome-omni-skill

Elixir 1.17+ development specialist covering Phoenix 1.7, LiveView, Ecto, and OTP patterns. Use when developing real-time applications, distributed systems, or Phoenix projects.

moai-lang-csharp

16
from diegosouzapw/awesome-omni-skill

Enterprise C# 13 development with .NET 9, async/await, LINQ, Entity Framework Core, ASP.NET Core, and Context7 MCP integration for modern backend and enterprise applications.

moai-foundation-memory

16
from diegosouzapw/awesome-omni-skill

Persistent memory across sessions using MCP Memory Server for user preferences, project context, and learned patterns

moai-domain-frontend

16
from diegosouzapw/awesome-omni-skill

Enterprise Frontend Development with AI-powered modern architecture, Context7 integration, and intelligent component orchestration for scalable user interfaces

moai-context7-lang-integration

16
from diegosouzapw/awesome-omni-skill

Enterprise-grade Context7 MCP integration patterns for language-specific documentation access with real-time library resolution and intelligent caching

moai-cc-permission-mode

16
from diegosouzapw/awesome-omni-skill

Claude Code permission configuration and policy management strategies for enterprise security. Covers permission modes, tool access control, whitelist/blacklist patterns, and enterprise deployment best practices.

moai-baas-cloudflare-ext

16
from diegosouzapw/awesome-omni-skill

Enterprise Cloudflare Edge Platform with AI-powered edge computing architecture, Context7 integration, and intelligent global orchestration for scalable modern applications

moai-baas-clerk-ext

16
from diegosouzapw/awesome-omni-skill

Enterprise Clerk Authentication Platform with AI-powered modern identity architecture, Context7 integration, and intelligent user management orchestration for scalable applications