-
-
Save Euler29/977f0c7ceca8863b6e03b104f2708f20 to your computer and use it in GitHub Desktop.
otonom_araba_kod_6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for frame in camera.capture_continuous(rawCapture,format="bgr",use_video_port=True): | |
t1=time.time() | |
img=frame.array | |
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) | |
if stop_sign_detect(gray)==False: | |
lines,witdh=cizgi_bul(gray) | |
a=egim_bul(lines,witdh) | |
if a=='ileri': | |
mc.forwardDrive() | |
elif a=='sola': | |
mc.forwardTurnLeft() | |
elif a=='saga': | |
mc.forwardTurnRight() | |
else: | |
mc.allStop() | |
print('Stop Algılandı.') | |
t2=time.time() | |
print(1/(t2-t1),'FPS') | |
rawCapture.truncate(0) | |
if cv2.waitKey(1) & 0xFF == ord('q'): | |
cv2.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment