Ask Your Question
0

upgrading to opencv 3.4.2 to run a programme the camera release( capture.release() ) function not working

asked 2018-09-22 21:02:16 -0600

loch gravatar image

Earlier i had opencv 3.2.0 where camera release function perfectly but after upgrading to opencv 3.4.2 to run a programme the camera release( capture.release() ) function not working can u give me a solution to release the camera

Thank you

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2018-11-29 01:39:44 -0600

csa gravatar image

We do encounter the same issue. It seems to be only related with opencv 3.4.2.

CameraObject = cv.VideoCapture.release()

does not work. It does throw a type error

TypeError: descriptor 'release' of 'cv2.VideoCapture' object needs an argument

I changed it to

cv.VideoCapture.release(myCamObjectName)

which does execute but still the camera is not released. Only restarting the kernel does the job. However the camera is not locked, e. g. I can initialize the stream and capture frames when I rerun my scripts. It is also not related to the camera (or cam driver): We did try it on different laptops with different cameras (although only the built-in ones).

edit flag offensive delete link more
0

answered 2018-09-22 23:00:19 -0600

onthegrid007 gravatar image

CameraObject = cv.VideoCapture.release() should do the trick... I am not familiar with there ever being a release(OBJECT) function but then again, I haven't done much OpenCV with Python...

Also any other questions you might have about OpenCV API can be found here. Anyways happy coding! -PF

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-09-22 21:02:16 -0600

Seen: 908 times

Last updated: Sep 22 '18