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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.2-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.2.tar.gz.

File metadata

  • Download URL: lite_camera-2.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 9a8d0ff3dc8a0cec7577cec5ada1a42610ba92a37014882db01fe28f74e0fb26
MD5 34c20291d06c9ff84ab678bfb1686d12
BLAKE2b-256 ad9b70f2effcb69adb4a6325625179df6d4684188cc596502b0005b89a1d7623

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b1ad3de9c3a8f78798e410b97965fe186f176b75bd9d2804a8ab2617153b3d82
MD5 0a420b619be4d2dc475bffe88cafa6db
BLAKE2b-256 a135ecd58a67821baf65b69b58539cc1d2248b910eb2baed92676a551ef89cb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 791a7d69b9b98d6245ffaed4c029102b5509952b7b4dcd7c2f19986c1d53d1af
MD5 d28b57579a9eff2c2ca85b5d140b411b
BLAKE2b-256 2b728f05eee091756d9f34ebd362ed5ac85a3cced3c2b17d51991916020176c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 42cba6eb3b3888a721568b847859c6d9a6ada44c32f3d87c1bc630cb2c60d7e5
MD5 af56dbacdd1da3d3ccf7fbc0a3772902
BLAKE2b-256 454de1226fcfcf8acb88f1e264d08316d92737eac7828b2ed7cdd847cd514323

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 30495fe61d749ca16c46a6711f2e88d719f7141eee94bcbae492d90579c2e5f4
MD5 c0ca141dad1e5c081964a2a3a98e0229
BLAKE2b-256 6cd40fcd3a9bbc26e3e817a22fd705953b9fedc22ee43c0b1212861c0e299e75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.2-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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d3e9947db8fe8086f753bf14039dcc40bc3f13b13653c6fac17f758c659c0273
MD5 7bff50aff07a0741ca405e659b922df7
BLAKE2b-256 3f982405d325b39e72c36a1cd4dbc9a2773d6e93f364311684ad42e94a488333

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.2-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.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9f4bca17b358979e33d27fddb31d3f4cca141d5c71b32d2b08f5b7ccf61d2c15
MD5 fc16a3607b2b3a1c914c35b149d6784a
BLAKE2b-256 ff93dab16fc8cb8f75a4c637cfac08194045389db078ed26a1a6f14ed7c8a09f

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