Computer Vision Helper Package
Project description
Computer Vision Helper Packages
- Face Detection
- Face Mesh
Install the package
pip install alvonCV
Demo Code for Face Detection
import alvonCV
import cv2
import time
cap = cv2.VideoCapture(0)
pTime = 0
# here you use the alvonCV package
faceDetectorObj = alvonCV.FaceDetector()
while True:
success, img = cap.read()
img, bboxs = faceDetectorObj.findFaces(img, draw=True)
cTime = time.time()
fps = 1 / (cTime - pTime)
pTime = cTime
cv2.putText(img, f'FPS: {int(fps)}', (20, 70), cv2.FONT_HERSHEY_PLAIN, 3, (0, 255, 0), 2)
cv2.imshow("Image", img)
cv2.waitKey(1)
Demo Code for Face Mesh
import alvonCV
import cv2
import time
cap = cv2.VideoCapture(0)
pTime = 0
faceDetectorObj = alvonCV.FaceMeshDetector()
while True:
success, img = cap.read()
img = faceDetectorObj.findFaceMesh(img, draw=True)
cTime = time.time()
fps = 1 / (cTime - pTime)
pTime = cTime
cv2.putText(img, f'FPS: {int(fps)}', (20, 70), cv2.FONT_HERSHEY_PLAIN, 3, (0, 255, 0), 2)
cv2.imshow("Image", img)
cv2.waitKey(1)
Demo Code for Hand Detector
import alvonCV
import cv2
import time
cap = cv2.VideoCapture(0)
detector = alvonCV.HandDetector(detectionCon=0.8, maxHands=1)
while True:
# Get image frame
success, img = cap.read()
# Find the hand and its landmarks
img = detector.findHands(img)
lmList, bbox = detector.findPosition(img)
fingersUp = detector.fingersUp()
print(fingersUp)
# Display
cv2.imshow("Image", img)
cv2.waitKey(1)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alvonCV-0.2.1.tar.gz
(5.9 kB
view details)
File details
Details for the file alvonCV-0.2.1.tar.gz
.
File metadata
- Download URL: alvonCV-0.2.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b234407497300596f61200522315fc5bec8e2bcd5ea9944aad5c29bcd48a9cf4 |
|
MD5 | cbcfda80fdb77a3f2abb0581e2e2ca4f |
|
BLAKE2b-256 | dc2ac14b71b07f82cf7789949e58d2deb5ebc48af620bbe1bfb27351b10130ba |