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.7.tar.gz (71.2 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.7-cp313-cp313-win_amd64.whl (30.2 kB view details)

Uploaded CPython 3.13Windows x86-64

lite_camera-2.0.7-cp312-cp312-win_amd64.whl (30.2 kB view details)

Uploaded CPython 3.12Windows x86-64

lite_camera-2.0.7-cp311-cp311-win_amd64.whl (30.2 kB view details)

Uploaded CPython 3.11Windows x86-64

lite_camera-2.0.7-cp310-cp310-win_amd64.whl (30.2 kB view details)

Uploaded CPython 3.10Windows x86-64

lite_camera-2.0.7-cp39-cp39-win_amd64.whl (30.2 kB view details)

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.7-cp38-cp38-win_amd64.whl (30.1 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

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

File metadata

  • Download URL: lite_camera-2.0.7.tar.gz
  • Upload date:
  • Size: 71.2 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.7.tar.gz
Algorithm Hash digest
SHA256 7957e5207891dd93aeab4636b193ba8221345b0dab584799ece3af75ebfe9099
MD5 8b92a66cbace0cf38b91dbc3b228716e
BLAKE2b-256 849c388395467d9bf19a7a5f787956ddb6cdbb00c7bda3282893a19ba6373b04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 965fd6244251edd9ec4ea061779e774308eb541a160f2e31307e0cccece67094
MD5 244ed4f5422c5033c6ea6cd31a004fa4
BLAKE2b-256 20d4ac5cd559c3cd5ce1abf1a82ab86968e99f7f8b64d4a35bf3d90ed25c2c8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cdad0ce8cf09dad851b1e5ea4be0288e8151c1fbe4968b8532836bb8b2a7b4c4
MD5 0be0352159107fb3f9c136bb678c076c
BLAKE2b-256 b8905da11aac8e9227845b27ef7cbb35392fd91bba63304a1804e3826858778b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f77e0975a2484b0659b0741114f97f9891d8aa84c36684f0637d6f5277e6818a
MD5 5c45557f934c937c73b60c4573bc3d9a
BLAKE2b-256 6527894fc8ad5e91ab8b4a87c6f27bc62442bb311d583687d41ef6c91d0d6e4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8d5f2098791ae9bd7f58ec941cd22ff05b7202cb61bd64a499494ac55fe627ae
MD5 71312d5e2035c4bf9e289fd743f45695
BLAKE2b-256 dde801e02e1e6e31f480642a0d4aad66f5318ab532873cb96bb26a8118b11cbe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.7-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 30.2 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.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3328986dec748a8794e1d534f8c568baea2144e557533bf5d58a80f57b16f9a7
MD5 f42aca023468dd9a9cab97011d6e5c53
BLAKE2b-256 ef97157bb98b00a573950a485eca76782f820b79fd9c1b6d61a8d223fd72f673

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.7-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 30.1 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.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1f11f12295b84c8334329ef0df7ad558cce33305ee2029842573207d3f581f18
MD5 f1707f834114e917e55b06b358947bfa
BLAKE2b-256 339e23205b833406d5e0a780a33018a132393197e440e684ef9c233cbcd0c71e

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