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.4.tar.gz (245.4 kB view details)

Uploaded Source

Built Distributions

lite_camera-2.0.4-cp313-cp313-win_amd64.whl (137.8 kB view details)

Uploaded CPython 3.13 Windows x86-64

lite_camera-2.0.4-cp312-cp312-win_amd64.whl (137.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

lite_camera-2.0.4-cp311-cp311-win_amd64.whl (137.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

lite_camera-2.0.4-cp310-cp310-win_amd64.whl (137.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

lite_camera-2.0.4-cp39-cp39-win_amd64.whl (137.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

lite_camera-2.0.4-cp38-cp38-win_amd64.whl (137.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

File details

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

File metadata

  • Download URL: lite_camera-2.0.4.tar.gz
  • Upload date:
  • Size: 245.4 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.4.tar.gz
Algorithm Hash digest
SHA256 75e55e3eaa5c3988b285a4ea50e863c010ced27cb6b6e3b2da7a6569419b5589
MD5 1079d1671cc58cbfe3fcf6ed3570e06f
BLAKE2b-256 ca9fa108a72735fa5322978d27357cb0211a80c624de15438db22ae3eca72e60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c47f7533a8e033c482db5e5aa40f3903bc79e00695249c937e491812409afdb9
MD5 63ce6b4db135ef67bc3ebb09aae31580
BLAKE2b-256 1dc589f1fa76c9efc2d5590078619d4983cde03d46be81faa641b9f73bb8ab3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f4f79e48a8a75cb5312446cc3a55edd3faca438c4a838cd7b3ddb56b7ec5e3d4
MD5 2ef68b9c988a63cd8a12f7a1e5e0bdce
BLAKE2b-256 8fd05a04ebfbbef01f1c590d5c964d6b913029c16ee13fa084d9bce28a9e5455

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f0597523824c41460bde998878838ab29e60ea4c4dbbd8889d91b2684d1a58d3
MD5 484b09af14bffcc7ac9fef81878a3068
BLAKE2b-256 4822368eaa81edc001011a800e3941dc86e7e47cc4db5b3ffd8f4da45def5b74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ad64ab62634c39756ca530351832ea524784d8b087ee35edb0346ff3b3b9a796
MD5 e0b5728e72b9dd9550ba423b28845e9b
BLAKE2b-256 6e38a4434eaecb2ead62167d6d26a3af974d3adff225e1c0a64396153518c139

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4f3dc871350146295f54fa4b3c0bc0077ce965fed9dc85fa6b12b3eba4599aa7
MD5 5f6f5e312fe4b98b01182e80dec87319
BLAKE2b-256 c6638c034ea01de716dc88161ed1837056682604589ba5723e4259cf008d86b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1371faedea88eaab521d63602ead6edbb44dd75563aa25cbd66556eca7dc0302
MD5 f4dcefae55623e4b132b8b1a189655d0
BLAKE2b-256 5f469e5d4dfa55925eb663f93cc0f4c733d837564e4fa96cc82cc90630f65cde

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page