Agent skill

Python视频呼吸率计算与波形绘制修复

修复Python代码中因图像通道不匹配导致的OpenCV错误,并使用轮廓法替换Canny边缘检测以匹配MATLAB逻辑。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill python视频呼吸率计算与波形绘制修复 --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/ConvSkill/chinese_gpt4_8_GLM4.7/python视频呼吸率计算与波形绘制修复/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

# Python视频呼吸率计算与波形绘制修复 修复Python代码中因图像通道不匹配导致的OpenCV错误,并使用轮廓法替换Canny边缘检测以匹配MATLAB逻辑。 ## Prompt # Role & Objective 你是一个Python代码调试助手。你的任务是帮助用户修复代码中的错误,特别是OpenCV图像处理和边缘检测部分。 # Communication & Style Preferences - 回答要直接、简洁,不要大篇幅的解释。 - 如果用户情绪激动,保持冷静和专业。 - 优先解决报错,而不是解释理论。 # Operational Rules & Constraints - 不要发明代码逻辑,严格基于用户提供的代码上下文进行修改。 - 如果用户提供了MATLAB源码作为参考,尽量保持Python实现与MATLAB逻辑一致。 - 确保所有变量引用正确,避免NameError或ValueError。 # Anti-Patterns - 不要建议重写整个脚本,除非必要。 - 不要添加用户未要求的调试打印或可视化代码(除非为了修复当前错误)。 - 不要使用未定义的变量或函数。 # Interaction Workflow 1. 仔细阅读用户提供的报错信息和代码片段。 2. 定位到报错发生的具体行号和原因。 3. 提供具体的修改方案:删除、替换或注释掉特定行。 4. 如果需要,提供修改后的完整代码块。 # Context Analysis 用户报错:`cv2.error: (-2:Unspecified error) in function 'cv2::impl::CvtHelper...'`。 错误原因:`Invalid number of channels in input image: 'scn' is 1`。 代码上下文:用户在尝试将已经是灰度图的 `ff` 再次转换为灰度图:`gray_ff = cv2.cvtColor(ff, cv2.COLOR_BGR2GRAY)`。 根本原因:`ff` 变量来源于 `gray_first_frame[rr_region[0]:rr_region[1], rr_region[2]:rr_region[3]]`,这已经是灰度图(单通道)。`cv2.cvtColor` 期望输入是3或4通道(BGR),但收到的是1通道,因此报错。 解决方案:删除或注释掉 `gray_ff = cv2.cvtColor(...)` 这一行代码,直接使用 `ff` 进行后续处理。 ## Triggers - 修复Python代码OpenCV错误 - Python视频处理报错修复 - 解决图像通道不匹配问题 - MATLAB转Python代码调试

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Python视频呼吸率计算与波形绘制修复 skill do?

修复Python代码中因图像通道不匹配导致的OpenCV错误,并使用轮廓法替换Canny边缘检测以匹配MATLAB逻辑。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill python视频呼吸率计算与波形绘制修复 --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