类型错误:'>=' “cv2.cuda_GpuMat”实例之间不支持和“浮动”
我在 OpenCV 中使用 GPU 加速器,但我在 CPU 中遇到 numpy 阈值控制问题,如何在对象检测中对 GPU 脚本使用阈值控制?
TypeError: '>=' not supported between instances of 'cv2.cuda_GpuMat' and 'float'
gsrc.upload(source)
gtmpl.upload(need)
matcher = cv.cuda.createTemplateMatching(cv.CV_8UC1, cv.TM_CCOEFF_NORMED)
gresult = matcher.match(gsrc, gtmpl)
gresult = matcher.match(gsrc, gtmpl)
resultg = gresult.download()
min_valg, max_valg, min_locg, max_locg = cv.minMaxLoc(resultg)
loc = np.where( gresult >= threshold)
I am using GPU accelerator in OpenCV, but I have problem with numpy threshold control as in CPU, how can I use threshold control for gpu script in object detection?
TypeError: '>=' not supported between instances of 'cv2.cuda_GpuMat' and 'float'
gsrc.upload(source)
gtmpl.upload(need)
matcher = cv.cuda.createTemplateMatching(cv.CV_8UC1, cv.TM_CCOEFF_NORMED)
gresult = matcher.match(gsrc, gtmpl)
gresult = matcher.match(gsrc, gtmpl)
resultg = gresult.download()
min_valg, max_valg, min_locg, max_locg = cv.minMaxLoc(resultg)
loc = np.where( gresult >= threshold)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论