Invisible cloak for your webcam. Pick a color, make it vanish. Powered by OpenCV (CV), FastAPI (backend), and a zero-build modern UI.
kapture-vfx/
├─ app/
│ ├─ __init__.py
│ ├─ main.py # FastAPI entry (routes + static)
│ ├─ ws.py # WebSocket frame handling
│ ├─ cv/
│ │ ├─ __init__.py
│ │ └─ invisibility.py # Mask building + cloaking
│ └─ services/
│ ├─ __init__.py
│ └─ processor.py # Base64 encode/decode, color + params
├─ public/
│ └─ index.html # Tailwind + Vue UI (CDN)
├─ run.sh # Dev server launcher
├─ requirements.txt
├─ README.md
└─ LICENSE
- Real‑time color cloaking with background replacement
- Color picker + eyedropper from video
- Live tuning: tolerance, S/V floors, blur, morphology
- Mask preview, keep‑largest, min‑area, skin‑protect filters
- Toast notifications and responsive, sleek UI
- Python 3.9+
- macOS/Linux recommended
- A webcam and a visually distinct target color
cd kapture-vfx
source venv/bin/activate
python3 -m pip install -r requirements.txt
./run.sh
Open http://127.0.0.1:8000/
(or http://127.0.0.1:<your-port>/
if you started the server on a different port).
- Click Start and allow camera access.
- Click Reset to capture a clean background (no target color in view).
- Pick your target color (eyedropper or color input).
- Tune Tolerance / S / V until the Preview mask highlights only the cloak.
- Turn Preview off to enable the invisibility effect.
- Color/Tolerance: primary selection and hue band width
- S min / V min: ignore dull/dark pixels
- Blur / Morph: stability and cleanup
- Keep largest / Min area / Skin protect: reduce false positives
- Preview mask: visualize detected pixels (green overlay)
- Use even lighting and a matte, saturated cloak color.
- Re‑capture background after camera/scene changes.
- If frames “don’t align,” Reset after the camera settles.
- UI:
/
- WebSocket:
/ws
- Health:
/health
MIT