mcpField
V
video-stickfigure

video-stickfigure

github.com/zrt-ai-labクリエイティブ・メディア29649 回インストール14 週間前に更新
リポジトリ

video-stickfigure について

video-stickfigureは、動画シーン用の棒人間画像をAIで生成し、HSV処理で背景を統一するスキルです。プロンプトの型、画像確認項目、ファイル名、納品条件を定めています。

主な機能

  1. 01AIによる棒人間画像の生成
  2. 022種類の背景向けプロンプトテンプレート
  3. 03感情に合わせたシーン要素
  4. 04HSVによる背景色の統一
  5. 05画像確認と出力ファイル名

活用シーン

  1. 01棒人間シーン画像の一式作成
  2. 02黒板風背景色の統一
  3. 03画像品質とシーン数の確認
  4. 04後続の動画工程向け画像の準備

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/zrt-ai-lab/opencode-skills --skill video-stickfigure

インストール後、Claude Code で/video-stickfigureを入力して読み込まれたか確認します。

同梱ファイルREADME.md

詳細

マッチ棒人間画像生成スキル

🚨 基本原則

必ずAI画像生成を使用してください!PILで線を描くことは禁止です!

チェック基準:生成された画像ファイルが 50KB を超えていること


🔧 画像生成ツール

image-service skill を使用します:

python ~/.openclaw/skills/image-service/scripts/text_to_image.py "[prompt]" -r 9:16 -o stick1.png

📝 プロンプトテンプレート

深い墨緑色の背景版(おすすめ・デフォルト)
minimalist chalk-style stick figure on dark green chalkboard background #3c5b45,
white chalk line art, simple 5-stroke drawing style,
[动作描述],
exaggerated pose, hand-drawn feel, chalk texture,
no shading, no gradient, stark contrast,
vertical composition 9:16, no text, no watermark
真っ黒な背景版(代替)
minimalist stick figure, pure black background #000000,
white line art only, simple 5-stroke drawing,
[动作描述],
exaggerated pose, no shading, no gradient, no gray,
stark contrast, cartoon style,
vertical composition 9:16, no text, no watermark

選択の目安:

  • 深い墨緑色版:黒板のような質感で、見た目がより柔らかいです ✅ おすすめ
  • 真っ黒版:コントラストが高く、よりシンプルです
動作の説明+雰囲気を演出する要素(必ず含めてください!)

マッチ棒人間を単独で描いてはいけません!感情を引き立てる雰囲気づくりの要素を必ず加えてください!

感情/概念人物の動作🌟 雰囲気を演出する要素(必ず追加!)
老化/疲労person slumped over, tired posture+ withered leaves falling, dim shadows, cracked ground
枯れ/落ち込みperson wilting like a dying plant+ dead tree nearby, falling petals, dark clouds
上昇/成長person climbing stairs upward+ sunlight rays from above, distant mountain peak, stars
重荷を背負う/責任を担うperson lifting heavy weight overhead+ storm clouds, rain drops, lightning in background
遠くを見る/遠望person standing on cliff, hand over eyes+ vast horizon, clouds below feet, sunrise glow
受容/包容person with arms wide open+ small figures approaching, warm light rays, hearts floating
喜び/幸福person jumping with joy, arms raised+ confetti, sparkles, fireworks in sky
成長/変容person breaking out of shell+ butterfly wings emerging, light beams, blooming flowers
思考/熟考person sitting cross-legged, hand on chin+ floating question marks, gears, light bulb above head
行動/疾走person running forward with determination+ motion lines, wind effect, path stretching ahead
プロンプトの組み立て式
[基础模板] + [人物动作] + [氛围元素] + [后缀]

例:老化のシーン

minimalist chalk-style stick figure on dark green chalkboard background #3c5b45,
white chalk line art, simple 5-stroke drawing style,
person slumped over tired posture aging feeling,
withered leaves falling around, dim shadows, cracked ground beneath,
exaggerated pose, hand-drawn feel, chalk texture,
no shading, no gradient, stark contrast,
vertical composition 9:16, no text, no watermark

