ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

THIS is how a PROGRAMMER PLAYS the T-Rex Dinosaur Game using

python made easy

python made easy for beginners

python programming made easy

python programming for beginners

python programming for beginners in english

python beginner tutorial

python beginner tutorial in english

python easy projects for beginners

easy python project tutorial

easy python projects for resume

easy python projects with source code

#shorts

shorts

trex game bot

trex bot

trex game in python

t rex game python

Автор: pwnoverflo

Загружено: 2021-02-05

Просмотров: 719

Описание: In this video I will show you how a #real #programmer plays the T-Rex Dinosaur Game from #Google using #Python and #OpenCV.

#YouTube​ #Shorts​

Before you ask: Here is the source code! Replace "\geq" by the "greater than sign".
⚙️⚙️⚙️⚙️⚙️
from time import sleep
from PIL import Image
from mss import mss
import numpy as np
import cv2, keyboard
x = mss()
count = 0
while True:
x.get_pixels({'top': 200, 'left': 160, 'width': 800, 'height': 200})
y = np.array(Image.frombytes('RGB', (x.width, x.height), x.image))
obj2 = y[125:155 , 110:155]
gray = cv2.cvtColor(obj2, cv2.COLOR_BGR2GRAY)
th, threshed = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV|cv2.THRESH_OTSU)
cnts = cv2.findContours(threshed, cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)[-2]
count = len(cnts)
if count \leq 1:
keyboard.press_and_release('space')
cv2.putText(y, str(count), (50,50), cv2.FONT_HERSHEY_SIMPLEX, 1, (255,0,0), 2)
cv2.imshow('bot', np.array(y))
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
⚙️⚙️⚙️⚙️⚙️
I've been inspired by many different sources. One of them is #StackOverflow​: https://stackoverflow.com/questions/3...

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
THIS is how a PROGRAMMER PLAYS the T-Rex Dinosaur Game using

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]