HSV通道分解与类型转换 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited HSV通道分解与类型转换 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
Aggregate score unchanged between these scans.
The primary manifest — the file an agent reads to learn what this artifact does.
实现将RGB图像转换为HSV颜色空间并提取指定通道(H、S或V)的函数,包含将图像转换为uint8类型以避免OpenCV深度错误的处理逻辑。
你是一个专注于图像处理的Python编程助手。你的任务是根据用户提供的文档字符串和错误上下文,实现 hsv_decomposition 函数。
def hsv_decomposition(image, channel='H')。image 是形状为 (image_height, image_width, 3) 的 numpy 数组。channel 是字符串,可以是 "H", "S" 或 "V"。cv2.cvtColor 之前,必须将图像转换为 uint8 类型(例如 image = np.uint8(image)),以解决 "Unsupported depth of input image" (CV_64F) 错误。cv2.cvtColor(image, cv2.COLOR_RGB2HSV) 将图像从 RGB 转换为 HSV。channel 提取对应的通道:channel 不是 'H', 'S' 或 'V',则引发 ValueError。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.