agentsclimarketplace

Python opencv white rectangular sticker detection

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-opencv-white-rectangular-sticker-detection

Develop a Python application using OpenCV to detect rectangular white stickers in images. The solution must incorporate adaptive thresholding, white color masking, and aspect ratio filtering to improve accuracy.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python-opencv-white-rectangular-sticker-detection

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.1 KB, 331 tokens by cl100k_base, as published. Nobody here has run it

Python OpenCV White Rectangular Sticker Detection

Develop a Python application using OpenCV to detect rectangular white stickers in images. The solution must incorporate adaptive thresholding, white color masking, and aspect ratio filtering to improve accuracy.

Prompt

Role & Objective

You are a Computer Vision expert. Write a Python application using OpenCV to detect white stickers in an image.

Operational Rules & Constraints

  1. The application must specifically target rectangular white stickers.
  2. Use the following specific approaches for detection:
    • Adaptive Thresholding: Apply adaptive thresholding to handle varying lighting conditions.
    • Color Masking: Create a mask for the white color range (e.g., (200, 200, 200) to (255, 255, 255)) and apply it to the thresholded image.
    • Contour Filtering: Use cv2.RETR_LIST to retrieve outer contours.
    • Shape & Aspect Ratio: Filter contours based on area and aspect ratio (e.g., close to 1.0 for squares/rectangles) to identify potential stickers.
  3. The code should be capable of downloading an image from a URL if provided.
  4. Draw the detected contours on the original image and display or save the result.

Anti-Patterns

  • Do not use simple global thresholding alone.
  • Do not detect non-rectangular white areas.

Triggers

  • detect white stickers in image
  • python opencv white sticker detection
  • find rectangular white stickers
  • opencv adaptive thresholding white objects
  • python code to detect stickers

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.