PYTHON WORLD ( PYTHON | JAVA | C | C++ | HTML )
15.8K subscribers
141 photos
9 videos
193 files
314 links
Senior Analyst at Capgemini

Channel link :-
https://t.me/python_world_in
(You can share with friends)

๐Ÿ‘‰ Get materials for MNC's.

๐Ÿ‘‰ Off campus recruitment updates.

๐Ÿ‘‰ Interview Experiences.

๐Ÿ‘‰ And all the placement related information at
Download Telegram
๐Ÿ‘9๐Ÿ˜Ž2๐Ÿฅฐ1
๐Ÿค”ANYONE WANT 30+ ๐Ÿ—ฃ๏ธ SPOKEN ENGLISH EBOOK COURSE FOR INTERVIEW AND IMPROVE COMMUNICATION
Anonymous Poll
93%
Yes
4%
No
3%
After some time
๐Ÿ‘17โค3๐Ÿฅฐ1
PYTHON WORLD ( PYTHON | JAVA | C | C++ | HTML ) pinned ยซMass Hiring Companies Placement Materials https://drive.google.com/folderview?id=1SkCOcAS0Kqvuz-MJkkjbFr1GSue6Ms6mยป
This media is not supported in your browser
VIEW IN TELEGRAM
LINK OF SOURCE CODE ๐Ÿ‘‡๐Ÿป๐Ÿ‘‡๐Ÿป
๐Ÿ‘4๐Ÿซก2๐Ÿ”ฅ1
This media is not supported in your browser
VIEW IN TELEGRAM
SOURCE CODE LINK ๐Ÿ‘‡๐Ÿป๐Ÿ‘‡๐Ÿป
๐Ÿ‘9โค1๐Ÿ”ฅ1
This media is not supported in your browser
VIEW IN TELEGRAM
Gesture-Controlled Volume Adjustment using Python ๐ŸŽฎ๐Ÿ”Š

Source Code ๐Ÿ‘‡๐Ÿป
๐Ÿ‘7๐Ÿ”ฅ2๐Ÿซก1
import cv2
import mediapipe as mp
from math import hypot
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
import numpy as np

cap = cv2.VideoCapture(1)

mpHands = mp.solutions.hands
hands = mpHands.Hands()
mpDraw = mp.solutions.drawing_utils

devices = AudioUtilities.GetSpeakers()
interface = devices.Activate(IAudioEndpointVolume._iid_, CLSCTX_ALL, None)
volume = cast(interface, POINTER(IAudioEndpointVolume))

volMin, volMax = volume.GetVolumeRange()[:2]
current_vol = volume.GetMasterVolumeLevel()

# Smoothing parameters
alpha = 0.2 # Adjust this value for smoother changes

while True:
success, img = cap.read()
imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
results = hands.process(imgRGB)

lmList = []
if results.multi_hand_landmarks:
for handlandmark in results.multi_hand_landmarks:
for id, lm in enumerate(handlandmark.landmark):
h, w, _ = img.shape
cx, cy = int(lm.x * w), int(lm.y * h)
lmList.append([id, cx, cy])
mpDraw.draw_landmarks(img, handlandmark, mpHands.HAND_CONNECTIONS)

if lmList:
x1, y1 = lmList[4][1], lmList[4][2]
x2, y2 = lmList[8][1], lmList[8][2]

cv2.circle(img, (x1, y1), 4, (255, 0, 0), cv2.FILLED)
cv2.circle(img, (x2, y2), 4, (255, 0, 0), cv2.FILLED)
cv2.line(img, (x1, y1), (x2, y2), (255, 0, 0), 3)

length = hypot(x2 - x1, y2 - y1)

target_vol = np.interp(length, [15, 220], [volMin, volMax])
current_vol = alpha * target_vol + (1 - alpha) * current_vol # Smoothing
volume.SetMasterVolumeLevel(current_vol, None)

# Display rounded volume level on the screen
cv2.putText(img, f"Vol: {int(round(current_vol))}%", (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 2)

cv2.imshow('Image', img)
if cv2.waitKey(1) & 0xFF == ord('q'):
break

cap.release()
cv2.destroyAllWindows()
๐Ÿ‘14๐Ÿ”ฅ3โค1๐Ÿ˜ฑ1
FREE Amazon Web Services (AWS) - Zero to Hero Course

Get here - https://lnkd.in/dcJaP7F4
๐Ÿ‘3๐Ÿ”ฅ3
*YOU WANT 56 PYTHON LECTURE FROM BASIC TO ADVANCE AT 399rs WITH๐Ÿ‘

+ FREE ๐Ÿ—“๏ธ200 PROJECTS + FREE ๐Ÿ—ฃ๏ธSPOKEN ENGLISH + FREE ๐Ÿ“HANDWRITTEN + FREE ๐Ÿ”–SLIDE + FREE ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ปINTERVIEW QUESTION AND ANSWER*
Anonymous Poll
83%
Yes
9%
No
8%
Later
๐Ÿ‘27๐Ÿ˜4๐Ÿ”ฅ3๐ŸŽ‰3๐Ÿฅฐ1