开发者

cant find ReleaseCapture in opencv while using python?

开发者 https://www.devze.com 2023-03-20 18:15 出处:网络
I am trying to release a cam capture which has been acquired by the API call camera = cv.CaptureFromCAM(-1)

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

    camera = cv.CaptureFromCAM(-1) 

How can I release it. There is a function named "ReleaseCapture" but it has no python bindin开发者_如何学编程g.

Can anybody suggest any alternative?

Thanks a lot


I found a similar answered question here

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

#some code ...

del(capture)

be carefull of using frame or another image captured from cam after deleting capture

regards

0

精彩评论

暂无评论...
验证码 换一张
取 消