rk-screenshot


Namerk-screenshot JSON
Version 1.2.6 PyPI version JSON
download
home_pageNone
SummaryScreenshot using Gesture hand detection
upload_time2024-12-21 09:12:27
maintainerNone
docs_urlNone
authorRohit Kumar Yadav
requires_pythonNone
licenseMIT
keywords python video stream video stream camera stream sockets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Screenshot Capture Using Hand Gestures

This project enables users to take screenshots using hand gestures detected via a webcam. It leverages the MediaPipe library for hand detection and OpenCV for video processing. The logic uses the transition of hand gestures (from an open palm to a fist) to trigger a screenshot.

## Features

- Real-time hand gesture recognition.
- Screenshot capture when an open palm transitions to a fist gesture.
- Configurable and extensible for other gesture-based controls.

## Requirements

To run this project, you need the following dependencies:

- Python 3.7+
- OpenCV (`cv2`)
- MediaPipe (`mediapipe`)
- A library or function for taking screenshots, such as `ss_taker`. Replace `take_screenshot` in the code with your screenshot functionality.

## Installation

1. Clone the repository or download the source code.
2. Install the required Python packages:
   ```bash
   pip install opencv-python mediapipe
   ```
3. Ensure your Python environment includes the `ss_taker` library or a custom implementation for taking screenshots.

## Usage

1. Save the script to a file, e.g., `gesture_screenshot.py`.
2. Run the script:
   ```bash
   python gesture_screenshot.py
   ```
3. The webcam will activate, and the program will begin detecting hand gestures.
4. Show an open palm to the camera, then transition to a fist gesture to capture a screenshot.
5. Press `q` to quit the program.

## Usage Example

```python
from project_Screenshot.r_screenshot import take_screenshot , capture_screenshot

# to take normal screenshot
take_screenshot()

# for Gesture recognizer screenshot
capture_screenshot()
```

## How It Works

### Gesture Detection

The script uses the MediaPipe library to detect hand landmarks and determine whether the hand is open or closed:
- **Open palm:** All fingers extended (based on landmark positions).
- **Fist:** All fingers closed.

### Screenshot Trigger

When the script detects a transition from an open palm to a fist, it calls the `take_screenshot()` function to capture the current screen.

### Core Functions
#### `is_palm_open(landmarks)`
Determines whether the hand is open by comparing the positions of finger landmarks.

#### `capture_screenshot()`
Main function that:
- Captures video from the webcam.
- Processes each frame for hand landmarks.
- Detects gesture transitions and triggers screenshot capture.

## Customization
You can modify the script to:
- Recognize additional gestures.
- Perform other actions (e.g., send alerts or control devices) based on gestures.

## Limitations
- Requires a clear view of the hand for accurate detection.
- Designed for a single hand; might need enhancements for multi-hand detection.

