Skip to main content

Coumputer Vision helping Library

Project description

cvlearn

An easy to use package which helps to do hand tracking, face detection, etc. with use of opencv module.

Installation

  • Use Python 3.x
  • Open cmd/terminal and type:
pip install cvlearn

Dependencies

  • python 3.x
  • opencv-python
  • numpy
  • mediapipe

Examples

Hand Tracking:

from cvlearn import HandTrackingModule as handTracker

import cv2
cap = cv2.VideoCapture(0)
detector = handTracker.handDetector()
while True:
    ret, img = cap.read()
    img = detector.findHands(img)

    cv2.imshow("Result", img)
    cv2.waitKey(1)

Result:

App Screenshot

Face Detection:

from cvlearn import FaceDetection as faceDetector

import cv2
cap = cv2.VideoCapture(0)
detector = faceDetector.FaceDetector()
while True:
    ret, img = cap.read()
    img = detector.findFaces(img)

    cv2.imshow("Result", img)
    cv2.waitKey(1)

Result:

App Screenshot

SideView: App Screenshot

Drawing face mesh:

from cvlearn import FaceMesh as fms

import cv2
cap = cv2.VideoCapture(0)
detector = fms.FaceMeshDetector()
while True:
    ret, img = cap.read()
    img, face = detector.findFaceMesh(img)

    cv2.imshow("Result", img)
    cv2.waitKey(1)

Result:

App Screenshot

Finger Counting

from cvlearn import FingerCounter as fc
import cvlearn.HandTrackingModule as handTracker
import cv2

cap = cv2.VideoCapture(0)

detector = handTracker.handDetector(maxHands=1)

counter = fc.FingerCounter()
while True:
    ret, frame = cap.read()
    frame = cv2.flip(frame, 180)

    frame = detector.findHands(frame)
    lmList, bbox = detector.findPosition(frame)

    if lmList:
        frame1 = counter.drawCountedFingers(frame, lmList, bbox)

    cv2.imshow("res", frame)
    key = cv2.waitKey(1)
    if key == 27:
        break

cv2.destroyAllWindows()

Result:

App Screenshot

Two Hands Finger Counting

from cvlearn import TwoHandsFingerCounter as fc
import cv2

cap = cv2.VideoCapture(0)

counter = fc.FingerCounter()
while True:
    ret, frame = cap.read()


    frame1 = counter.drawCountedFingers(frame)

    cv2.imshow("res", frame)
    key = cv2.waitKey(1)
    if key == 27:
        break
cv2.destroyAllWindows()

Result:

App Screenshot

Project details


Download files

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

Source Distribution

cvlearn-0.1.3.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

cvlearn-0.1.3-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

Supported by

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