Camera — Kivy v1.0.1-dev documentation

# Camera

Core class for acquiring the camera, and convert the input to a `Texture`.

class `kivy.core.camera.` `CameraBase`(**kwargs)

  Bases: `kivy.event.EventDispatcher`

  Abstract Camera Widget class.

  Concrete camera classes must implement initialization and frame capturing to buffer that can be uploaded to gpu.

  Parameters : | index: int Source index of the camera. size : tuple (int, int) Size at which the image is drawn. If no size is specified, it defaults to resolution of the camera image. resolution : tuple (int, int) Resolution to try to request from the camera. Used in the gstreamer pipeline by forcing the appsink caps to this resolution. If the camera doesnt support the resolution a negotiation error might be thrown.
  Events : | on_load Fired when the camera is loaded, and the texture became available on_frame Fired each time the camera texture is updated

  `index`

    Source index of the camera

  `init_camera`()

    Initialise the camera (internal)

  `resolution`

    Resolution of camera capture (width, height)

  `start`()

    Start the camera acquire

  `stop`()

    Release the camera

  `texture`

    Return the camera texture with the latest capture