Quick search


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))


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.


Bases: kivy.uix.image.Image

Camera class. See module documentation for more information.


Index of the used camera, starting from 0.

index is a NumericProperty and defaults to -1 to allow auto selection.


Boolean indicating whether the camera is playing or not. You can start/stop the camera by setting this property:

# start the camera playing at creation
cam = Camera(play=True)

# create the camera, and start later (default)
cam = Camera(play=False)
# and later = True

play is a BooleanProperty and defaults to False.


Preferred resolution to use when invoking the camera. If you are using [-1, -1], the resolution will be the default one:

# create a camera object with the best image available
cam = Camera()

# create a camera object with an image of 320x240 if possible
cam = Camera(resolution=(320, 240))


Depending on the implementation, the camera may not respect this property.

resolution is a ListProperty and defaults to [-1, -1].