INNER CODE UNIT · Python

close_proxy

pibooth/pibooth · pibooth/camera/__init__.py:10

def close_proxy(rpi2_cam_proxy, gp_cam_proxy, cv_cam_proxy):
    """Close proxy drivers.
    """
    if rpi2_cam_proxy:
        Rpi2Camera(rpi2_cam_proxy).quit()
    if gp_cam_proxy:
        GpCamera(gp_cam_proxy).quit()
    if cv_cam_proxy:
        CvCamera(cv_cam_proxy).quit()


def find_camera():
    """Initialize the camera depending of the connected one. The priority order
    is chosen in order to have best rendering during preview and to take captures.
    The gPhoto2 camera is first (drivers most restrictive) to avoid connection
    concurence in case of DSLR compatible with OpenCV.
    """
    rpi2_cam_proxy = get_rpi2_camera_proxy()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…