선릉역 1번 출구
mini_project using Mediapipe(3) 본문
gesture를 사용한 volume control 기능을 만들었다.
옆에는 cv2.rectangle을 사용해서 volume gauge를 표현했다.
처음에는 youtube에 있는 볼륨 조절기를 보고 4번과 12번의 x좌표 차이로 볼륨을 설정해놨었는데 카메라에서 손이 멀어지면 손가락 사이 길이가 짧아져서 볼륨이 내려가는 현상이 발생해서 z좌표에 영향을 받지 않는 angle을 사용했다.
angle은 4, 9, 12dot을 가지고 아래 사이트 공식을 참고해 구했다.
Find the Angle between three points from 2D using python
I have studied the dot product from vector analysis in my school. Now that formula, I will use for finding the angle between three points…
manivannan-ai.medium.com
실제 노트북/컴퓨터 오디오와 연결하는 건 pycaw를 사용했다.
https://github.com/AndreMiras/pycaw
GitHub - AndreMiras/pycaw: Python Core Audio Windows Library
Python Core Audio Windows Library. Contribute to AndreMiras/pycaw development by creating an account on GitHub.
github.com
참고 동영상
https://www.youtube.com/watch?v=9iEPzbG-xLE
https://www.youtube.com/watch?v=9ZRqc4EaPRU
'Project' 카테고리의 다른 글
google spreadsheet python 연동하기 (0) | 2022.07.25 |
---|---|
mini_project using Mediapipe(5) (0) | 2021.11.29 |
mini_project using Mediapipe(4) (0) | 2021.11.28 |
mini_project using Mediapipe(2) (0) | 2021.11.17 |
mini_project using Mediapipe(1) (0) | 2021.11.17 |