例:階段を上るシーン

minimalist chalk-style stick figure on dark green chalkboard background #3c5b45,
white chalk line art, simple 5-stroke drawing style,
person climbing stairs upward with determination,
sunlight rays streaming from above, distant mountain peak visible, glowing stars,
exaggerated pose, hand-drawn feel, chalk texture,
no shading, no gradient, stark contrast,
vertical composition 9:16, no text, no watermark
⚠️ 雰囲気を演出する要素のルール
  1. 必ず追加する - 雰囲気を演出する要素がないマッチ棒人間の画像は単調です
  2. 感情に合わせる - 否定的な感情には暗い要素を、肯定的な感情には明るい要素を使います
  3. 増やしすぎない - 雰囲気を演出する要素は2~3個で十分です。多すぎると雑然とします
  4. 簡潔さを保つ - 雰囲気を演出する要素もチョーク画風にし、写実的にしないでください

🎨 HSVによる背景色の統一処理(必須!)

AIでは色を正確に制御できません!画像生成後、コードで必ず背景色を統一してください!

処理スクリプト
import cv2
import numpy as np

def unify_background_hsv(input_path, output_path, target_hex="#3c5b45"):
    """
    用HSV范围替换统一背景色
    """
    img = cv2.imread(input_path)
    hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
    
    # 绿色系HSV范围(覆盖AI生成的各种绿色)
    lower = np.array([35, 20, 20])
    upper = np.array([85, 255, 255])
    
    # 创建掩码
    mask = cv2.inRange(hsv, lower, upper)
    
    # 目标颜色 BGR
    target_bgr = tuple(int(target_hex.lstrip('#')[i:i+2], 16) for i in (4, 2, 0))
    
    # 替换背景
    result = img.copy()
    result[mask > 0] = target_bgr
    
    cv2.imwrite(output_path, result)
    return output_path

# 批量处理
import glob
for f in glob.glob("stick*.png"):
    if "_unified" not in f:
        out = f.replace(".png", "_unified.png")
        unify_background_hsv(f, out)
        print(f"处理完成: {out}")
コマンドライン版
python3 << 'EOF'
import cv2
import numpy as np
import glob
import sys

target_hex = "#3c5b45"
target_bgr = tuple(int(target_hex.lstrip('#')[i:i+2], 16) for i in (4, 2, 0))

for f in glob.glob("stick*.png"):
    if "_unified" in f:
        continue
    img = cv2.imread(f)
    hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
    mask = cv2.inRange(hsv, np.array([35,20,20]), np.array([85,255,255]))
    result = img.copy()
    result[mask > 0] = target_bgr
    out = f.replace(".png", "_unified.png")
    cv2.imwrite(out, result)
    print(f"✅ {f} -> {out}")
EOF

✅ チェックリスト(すべて必ずクリアしてください!)

画像を納品する前に、以下を確認してください:

チェック項目基準クリアできない場合
ファイルサイズ1枚あたり > 50KBAIで再生成
画像の枚数シーン数と一致追加生成
背景色#3c5b45 に統一HSV処理を実行
マッチ棒人間の視認性白い線がはっきり見える再生成
# 快速检查文件大小
ls -la stick*_unified.png | awk '{if($5<50000) print "❌ "$9" 太小: "$5"B"; else print "✅ "$9": "$5"B"}'

📁 出力仕様

ファイル説明
stick1.png, stick2.png, ...AIが生成した元画像
stick1_unified.png, ...HSV処理後の背景統一済み画像

後続の工程では *_unified.png ファイルのみを使用してください!


🚫 よくある間違い

間違い結果正しい方法
PILで線を描く動画がテスト画像のように見えるimage-serviceでAI画像を生成する
HSV処理を省略する背景色にばらつきが出る必ずHSV統一処理を実行する
ファイルが<50KB画像の品質が低い再生成する
元画像を使い、unifiedを使わない背景が統一されない_unified.png のみを使う
マッチ棒人間に雰囲気を演出する要素がない画面が単調で訴求力がないプロンプトに必ず雰囲気を演出する要素を加える

コメント