Metadata-Version: 2.4
Name: palm-vanish
Version: 0.1.0
Summary: A webcam disappearance effect triggered by an open palm or Namaste pose.
Project-URL: Homepage, https://github.com/s4xme/vanish-webcam
Project-URL: Repository, https://github.com/s4xme/vanish-webcam
Project-URL: Issues, https://github.com/s4xme/vanish-webcam/issues
Keywords: webcam,computer-vision,opencv,mediapipe,hand-gesture,camera-effects
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Video :: Capture
Requires-Python: <3.13,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: mediapipe==0.10.21
Requires-Dist: opencv-contrib-python==4.10.0.84
Requires-Dist: numpy<2,>=1.26

# Palm Vanish

A small Windows webcam effect: hold an open palm in view or bring both hands together in the Namaste/prayer pose, and the app fades you into the empty background. Repeat either gesture to return.

The webcam frames are processed locally. The app does not record or upload video.

## Requirements

- Windows 10 or 11
- Python 3.10, 3.11, or 3.12
- A webcam

## Run the desktop app from this repository

1. Install Python and make sure the Python launcher (`py`) is available.
2. Open PowerShell in this folder.
3. Install the dependencies:

   ```powershell
   py -m pip install -r requirements.txt
   ```

4. Double-click `Run Palm Vanish.bat`, or run:

   ```powershell
   py palm_vanish.py
   ```

5. Step out of view for four seconds while the app captures the background.
6. Return to frame and hold either an open palm toward the camera or both hands upright together in the **Namaste/prayer pose** (palms pressed together, fingers pointing up) for at least half a second. The progress ring fills, then the app animates the vanish. Lower your hand or separate your hands, then repeat either gesture to reappear.

## Controls

- **Q** or **Esc**: quit
- **B**: capture the background again (step out of view during capture)

If the default webcam does not open, try another camera index, such as `py palm_vanish.py --camera 1`.

## Use from Python

After the first release is published on PyPI, install it with:

```powershell
py -m pip install palm-vanish
```

Then use the two-line API:

```python
from palm_vanish import start
start()
```

`start()` opens the webcam window and runs until the user presses **Q** or **Esc**. To select a camera or resolution, call `start(camera=1, width=1280, height=720)`.

The command-line entry point is `palm-vanish`; for example, `palm-vanish --camera 1`.

## Build and publish

The project name configured for PyPI is `palm-vanish`. Confirm that name is available in your PyPI account before the first release. To build and validate the distribution:

```powershell
py -m pip install build twine
py -m build
py -m twine check dist/*
```

Then publish the generated files in `dist/` from your own PyPI account. PyPI recommends configuring Trusted Publishing for GitHub Actions rather than storing an upload token in the repository.

## How it works

OpenCV reads the webcam and displays the result. MediaPipe Hands checks for an open palm or two upright hands close together in the Namaste/prayer pose. After either gesture is held for half a second, the app cross-fades between the live camera frame and a background captured at startup.

For a clean disappearance, keep the camera still and capture the background with nobody in frame. Moving objects, changing light, or camera movement can make the replacement noticeable. The effect replaces the full frame; it does not cut a person out of a moving background.

## License

No license is included yet. Choose and add a license before inviting others to reuse or redistribute the code.
