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 integrates easily with image processing frameworks like OpenCV, making it a versatile choice for developers.

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 Mode

    python setup.py develop
    
  • Wheel Package

    python setup.py bdist_wheel
    
  • 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.5.tar.gz (70.3 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.5-cp313-cp313-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.13Windows x86-64

lite_camera-2.0.5-cp312-cp312-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.12Windows x86-64

lite_camera-2.0.5-cp311-cp311-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.11Windows x86-64

lite_camera-2.0.5-cp310-cp310-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.10Windows x86-64

lite_camera-2.0.5-cp39-cp39-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.5-cp38-cp38-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

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

File metadata

  • Download URL: lite_camera-2.0.5.tar.gz
  • Upload date:
  • Size: 70.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lite_camera-2.0.5.tar.gz
Algorithm Hash digest
SHA256 5a85b1a61c5d7f30558b3636e1a9cba640b7f8bf96b306531b41fa30649fb33b
MD5 33afddfd0d86112ce021b43345723289
BLAKE2b-256 5ca3275df544449e3ba5d040b206771ff46689159ab513cdb8576f6f2d0337ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 978d2fefa6101ecb9ff1ab3906795f0cf2697164d28e2967ac84f064fdc44377
MD5 7f18d46103b90f07f3116469a4f0e567
BLAKE2b-256 68813819a877ab80611b0e4fa69e203225cc81d7b96f6b49342c4c9ff7d847d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d03ec5ae630ce9e4b76bb2190b7ab9f111823cf062af41b91aaa828c26b2e07c
MD5 12399bfeb58702ba06aa728f6327eb69
BLAKE2b-256 19fdc85de9f5ce32e2c81bd3face4f377d12cc0c8f597b47cf1df9e2d2897034

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1224b55cb707563ac85ee9098555e3c0294273d629f0f05b56f2ca4ce3b8bb52
MD5 4e7b612e95500ec9ef6fc9112da0b4c2
BLAKE2b-256 c41f4faecddac92b593bf3d099dbea65379c815544e50519398fb644760ad67c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 377b8c8799ad99c0ab797f743cf70aa35a920908b60570bc30eed043db77d2d4
MD5 765ac3e89ab3da3675cd10e09d7c73ba
BLAKE2b-256 b7a2bc4961c01d17c01184b828d57c62ffd278eb091669ad7bf908b5bd6c8260

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lite_camera-2.0.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c0b4ef05a39e01b65202af1c12bddd154e552084b5e17ac1951997bbb2b17114
MD5 aec37f17df7f3ad5e20be12d4d3b00af
BLAKE2b-256 e0d8b70a9576a746c959a16a222273690f1870506d35553208df20c67eb58740

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lite_camera-2.0.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b1601daef44e47a85dec16f4b12b0058c8626a555bafaafff22bea0bc545c20d
MD5 98f858f8b5c6e3773ac9c3e3f2384c9e
BLAKE2b-256 b113404b6b7a67ecef979531e41920fec3f19d477882a85225c5eecc96272fcf

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