Skip to main content

LiteCam is a lightweight, cross-platform library for capturing RGB frames from cameras and displaying them. Designed with simplicity and ease of integration in mind, LiteCam supports Windows, Linux and macOS platforms.

Project description

LiteCam for Python

LiteCam is a lightweight, cross-platform library for capturing RGB frames from cameras and displaying them. Designed with simplicity and ease of integration in mind, LiteCam supports Windows, Linux and macOS platforms. It could be a complement to OpenCV for enumerating capture devices.

lite camera for Python

Features

  • Capture RGB frames from video devices.
  • Display live frames in a window.
  • Draw contours and text directly on the displayed frames.
  • Simple API for quick integration.

Supported Platforms

  • Windows
  • Linux
  • macOS

How to Build the CPython Extension

  • Development

    python setup.py develop
    
  • Release

    python setup.py build
    
  • Source Distribution

    python setup.py sdist
    

Usage

Basic Example

import litecam

camera = litecam.PyCamera()

if camera.open(0):

    window = litecam.PyWindow(
        camera.getWidth(), camera.getHeight(), "Camera Stream")

    while window.waitKey('q'):
        frame = camera.captureFrame()
        if frame is not None:
            width = frame[0]
            height = frame[1]
            size = frame[2]
            data = frame[3]
            window.showFrame(width, height, data)

    camera.release()

API Overview

  • getDeviceList(): Lists available video capture devices.
  • saveJpeg(filename, width, height, rgbdata): Saves the frame as a JPEG image.

PyCamera

  • open(index): Opens the camera with the specified index.
  • listMediaTypes(): Lists supported media types.
  • setResolution(int width, int height): Sets the resolution for the camera.
  • captureFrame()`: Captures a single RGB frame.
  • release(): Closes the camera and releases resources.
  • getWidth(): Returns the width of the frame.
  • getHeight(): Returns the height of the frame.

PyWindow

  • waitKey(key): Waits for user input; returns false if the specified key is pressed or the window is closed.
  • showFrame(width, height, rgbdata): Displays an RGB frame.
  • drawContour(points): Draws contours on the frame.
  • drawText(text, x, y, fontSize, color): Draws text on the frame.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lite_camera-2.0.1.tar.gz (142.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lite_camera-2.0.1-cp313-cp313-win_amd64.whl (40.5 kB view details)

Uploaded CPython 3.13Windows x86-64

lite_camera-2.0.1-cp312-cp312-win_amd64.whl (40.5 kB view details)

Uploaded CPython 3.12Windows x86-64

lite_camera-2.0.1-cp311-cp311-win_amd64.whl (40.5 kB view details)

Uploaded CPython 3.11Windows x86-64

lite_camera-2.0.1-cp310-cp310-win_amd64.whl (40.5 kB view details)

Uploaded CPython 3.10Windows x86-64

lite_camera-2.0.1-cp39-cp39-win_amd64.whl (40.5 kB view details)

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.1-cp38-cp38-win_amd64.whl (40.5 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

Details for the file lite_camera-2.0.1.tar.gz.

File metadata

  • Download URL: lite_camera-2.0.1.tar.gz
  • Upload date:
  • Size: 142.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for lite_camera-2.0.1.tar.gz
Algorithm Hash digest
SHA256 d99088c67a65198c3407363a92a7ee1cb3261e468e9843d48c59d7bdf5042396
MD5 73fcac87c469b6b64be94fa0ae3fb0c7
BLAKE2b-256 4502ca6e34e9bd31c0f1f033377ebe546dc3ee1471f0a92aad95df4c2358ca53

See more details on using hashes here.

File details

Details for the file lite_camera-2.0.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for lite_camera-2.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 495dcb29b3f65a78079a122c9bc168d6b96ef8a682e75edb8e6e9d49b59507c0
MD5 2b30695e864b6c0078c92ac402dcb0c2
BLAKE2b-256 9f3fc7644e76341a897a6a65f39c05b0b768d989059d71f5eb131a3867c17069

See more details on using hashes here.

File details

Details for the file lite_camera-2.0.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for lite_camera-2.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1f0a70fbad69a7ee23d7ee8f2f038b9db4b002a5e9fc6629a752f9da0943772e
MD5 113869615db9ded0ee10ccf803d65a61
BLAKE2b-256 7d45e0434936228d5bb17213b2aae5d454013b2eb9216e799e768d1a6f1c738e

See more details on using hashes here.

File details

Details for the file lite_camera-2.0.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for lite_camera-2.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1506fac6e3223cc07710885d038e73b9f6be7be22e88714525e2c8ed90ad2059
MD5 2a9a2f92c5676aaa6f422ccc19c967e7
BLAKE2b-256 b99377ba13d0a78653a397ec6f81becdcf35af78b79502e182573b04f8ffd640

See more details on using hashes here.

File details

Details for the file lite_camera-2.0.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for lite_camera-2.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 30dfd8001b0eac860ca6148ef715aee34e5a565611369119eb2d05ccd88bfc4f
MD5 683a5916186cc87cd75e035d1f6ccbf7
BLAKE2b-256 f21c073679edccc020fbc72802ce8dcce4a72f18db66faf045bd26a0134e21f4

See more details on using hashes here.

File details

Details for the file lite_camera-2.0.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: lite_camera-2.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for lite_camera-2.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bffb3a4b0df2491a9c0c3fe9b3f7ce70258498d35c3bc5721689748a0fc245a2
MD5 eab00c75a3cf68c32769e2e4d0f6731d
BLAKE2b-256 1478b9b8fdb929c1b8b54c9c695680d30c2d5187cfcdf28d15bbc9f455e89806

See more details on using hashes here.

File details

Details for the file lite_camera-2.0.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: lite_camera-2.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for lite_camera-2.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 95751bbfe9781c9ba892e824366af2caf8ff00aac79d3b1d0c85bf298f85185c
MD5 74ce3803fec05a78786f39b8dfbeb4f6
BLAKE2b-256 105976eb9ff5119ef1da8e282168101ce4df09bcda902c34a0bfd453ce31f988

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page