Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ccf3284

Browse files
authored
Merge pull request #3 from jovyinny/master
fixed some naming that lead to errors
2 parents 48ef97f + 4350893 commit ccf3284

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

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

1414
for(x, y, w, h) in pedistrain:
1515
cv2.rectangle(frame, (x, y), (x+w, y+h), color=(0, 255, 255), thickness=2)
@@ -22,7 +22,7 @@ def Simulator():
2222
ret, frame = CarVideo.read()
2323
controlkey = cv2.waitKey(1)
2424
if ret:
25-
cars_frame = detect_cars(frame)
25+
cars_frame = detect_cars_and_pedestrain(frame)
2626
cv2.imshow('frame', cars_frame)
2727
else:
2828
break

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /