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.3.tar.gz (147.4 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.3-cp313-cp313-win_amd64.whl (40.3 kB view details)

Uploaded CPython 3.13Windows x86-64

lite_camera-2.0.3-cp312-cp312-win_amd64.whl (40.3 kB view details)

Uploaded CPython 3.12Windows x86-64

lite_camera-2.0.3-cp311-cp311-win_amd64.whl (40.3 kB view details)

Uploaded CPython 3.11Windows x86-64

lite_camera-2.0.3-cp310-cp310-win_amd64.whl (40.3 kB view details)

Uploaded CPython 3.10Windows x86-64

lite_camera-2.0.3-cp39-cp39-win_amd64.whl (40.3 kB view details)

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.3-cp38-cp38-win_amd64.whl (40.3 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

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

File metadata

  • Download URL: lite_camera-2.0.3.tar.gz
  • Upload date:
  • Size: 147.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.3.tar.gz
Algorithm Hash digest
SHA256 84ebac7efbca0d1152c2f7b9182f1af204299d6cc0fef315a8849a42ed034ffc
MD5 1ed31283a5134972678ab23b8f0fcf48
BLAKE2b-256 315882bde8cd42fe83bb45e700534d07f45d2d03f09ba738f0408ef8e13f7c25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 023b7a74f54f469ad154db9cef8c2ed9e5dae322372eb88bcdaa6af0fe935712
MD5 ee8bcdf3c62466c81cf364fad949fd4e
BLAKE2b-256 8f3f4c30bacf549c669d0b3460a80d3b278b2c99ecec6892820f2ba899a5ae8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d31308f293deee2f858cdc4df791ebfbf0d5be2117916070379472c6f76eb563
MD5 f0c1575dfba5110af0e40ecf2dda3f4d
BLAKE2b-256 6eb9559f105b50e620226da189d5bce772c2152c2caae7db25490cd4986df8ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b4a814f358085aa0853998e080bfb32c1e064eb548ea5ddac48ecaf30739d87f
MD5 e6026e942d75e826f011fc0393ba61fe
BLAKE2b-256 ce6797966176ceb60e8d529fa95291b7d974851efc2d102492ff9d121e3c54cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 223c63a2eb4028ff3d6bd66040ae9b7bdf942b5be3526f5effe043dd640b1368
MD5 674833ce8a5142603a862a44deeafe55
BLAKE2b-256 b5379c48178ee622faa70bd02e7bd22f978664b048ea177d77b3b6cd7a0ec358

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 40.3 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1e6f7da0b62a094969b55218695313f396239d755f453fff7d2ca0bb73385c95
MD5 d8f0d7664a592ccbd01806c43ca26b05
BLAKE2b-256 4d4b098f9a28d40b803b7367628eca02ec72901151c5a3869572997c44ff41ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 40.3 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.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 49e0c89731ba560eb71c99923efc1cacdeed85bf45a11ab8cc03d3bf2956e34a
MD5 627bc7460ee96b4809b7f268407bffef
BLAKE2b-256 8986786d599046163d67290049f2653d6cff7ff1b4aa6fd9e0f418803ea8598b

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