Skip to main content

A simple way to use Mediapipe hand features.

Project description

HandDetector-cc Module

Simple python package to simply use mediapipe hand detection.

Author Details

Name : Chanchal Roy

Email : croy7667@gmail.com

GitHub Project Details

Project : HandDetector-cc

Installation

Install HandDetector-cc with pip

  pip install HandDetector-cc

Usage

import HandDec
import time

timeS = time.time()

    class_obj = HandDetector()
    cam = class_obj.init_cam()

    while cam.isOpened():
        success, image = cam.read()
        if not success: continue

        detected_hand = class_obj.findHand(image, draw_detect=True)
        hand_landmark = class_obj.findLocations(image, draw_id=8)

        if hand_landmark[0] and hand_landmark[1]:

            finger_ups = class_obj.fingerUp()

            boundry = hand_landmark[1]
            cv2.rectangle(image, (boundry[0], boundry[1]), (boundry[2], boundry[3]), (0, 255, 255), 2)

            distance = class_obj.findDistance(image, 8, 12)
            print(f"Finger's Up : {finger_ups}       Finger Distance : {distance}")

        timeE = time.time()
        fps = int(1 / (timeE - timeS))
        timeS = timeE
        cv2.putText(image, str(f'FPS : {fps}'), (10, 30), 4, 1, (0, 255, 255), 3)
        cv2.imshow('Hand Detection - Chanchal Roy', image)
        if cv2.waitKey(1) & 0xff == ord('q'): break

    cam.release()
    cv2.destroyAllWindows()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

HandDetector_cc-0.0.9-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file HandDetector_cc-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for HandDetector_cc-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0eceda1914a4c40901e7a03ba74b457be12f9ef824b4e1c9cbdc001495be2a1b
MD5 582b7b6dd4adbd714e2f8cdc4902d973
BLAKE2b-256 1bbb1493f3978ef7ad5acdd47425c8d3b6a54c3a8023be582fb95b53f88c3cc6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page