Przejdź do treści
Biblioteka skilli
Dane i analityka · Analiza

template-object-counting

/template-object-counting

Liczy wybrane obiekty na obrazach przez dopasowanie szablonu z obrazami wzorcowymi: elementy gier, sprite'y i powtarzalne wzory wizualne na zrzutach ekranu lub klatkach gier.

Licencja
MIT
Ostatnia zmiana repozytorium
02.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 02.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Liczy wybrane obiekty na obrazach przez dopasowanie szablonu z obrazami wzorcowymi: elementy gier, sprite'y i powtarzalne wzory wizualne na zrzutach ekranu lub klatkach gier.

Oryginalny opis (EN)

Count specific objects in images using template matching with reference object images. Use this skill when you need to detect and count game elements, sprites, or recurring visual patterns in screenshots or game frames using a template image as reference.

Jak działa

  1. Overview
  2. Workflow
  3. Data Structure
  4. Output Format
  5. Important Considerations
  6. Troubleshooting
Sekcje z nagłówków SKILL.md, w oryginale · 94 linii, 465 słów
Podgląd SKILL.md
---
name: template-object-counting
description: Count specific objects in images using template matching with reference object images. Use this skill when you need to detect and count game elements, sprites, or recurring visual patterns in screenshots or game frames using a template image as reference.
---

# Template-Based Object Counting

This skill provides guidance on counting objects in images using template matching techniques, commonly used for detecting game sprites, coins, enemies, and other visual elements.

## Overview

Template matching is a computer vision technique where:
1. You provide a template image (reference) of the object you want to find
2. The algorithm searches the larger image for matches
3. Matches are counted and their locations are identified

## Workflow

### Step 1: Prepare Template Images

Each object type needs a clear reference template image:
- **Coins**: `/root/coin.png` - Image showing a single coin sprite
- **Enemies**: `/root/enemy.png` - Image showing a single enemy sprite
- **Turtles**: `/root/turtle.png` - Image showing a single turtle sprite

Templates should be:
- Minimal size (just the object itself, with minimal surrounding pixels)
- Consistent with objects in the larger image
- In the same color format as the image being analyzed (grayscale for this task)

### Step 2: Use Object Counter

Use the `object_counter` skill to count objects in each frame:

```
Input:
- Frame image: /root/keyframes_001.png (grayscale)
- Template image: /root/coin.png (grayscale)

Output:
- Count of coins in the frame: integer value
```

### Step 3: Repeat for All Object Types

For each keyframe, repeat the counting process:
1. Count coins using coin.png template
2. Count enemies using enemy.png template
3. Count turtles using turtle.png template

### Step 4: Process All Frames

Iterate through all extracted keyframes:
- keyframes_001.png → count coins, enemies, turtles
- keyframes_002.png → count coins, enemies, turtles
- keyframes_003.png → count coins, enemies, turtles
- ... and so on

## Data Structure

Organize results as you process them:

| Frame ID | Coins | Enemies | Turtles |
|----------|-------|---------|---------|
| /root/keyframes_001.png | 5 | 2 | 1 |
| /root/keyframes_002.png | 3 | 1 | 0 |
| /root/keyframes_003.png | 7 | 3 | 2 |

## Output Format

After processing all frames, create a CSV file with:
- **Column 1**: frame_id (format: `/root/keyframes_%03d.png`)
- **Column 2**: coins (count)
- **Column 3**: enemies (count)
- **Column 4**: turtles (count)

Example CSV structure:
```
frame_id,coins,enemies,turtles
/root/keyframes_001.png,5,2,1
/root/keyframes_002.png,3,1,0
/root/keyframes_003.png,7,3,2
```

## Important Considerations

- **Template matching accuracy** depends on template quality and image similarity
- **Grayscale conversion** is necessary for consistent matching across frames
- **Template size matters**: Use templates that match the object size in the larger image
- **Overlapping objects** may affect accuracy; the object counter will do its best
- **Frame format**: Ensure all images are in PNG format for consistency

## Troubleshooting

- **No objects detected**: Template may not match objects in the frame; verify templates are in grayscale
- **False positives**: Template may be matching similar-looking elements; refine template if needed
- **Inconsistent counts**: Ensure all frames are in the same format (grayscale) and resolution is consistent

Wersje

RepozytoriumWynikLicencja
Ta strona · cxcscmu/SkillLearnBench100MIT
cxcscmu/SkillLearnBench100MIT

Migawka bazy z 28.10.2026 · wersja paczki 9ad1e3f04bd1 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100opencv-template-matching
    Liczy wystąpienia obiektu na obrazie za pomocą dopasowania szablonu cv2.matchTemplate, na przykład monet lub sprite'ów z gier, na obrazach w skali szarości i kolorowych.
  • 95count-objects-in-frames-using-template-matching
    Liczy monety, wrogów i żółwie na szarych klatkach kluczowych metodą template matching w OpenCV ze skryptem count_objects.py, z parsowaniem wyniku i awaryjnym bezpośrednim dopasowaniem.
  • 100image-generation
    Generuje zasoby graficzne do gier przez API Google Gemini i przetwarza je w gotowe pliki sprite'ów, z wyborem modelu, proporcji, obrazu referencyjnego i liczby wariantów.
  • 100codex-imagegen
    Generuje obrazy przez wbudowane generowanie obrazów Codex CLI (sprite'y, ikony, ilustracje, makiety, grafiki do gier, elementy UI), opakowując polecenie codex exec.
  • 100analyze-objects
    Analizuje typy obiektów w interakcji, procesy zorientowane na obiekty, wykonania z obiektem wiodącym i opóźnienia między obiektami.
  • 100detect-and-analyze
    Wykrywa obiekty na obrazach i analizuje ramki, liczby, kadry i metadane: liczy ciężarówki, palety lub defekty, wycina detekcje i raportuje pewność oraz strefę każdego obiektu.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.