activate kuukar_cv

This commit is contained in:
Siwat Sirichai 2022-12-11 11:24:46 +07:00
parent 30650adec9
commit 93f09ecbf7
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ 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
import kuukar.kuukar_cv as kuukar_cv
from kuukar.kuukar_config import SERIAL_MCU
@ -21,3 +22,4 @@ class kuukar:
self.lcd, self.leds, self.sensors)
self.collision = kuukar_collision.collision(
self.mcu, self.lcd, self.leds)
self.cv = kuukar_cv.cv(self.lcd,self.leds)

View File

@ -18,10 +18,13 @@ class cv:
img = self.capture_image()
stop_sign = self.detect_sign(img)
def get_road_curve(self, frame):
pass
def capture_image(self):
ret, frame = self.camera.read()
return frame
def detect_sign(self, frame):
stopsign_cascade = cv2.CascadeClassifier('./stopsign_good.xml')
image = frame.array