使用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
致谢