Функция «hog.detectMultiScale(frame)» ничего не возвращает.Python

Программы на Python
Anonymous
Функция «hog.detectMultiScale(frame)» ничего не возвращает.

Сообщение Anonymous »

Я написал это, и это работает. но последняя функция (hog.detectMultiScale) ничего не возвращает. Я не знаю почему.
'''

Код: Выделить всё

import numpy as np
import cv2
hog = cv2.HOGDescriptor()
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())

cv2.startWindowThread()

# open video stream
cap = cv2.VideoCapture("E:\\3.mp4")

# the output will be written to output.avi
out = cv2.VideoWriter('output.avi',cv2.VideoWriter_fourcc(*'MJPG'),15.,
(640, 480))

while (True):
# Capture frame-by-frame
ret, frame = cap.read()

# resizing for faster detection
frame = cv2.resize(frame, (640, 480))
returns the bounding boxes for the detected objects

(boxes, weights) = hog.detectMultiScale(frame)
'''

Подробнее здесь: https://stackoverflow.com/questions/694 ... -any-thing

Вернуться в «Python»