๐๏ธ์๊ฒ์ถ
Last updated
Last updated
# ์คํ : ํฐ๋ฏธ๋์์ python ํ์ผ๋ช
# ํ๋ก๊ทธ๋จ์ ์ข
๋ฃ ํฐ๋ฏธ๋์์ Ctrl + C ํค๋ฅผ ์
๋ ฅํ๋ค.
from helloai import *
wnd = Window('wnd')
# ์นด๋ฉ๋ผ ๊ฐ์ฒด ์์ฑ
camera = Camera()
# ์ ๊ฒ์ถ์ ์ํ ๊ฐ์ฒด ์์ฑ
hands = HandsDetector()
def loop():
img = camera.read()
# ์นด๋ฉ๋ผ์์ ์ฝ์ด์จ ์ด๋ฏธ์ง์์ ์์ ๊ฒ์ถํ๊ณ , ๋๋๋งํฌ์ ์์น๋ฅผ ๊ทธ๋ฆฐ๋ค.
# ๋๋๋งํฌ๊ฐ ํ์๋ ์ด๋ฏธ์ง, ๋๋๋งํฌ์ ์ ๋ณด๊ฐ ๋ฆฌํด๋๋ค.
img, landmarks = hands.process(img, draw=True)
if len(landmarks) > 0:
print(landmarks)
wnd.show(img)
# ---------------------------------------
# For HelloAI
# ---------------------------------------
if __name__ == '__main__':
run()