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.6.tar.gz (71.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.6-cp313-cp313-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.6-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.6.tar.gz.

File metadata

  • Download URL: lite_camera-2.0.6.tar.gz
  • Upload date:
  • Size: 71.1 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.6.tar.gz
Algorithm Hash digest
SHA256 3c238811702f0a87c23c36a62ca345948316d0fb7ef205d8ef75b4ea2b458496
MD5 218cace0929d85a01116380d47a51c3b
BLAKE2b-256 d11e9c8a3cdb1f5bba064013872399a9578ef4c1ba14c2fc6bf2bebad8ea9815

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 af0808fbd288f25c6ead8a43bac85126aad5cee3b385c04d31847d8fdee559a0
MD5 d46c03f597f221f27b8602080872bb3c
BLAKE2b-256 f0811501cb2d86c8d3d8805a3151bef1e6a1fa1990d865e15c60bdc737168833

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dd63500324cc5863987c243bc871b5c0635ff6099dc23c85445fa8f542f479cb
MD5 ff957291c91025fb08f982cb1039e2a2
BLAKE2b-256 c0617b2ec850f62e5dafdf78910e5987691444bf6afe63b796b34a66193aa980

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a04b3258445e79f9b861d3a0bc233d6488b652011ad370c44966e2a57ed3b6c8
MD5 d0faa4aebee971157ea53a2c264624e9
BLAKE2b-256 5a4c42fa1857d9304da5817180362d5b65bdc7bc36342dd1f12e56b4b75fa1be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 177f3e4a26645093c8646adb9487ffb7db81f2a7f1e54f0f0205b7c4aa7e46c0
MD5 7c822c890e07c1fcbfc323c7e1374532
BLAKE2b-256 5a00835956b89293e871e04766930b17a53a9725117c7d241ece5c6b254ef900

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.6-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.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 216d26fd9f7d4b73aea925f6ca45dd93376db4ecb7b86839698fc59e6c06525f
MD5 733af9ada875fa9fc3438b3eef2cb5e7
BLAKE2b-256 369b7571ffc8b41c6c7de1e3344fd79366f90867e8b4dcbe3fbaa71c6b723209

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.6-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.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b9d39f6d3b7922a2f56238277b3958272085d75163d0c45509e893e998fff69d
MD5 9102be874376c5343586ba3be416dce7
BLAKE2b-256 e99069ff4434eccda95cdab52322a6a3a6d1fc856f8f1cc398ff971d07214fe3

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