Review #218978 about “abhi”
Author: Manikanta Mani
Webcam: abhi
Rating: Excellent (5 out of 5)
Date:
Advantages of the webcam:
super
Disadvantages of the webcam:
noting
Author’s comment:
import cv2 import mediapipe as mp import numpy as np from ctypes import cast, POINTER from comtypes import CLSCTX_ALL from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume # Connect to the Windows master-volume control speakers = AudioUtilities.GetSpeakers() volume = speakers.EndpointVolume # Start webcam and hand tracking cap = cv2.VideoCapture(0) mp_hands = mp.solutions.hands mp_draw = mp.solutions.drawing_utils with mp_hands.Hands( max_num_hands=1, min_detection_confidence=0.7, min_tracking_confidence=0.7 ) as hands: while cap.isOpened(): success, frame = cap.read() if not success: break frame = cv2.flip(frame, 1) height, width, _ = frame.shape rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) result = hands.process(rgb) message = "Show your hand" if result.multi_hand_landmarks: hand = result.multi_hand_landmarks[0] mp_draw.draw_landmarks( frame, hand, mp_hands.HAND_CONNECTIONS ) # Thumb tip and index-finger tip thumb = hand.landmark[4] index = hand.landmark[8] # Distance between thumb and index finger pinch_distance = np.hypot( thumb.x - index.x, thumb.y - index.y ) # Pinch fingers together to enable volume control if pinch_distance < 0.06: # Move the pinched hand up/down to change volume level = np.clip(1.0 - index.y, 0.0, 1.0) volume.SetMasterVolumeLevelScalar( float(level), None ) message = f"Volume: {int(level * 100)}%" else: message = "Pinch thumb + index to control" cv2.putText( frame, message, (20, 40), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255, 0), 2 ) cv2.imshow("Hand Gesture Volume Control", frame) # Press Q to exit if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() cv2.destroyAllWindows()
super
Disadvantages of the webcam:
noting
Author’s comment:
import cv2 import mediapipe as mp import numpy as np from ctypes import cast, POINTER from comtypes import CLSCTX_ALL from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume # Connect to the Windows master-volume control speakers = AudioUtilities.GetSpeakers() volume = speakers.EndpointVolume # Start webcam and hand tracking cap = cv2.VideoCapture(0) mp_hands = mp.solutions.hands mp_draw = mp.solutions.drawing_utils with mp_hands.Hands( max_num_hands=1, min_detection_confidence=0.7, min_tracking_confidence=0.7 ) as hands: while cap.isOpened(): success, frame = cap.read() if not success: break frame = cv2.flip(frame, 1) height, width, _ = frame.shape rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) result = hands.process(rgb) message = "Show your hand" if result.multi_hand_landmarks: hand = result.multi_hand_landmarks[0] mp_draw.draw_landmarks( frame, hand, mp_hands.HAND_CONNECTIONS ) # Thumb tip and index-finger tip thumb = hand.landmark[4] index = hand.landmark[8] # Distance between thumb and index finger pinch_distance = np.hypot( thumb.x - index.x, thumb.y - index.y ) # Pinch fingers together to enable volume control if pinch_distance < 0.06: # Move the pinched hand up/down to change volume level = np.clip(1.0 - index.y, 0.0, 1.0) volume.SetMasterVolumeLevelScalar( float(level), None ) message = f"Volume: {int(level * 100)}%" else: message = "Pinch thumb + index to control" cv2.putText( frame, message, (20, 40), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255, 0), 2 ) cv2.imshow("Hand Gesture Volume Control", frame) # Press Q to exit if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() cv2.destroyAllWindows()
Webcam Information
| Webcam Name: | Integrated Webcam |
|---|---|
| Type of Webcam: | Integrated |
| Quality Rank: | #65441 |
| Quality Rating: | 340 |
| Built-in Microphone: | — |
| Built-in Speaker: | — |
| Frame rate: | 26 FPS |
| Stream Type: | Video |
| Image Mode: | RGB Color |
| Webcam MegaPixels: | 0.92 MP |
| Webcam Resolution: | 1280×720 |
| Video Standard: | HD |
| Aspect Ratio: | 1.78 |
| PNG File Size: | 1.41 MB |
| JPEG File Size: | 459.61 KB |
| Bitrate: | 11.67 MB/s |
| Number of Colors: | 89663 |
| Average RGB Color: | |
| Lightness: | 57.06% |
| Luminosity: | 58.01% |
| Brightness: | 57.39% |
| Hue: | 47° |
| Saturation: | 4.11% |
Device Information
| Device Name | dell |
|---|---|
| Device Type | Laptop |
| Screen Resolution | 1536×864 |
| Color Depth | 24-bit |
| Screen Orientation | landscape-primary |