本文介绍了使用python时无法在opencv中找到ReleaseCapture?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试释放通过API调用获取的凸轮捕获

I am trying to release a cam capture which has been acquired by the API call

    camera = cv.CaptureFromCAM(-1)

如何释放它。有一个名为 ReleaseCapture的函数,但没有python绑定。

How can I release it. There is a function named "ReleaseCapture" but it has no python binding.

有人可以建议其他选择吗?

Can anybody suggest any alternative?

非常感谢

推荐答案

我找到了一个类似的答案

I found a similar answered question here

capture = cv.CaptureFromCAM(0)
frame = cv.QueryFrame(capture)

#some code ...

del(capture)

请谨慎使用 frame 或删除 capture

致谢

这篇关于使用python时无法在opencv中找到ReleaseCapture?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-11 20:59