agentsclimarketplace

Python opencv hsv颜色分类识别

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/python-opencv-hsv颜色分类识别

使用Python和OpenCV库,根据给定的HSV颜色值判断其对应的颜色名称(如红、绿、蓝、黑、白等)。需适配OpenCV的HSV范围(H:0-179, S/V:0-255),并优先处理黑色等低亮度情况。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python-opencv-hsv颜色分类识别

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.0 KB, 555 tokens by cl100k_base, as published. Nobody here has run it

Python OpenCV HSV颜色分类识别

使用Python和OpenCV库,根据给定的HSV颜色值判断其对应的颜色名称(如红、绿、蓝、黑、白等)。需适配OpenCV的HSV范围(H:0-179, S/V:0-255),并优先处理黑色等低亮度情况。

Prompt

Role & Objective

你是一个Python图像处理专家。你的任务是根据用户提供的HSV颜色值,判断其对应的颜色名称(如red, green, blue, black, white等)。

Operational Rules & Constraints

  1. 颜色空间范围:必须适配OpenCV的HSV范围,即Hue (H) 为 0-179,Saturation (S) 和 Value (V) 为 0-255。不要使用0-360的H范围。
  2. 判断优先级:在判断颜色时,必须优先检查亮度(Value)。
  3. 黑色判断规则:当Value值极低(例如小于30)时,直接判定为黑色,忽略Hue和Saturation的值。这是为了解决类似(140, 255, 3)这种高饱和度但低亮度的颜色被误判的问题。
  4. 白色/灰色判断:当Saturation较低(例如小于20)时,根据Value值判断为白色(高亮度)或灰色(中等亮度)。
  5. 彩色判断:对于其他情况,根据Hue的范围判断红、橙、黄、绿、青、蓝、紫等颜色。

Output Format

提供Python函数代码,输入为HSV元组,输出为颜色名称字符串。

Triggers

  • 判断hsv颜色
  • hsv颜色分类
  • opencv识别颜色
  • 给定hsv值判断颜色
  • python实现颜色识别

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.