2024-05-29 04:07:12 发布
网友
我试图在OpenCV2库(版本2.4.9)的hog.detectMultiScale方法中设置分组设置。在
hog.detectMultiScale
发生的是group_threshold和groupThreshold参数 在python绑定中都无法识别:
group_threshold
groupThreshold
TypeError: 'group_threshold' is an invalid keyword argument for this function
以及
我该怎么解决这个问题?有没有办法设置这个参数?在
group_threshold或{}在hog.detectMultiScale的Python包装中不存在。不幸的是,没有文档可以证明它(典型的OpenCV文档),但是在GPU版本的HOG描述符中有一个相关的doc-http://docs.opencv.org/2.4.9/modules/gpu/doc/object_detection.html#gpu-hogdescriptor-detectmultiscale
然而,似乎与Python包装器不一致。如果您在Python REPL中输入help(cv2.HOGDescriptor().detectMultiScale),我们得到的结果是:
help(cv2.HOGDescriptor().detectMultiScale)
detectMultiScale(...) detectMultiScale(img[, hitThreshold[, winStride[, padding[, scale[, finalThreshold[, useMeanshiftGrouping]]]]]]) -> foundLocations, foundWeights
如果将文档与Python包装器进行比较,我们可以清楚地看到缺少一些输入参数,以及它们之间的参数不同。在
因此,您似乎不能更改此参数:(。抱歉,如果这不是你想听的话!然而,如果你想让它工作得相对好一些,这篇StackOverflow帖子可能会被证明是有见地的:
HOGDescriptor with videos to recognize objects
祝你好运!在
group_threshold
或{hog.detectMultiScale
的Python包装中不存在。不幸的是,没有文档可以证明它(典型的OpenCV文档),但是在GPU版本的HOG描述符中有一个相关的doc-http://docs.opencv.org/2.4.9/modules/gpu/doc/object_detection.html#gpu-hogdescriptor-detectmultiscale然而,似乎与Python包装器不一致。如果您在Python REPL中输入
help(cv2.HOGDescriptor().detectMultiScale)
,我们得到的结果是:如果将文档与Python包装器进行比较,我们可以清楚地看到缺少一些输入参数,以及它们之间的参数不同。在
因此,您似乎不能更改此参数:(。抱歉,如果这不是你想听的话!然而,如果你想让它工作得相对好一些,这篇StackOverflow帖子可能会被证明是有见地的:
HOGDescriptor with videos to recognize objects
祝你好运!在
相关问题 更多 >
编程相关推荐