Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cant find ReleaseCapture in opencv while using python?

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 binding.

Can anybody suggest any alternative?

Thanks a lot

like image 787
Shan Avatar asked Jul 14 '11 10:07

Shan


1 Answers

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

like image 70
patxiska Avatar answered Oct 20 '22 10:10

patxiska