RealSenseID icon indicating copy to clipboard operation
RealSenseID copied to clipboard

Starting and stopping f455 camera with Python

Open zeynepkoyun opened this issue 3 years ago • 1 comments

Hi @gabime, @benlev In the examples we looked at by considering the "viewer.py" code in Python, we can start the camera and take its image with the following two lines. "p = rsid_py.Preview(preview_cfg) p.start(on_image)"

However, in the stop part of the camera, the application is closed directly by using the "os._exit(0)" line. I would appreciate if you can help us how to stop the camera without closing the application.

zeynepkoyun avatar Jul 31 '21 04:07 zeynepkoyun

There is the "stop" method in Preview class. https://github.com/IntelRealSense/RealSenseID/blob/master/wrappers/python/preview_py.cc#L100

You can delete the line "os._exit(0)" in the callback.

RealSenseSupport avatar Oct 13 '21 06:10 RealSenseSupport