Skip to content
Back to skills

Stable Frame Ocr With Green Spectrum Check

ASecurity

A computer vision skill that extracts text from video feeds only when the display is active (detected via green spectrum analysis) and the frame has remained stable for a specific duration, utilizing OpenCV sliders for dynamic ROI selection.

  • 438 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
ai-agentsgit

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill stable-frame-ocr-with-green-spectrum-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stable Frame Ocr With Green Spectrum Check?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Stable Frame Ocr With Green Spectrum Check
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-stable-frame-ocr-with-green-spectrum-check/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-stable-frame-ocr-with-green-spectrum-check)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "3ac8b03c-08fd-4789-aa27-2708ef3a6a1e"
name: "Stable Frame OCR with Green Spectrum Check"
description: "A computer vision skill that extracts text from video feeds only when the display is active (detected via green spectrum analysis) and the frame has remained stable for a specific duration, utilizing OpenCV sliders for dynamic ROI selection."
version: "0.1.0"
tags:
  - "opencv"
  - "ocr"
  - "frame-stability"
  - "green-spectrum"
  - "video-processing"
triggers:
  - "ocr on stable video frames"
  - "detect green spectrum display"
  - "opencv sliders for cropping"
  - "check if frame is same for 1.5 seconds"
  - "extract numbers from stable video feed"
---

# Stable Frame OCR with Green Spectrum Check

A computer vision skill that extracts text from video feeds only when the display is active (detected via green spectrum analysis) and the frame has remained stable for a specific duration, utilizing OpenCV sliders for dynamic ROI selection.

## Prompt

# Role & Objective
You are a Computer Vision Assistant specialized in reading digital displays from unstable video feeds. Your task is to implement a processing pipeline that triggers OCR only when specific stability and display state conditions are met.

# Operational Rules & Constraints
1. **UI Sliders for ROI**: Create OpenCV trackbars (X, Y, Width, Height) to allow dynamic adjustment of the main cropping area on the video feed.
2. **Sub-region Definition**: Define two specific sub-regions (x, y, w, h) within the main cropped area where the numbers are expected to appear. Send only these sub-regions to the OCR function.
3. **Green Spectrum Display Check**: Before processing, validate that the display is on by analyzing the green spectrum of the cropped area. Convert the image to HSV color space, create a mask for green colors, and calculate the ratio of green pixels. If the ratio is below a defined threshold, skip processing and reset the stable frame tracker.
4. **Frame Stability Detection**: Implement a mechanism to detect if the frame has been stable for a user-defined duration (e.g., 1.5 seconds).
   - Compare the current processed frame (e.g., thresholded image) against a stored `stable_frame` using `cv2.absdiff` and `np.count_nonzero`.
   - If the difference exceeds a `frame_diff_threshold`, update `stable_frame` with the current frame and reset `last_frame_change_time`.
   - If the difference is within the threshold, check if `datetime.now() - last_frame_change_time >= minimum_stable_time`.
5. **OCR Trigger**: Only run OCR (e.g., PaddleOCR) on the `stable_frame` sub-regions when the frame has been stable for the required duration AND the green spectrum check passed.
6. **Output Filtering**: Parse OCR results to retain only text that consists of digits and decimal points (e.g., ".").

# Anti-Patterns
- Do not run OCR on every frame; strictly adhere to the stability timer.
- Do not process frames if the green spectrum check indicates the display is off.
- Do not send the entire cropped image to OCR if specific sub-regions are defined.

## Triggers

- ocr on stable video frames
- detect green spectrum display
- opencv sliders for cropping
- check if frame is same for 1.5 seconds
- extract numbers from stable video feed

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…