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.
  • savePng(filename, width, height, rgbdata): Saves the frame as a PNG image.
  • saveJpegInMemory(width, height, rgbdata): Saves the frame as a JPEG image in memory.
  • savePngInMemory(width, height, rgbdata): Saves the frame as a PNG image in memory.

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.8.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.8-cp313-cp313-win_amd64.whl (36.1 kB view details)

Uploaded CPython 3.13Windows x86-64

lite_camera-2.0.8-cp312-cp312-win_amd64.whl (36.1 kB view details)

Uploaded CPython 3.12Windows x86-64

lite_camera-2.0.8-cp311-cp311-win_amd64.whl (36.1 kB view details)

Uploaded CPython 3.11Windows x86-64

lite_camera-2.0.8-cp310-cp310-win_amd64.whl (36.1 kB view details)

Uploaded CPython 3.10Windows x86-64

lite_camera-2.0.8-cp39-cp39-win_amd64.whl (36.1 kB view details)

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.8-cp38-cp38-win_amd64.whl (36.0 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for lite_camera-2.0.8.tar.gz
Algorithm Hash digest
SHA256 27ed58e3832a5e7c5ff0b0ca0d6252b2db95811468f51bfdfd6c1ed8c76a56d3
MD5 6787e5c29222a179229d5e124c81b4c9
BLAKE2b-256 95d666acb7ca5672fe88daa47019d4395ee6c338a020884bc94e23bd9079bfee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ebeae768ae4975b6edbbae66299b0507d6c00aac10b7a6aff5e851eb9f3b64b3
MD5 72b0ef411e7aa85d5a5d6632f9d78fc2
BLAKE2b-256 0efaf4eb7e4b044b3b531de54d115697f7a695a9b8db231fd873bbf6a49fa4f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 df35da0c82ca5744a8d6c6cd33c117114588cf9f95dce989dc361e6a9fc380c8
MD5 28c54841eec9c01c5d12532d79d8854a
BLAKE2b-256 da49a9544bd63c74b93bc5cc5a791d4937720bd516e10627b3778963b862c6cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 27be0273439b36ab0bb24b43484876afeb5d600f0e1de96c8ff6f5ad08d013f0
MD5 9c16d13a2cd92a7549607beee477a052
BLAKE2b-256 d5ae8e9845e0ca9bb32c1715a86352e4ff51a20520681b3818d88ce6e07c4257

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 78db54acc450200468dff2e2a1d5508c8cb913d3e87a1cce052aa4c71622a507
MD5 5cb4699fb109b708ef0a77d890ca5cfc
BLAKE2b-256 69b9f222bd1ad8a3157552a2bb25d1e972b76a8add31de1f0156e461cc16837a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lite_camera-2.0.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4a36cc00450ecf986623a19170fbb508fc1c7aee9a786619f31869fed784839e
MD5 016d081d0d5eb3cbe4af86fa09dc6180
BLAKE2b-256 9b2a725b6d001bbbc6770467380721b24d06edf7c0f417130e7d2ccdef4bb2b8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lite_camera-2.0.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c46ce3b76009ea72e350a3f9d2aed177a31df6bff38a9334ff45a24d4820281c
MD5 a45bc36c8c6be290ccf59ef2e19123d1
BLAKE2b-256 f3059c3e589193320530b9cba88a40309cbf2c85037b54ebe0448aef1e795e6f

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