mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
Fixed that object_detection.py does not work in python3.
This commit is contained in:
parent
258a769567
commit
ade57c8bd0
@ -142,8 +142,8 @@ def postprocess(frame, outs):
|
||||
center_y = int(detection[1] * frameHeight)
|
||||
width = int(detection[2] * frameWidth)
|
||||
height = int(detection[3] * frameHeight)
|
||||
left = center_x - width / 2
|
||||
top = center_y - height / 2
|
||||
left = int(center_x - width / 2)
|
||||
top = int(center_y - height / 2)
|
||||
classIds.append(classId)
|
||||
confidences.append(float(confidence))
|
||||
boxes.append([left, top, width, height])
|
||||
|
Loading…
Reference in New Issue
Block a user