Compare commits
No commits in common. "ed2cf3122184e91a9c99656cc3c832f1f76d7cdc" and "d0999b83072e1a99eee9277ba082b10af4c732d4" have entirely different histories.
ed2cf31221
...
d0999b8307
|
@ -1,19 +0,0 @@
|
||||||
from telemetrix_rpi_pico import telemetrix_rpi_pico
|
|
||||||
import kuukar.kuukar_leds as kuukar_leds
|
|
||||||
import kuukar.kuukar_collision as kuukar_collision
|
|
||||||
import kuukar.kuukar_motion as kuukar_motion
|
|
||||||
import kuukar.kuukar_lcd as kuukar_lcd
|
|
||||||
import kuukar.kuukar_sensors as kuukar_sensors
|
|
||||||
import kuukar.kuukar_environment as kuukar_environment
|
|
||||||
from kuukar.kuukar_config import SERIAL_MCU, SERIAL_DRV
|
|
||||||
|
|
||||||
class kuukar:
|
|
||||||
def __init__(self) -> None:
|
|
||||||
self.mcu = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_MCU, sleep_tune=0.001)
|
|
||||||
self.drv = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_DRV, sleep_tune=0.001)
|
|
||||||
self.sensors = kuukar_sensors.sensors(self.mcu)
|
|
||||||
self.leds = kuukar_leds.leds(self.mcu)
|
|
||||||
self.motion = kuukar_motion.motion(self.mcu, self.drv, self.leds, self.sensors)
|
|
||||||
self.lcd = kuukar_lcd.lcd(self.motion, self.sensors)
|
|
||||||
self.environment = kuukar_environment.environment(self.lcd, self.leds, self.sensors)
|
|
||||||
self.collision = kuukar_collision.collision(self.mcu, self.lcd, self.leds)
|
|
|
@ -1,30 +1,17 @@
|
||||||
from kuukar.kuukar_lcd import lcd
|
from kuukar.kuukar_lcd import lcd
|
||||||
from kuukar.kuukar_leds import leds
|
from kuukar.kuukar_leds import leds
|
||||||
import threading
|
|
||||||
import multiprocessing
|
|
||||||
import cv2
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cv:
|
class cv:
|
||||||
def __init__(self, lcd: lcd, leds: leds) -> None:
|
def __init__(self, lcd: lcd, leds: leds) -> None:
|
||||||
self.lcd = lcd
|
self.lcd = lcd
|
||||||
self.leds = leds
|
self.leds = leds
|
||||||
self.camera = cv2.VideoCapture(0)
|
|
||||||
threading.Thread(target=self._cv_loop).start()
|
|
||||||
|
|
||||||
def _cv_loop(self):
|
|
||||||
while True:
|
|
||||||
img = self.capture_image()
|
|
||||||
stop_sign = self.detect_sign(img)
|
|
||||||
|
|
||||||
|
|
||||||
def capture_image(self):
|
def capture_image(self):
|
||||||
ret, frame = self.camera.read()
|
pass
|
||||||
return frame
|
|
||||||
def detect_sign(self, frame):
|
def detect_face(self, image):
|
||||||
stopsign_cascade = cv2.CascadeClassifier('./stopsign_good.xml')
|
pass
|
||||||
image = frame.array
|
|
||||||
gray_img=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
|
def handle_face_detected(self):
|
||||||
found_stopsigns=stopsign_cascade.detectMultiScale(gray_img,1.1,5)
|
pass
|
||||||
return found_stopsigns
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
telemetrix-rpi-pico
|
telemetrix-rpi-pico
|
||||||
pyaudio
|
pyaudio
|
||||||
flask
|
flask
|
||||||
opencv-python
|
|
Loading…
Reference in New Issue