## Acknowledgments
- [OpenCV](https://opencv.org/) for image processing.
- [MediaPipe](https://mediapipe.dev/) for hand landmark detection.
- [Github] (https://github.com/rohitkumyadav/Gesture-Screenshot.git) to view full source code

## Contributing
Contributions are welcome! If you have ideas for improvements or additional features, feel free to submit a pull request or open an issue.

## License
This project is licensed under the MIT License. See the LICENSE file for details.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rk-screenshot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, video, stream, video stream, camera stream, sockets",
    "author": "Rohit Kumar Yadav",
    "author_email": "<rohitkuyadav2003@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a5/75/7f830802d0af7692679d5b83b1f4b5b92d392ee9a56f3f3ae51a8740f8b6/rk_screenshot-1.2.6.tar.gz",
    "platform": null,
    "description": "\n# Screenshot Capture Using Hand Gestures\n\nThis project enables users to take screenshots using hand gestures detected via a webcam. It leverages the MediaPipe library for hand detection and OpenCV for video processing. The logic uses the transition of hand gestures (from an open palm to a fist) to trigger a screenshot.\n\n## Features\n\n- Real-time hand gesture recognition.\n- Screenshot capture when an open palm transitions to a fist gesture.\n- Configurable and extensible for other gesture-based controls.\n\n## Requirements\n\nTo run this project, you need the following dependencies:\n\n- Python 3.7+\n- OpenCV (`cv2`)\n- MediaPipe (`mediapipe`)\n- A library or function for taking screenshots, such as `ss_taker`. Replace `take_screenshot` in the code with your screenshot functionality.\n\n## Installation\n\n1. Clone the repository or download the source code.\n2. Install the required Python packages:\n   ```bash\n   pip install opencv-python mediapipe\n   ```\n3. Ensure your Python environment includes the `ss_taker` library or a custom implementation for taking screenshots.\n\n## Usage\n\n1. Save the script to a file, e.g., `gesture_screenshot.py`.\n2. Run the script:\n   ```bash\n   python gesture_screenshot.py\n   ```\n3. The webcam will activate, and the program will begin detecting hand gestures.\n4. Show an open palm to the camera, then transition to a fist gesture to capture a screenshot.\n5. Press `q` to quit the program.\n\n## Usage Example\n\n```python\nfrom project_Screenshot.r_screenshot import take_screenshot , capture_screenshot\n\n# to take normal screenshot\ntake_screenshot()\n\n# for Gesture recognizer screenshot\ncapture_screenshot()\n```\n\n## How It Works\n\n### Gesture Detection\n\nThe script uses the MediaPipe library to detect hand landmarks and determine whether the hand is open or closed:\n- **Open palm:** All fingers extended (based on landmark positions).\n- **Fist:** All fingers closed.\n\n### Screenshot Trigger\n\nWhen the script detects a transition from an open palm to a fist, it calls the `take_screenshot()` function to capture the current screen.\n\n### Core Functions\n#### `is_palm_open(landmarks)`\nDetermines whether the hand is open by comparing the positions of finger landmarks.\n\n#### `capture_screenshot()`\nMain function that:\n- Captures video from the webcam.\n- Processes each frame for hand landmarks.\n- Detects gesture transitions and triggers screenshot capture.\n\n## Customization\nYou can modify the script to:\n- Recognize additional gestures.\n- Perform other actions (e.g., send alerts or control devices) based on gestures.\n\n## Limitations\n- Requires a clear view of the hand for accurate detection.\n- Designed for a single hand; might need enhancements for multi-hand detection.\n\n## Acknowledgments\n- [OpenCV](https://opencv.org/) for image processing.\n- [MediaPipe](https://mediapipe.dev/) for hand landmark detection.\n- [Github] (https://github.com/rohitkumyadav/Gesture-Screenshot.git) to view full source code\n\n## Contributing\nContributions are welcome! If you have ideas for improvements or additional features, feel free to submit a pull request or open an issue.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Screenshot using Gesture hand detection",
    "version": "1.2.6",
    "project_urls": null,
    "split_keywords": [
        "python",
        " video",
        " stream",
        " video stream",
        " camera stream",
        " sockets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab4eb797fd1922f4ae6690fd776e4c36aa95e6a906eee55c018870d76f4d2203",
                "md5": "c4d4717c3528f3ab30a9893a97581f87",
                "sha256": "d36e73e9b36fb24a9850174e73e5e98d15f6faba3a2af58276661fdcea5db6a2"
            },
            "downloads": -1,
            "filename": "rk_screenshot-1.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c4d4717c3528f3ab30a9893a97581f87",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5877,
            "upload_time": "2024-12-21T09:12:24",
            "upload_time_iso_8601": "2024-12-21T09:12:24.771008Z",
            "url": "https://files.pythonhosted.org/packages/ab/4e/b797fd1922f4ae6690fd776e4c36aa95e6a906eee55c018870d76f4d2203/rk_screenshot-1.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5757f830802d0af7692679d5b83b1f4b5b92d392ee9a56f3f3ae51a8740f8b6",
                "md5": "e0072b6e15f0f4e8deedef5f1b840180",
                "sha256": "c12d7fbb65378f0deef6f85999fba46ca378154821a897de95fc151ebae44ff2"
            },
            "downloads": -1,
            "filename": "rk_screenshot-1.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "e0072b6e15f0f4e8deedef5f1b840180",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5177,
            "upload_time": "2024-12-21T09:12:27",
            "upload_time_iso_8601": "2024-12-21T09:12:27.195032Z",
            "url": "https://files.pythonhosted.org/packages/a5/75/7f830802d0af7692679d5b83b1f4b5b92d392ee9a56f3f3ae51a8740f8b6/rk_screenshot-1.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-21 09:12:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "rk-screenshot"
}
        
Elapsed time: 0.45878s