CARIA.2.0

Precedent repo CARIA :
Ajout de nouveau modele.
Travail sur multiple ia.
...
This commit is contained in:
ccunatbrule
2024-05-28 15:59:57 +02:00
parent 57e8cee32d
commit 241121a7d1
18 changed files with 1256 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import cv2
import numpy as np
stop=0
cap=cv2.VideoCapture(0)
while True:
if not stop:
ret, frame=cap.read()
if ret is False:
quit()
image=frame.copy()
cv2.imshow("image", image)
gray=cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
grad_x=cv2.Sobel(gray, cv2.CV_8U, 1, 0, ksize=5)
cv2.imshow("grad x", grad_x)
grad_y=cv2.Sobel(gray, cv2.CV_8U, 0, 1, ksize=5)
cv2.imshow("grad y", grad_y)
if not stop:
key=cv2.waitKey(10)&0xFF
else:
key=cv2.waitKey()
image=frame.copy()
if key==ord('q'):
break
if key==ord('s'):
stop=not stop
if key==ord('a'):
for cpt in range(200):
ret, frame=cap.read()
image=frame.copy()
cap.release()
cv2.destroyAllWindows()