5

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

Shan
  • 18,563
  • 39
  • 97
  • 132

1 Answers1

8

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

Community
  • 1
  • 1
patxiska
  • 134
  • 4