Skip to content

Commit

Permalink
Merge pull request #3 from jovyinny/master
Browse files Browse the repository at this point in the history
fixed some naming that lead to errors
  • Loading branch information
Kalebu authored Jan 21, 2023
2 parents 48ef97f + 4350893 commit ccf3284
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

def detect_cars_and_pedestrain(frame):
cars = cars_cascade.detectMultiScale(frame, 1.15, 4)
pedistrain = body_casccade.detectMultiSclae(frame, 1.15, 4)
pedistrain = body_cascade.detectMultiScale(frame, 1.15, 4)
for (x, y, w, h) in cars:
cv2.rectangle(frame, (x+1, y+1), (x+w,y+h), color=(255, 0, 0), thickness=2)
cv2.rectangle(frame, (x, y), (x+w, y_h), color=(0, 255, 0), thickness=2)
cv2.rectangle(frame, (x, y), (x+w, y+h), color=(0, 255, 0), thickness=2)

for(x, y, w, h) in pedistrain:
cv2.rectangle(frame, (x, y), (x+w, y+h), color=(0, 255, 255), thickness=2)
Expand All @@ -22,7 +22,7 @@ def Simulator():
ret, frame = CarVideo.read()
controlkey = cv2.waitKey(1)
if ret:
cars_frame = detect_cars(frame)
cars_frame = detect_cars_and_pedestrain(frame)
cv2.imshow('frame', cars_frame)
else:
break
Expand Down

0 comments on commit ccf3284

Please sign in to comment.