Version

Quick search

Table Of Contents

Camera

The Camera widget is used to capture and display video from a camera. Once the widget is created, the texture inside the widget will be automatically updated. Our CameraBase implementation is used under the hood:

cam = Camera()

By default, the first camera found on your system is used. To use a different camera, set the index property:

cam = Camera(index=1)

You can also select the camera resolution:

cam = Camera(resolution=(320, 240))

Warning

The camera texture is not updated as soon as you have created the object. The camera initialization is asynchronous, so there may be a delay before the requested texture is created.

class kivy.uix.camera.Camera(**kwargs)

Bases: kivy.uix.image.Image

Camera class. See module documentation for more information.