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 could be a complement to OpenCV for enumerating capture devices.

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

    python setup.py develop
    
  • Release

    python setup.py build
    
  • Source Distribution

    python setup.py sdist
    

Usage

Basic Example

import device

camera = device.PyCamera()

if camera.open(0):

    window = device.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.0.tar.gz (142.0 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.0-cp313-cp313-win_amd64.whl (20.5 kB view details)

Uploaded CPython 3.13Windows x86-64

lite_camera-2.0.0-cp312-cp312-win_amd64.whl (20.5 kB view details)

Uploaded CPython 3.12Windows x86-64

lite_camera-2.0.0-cp311-cp311-win_amd64.whl (20.5 kB view details)

Uploaded CPython 3.11Windows x86-64

lite_camera-2.0.0-cp310-cp310-win_amd64.whl (20.5 kB view details)

Uploaded CPython 3.10Windows x86-64

lite_camera-2.0.0-cp39-cp39-win_amd64.whl (20.5 kB view details)

Uploaded CPython 3.9Windows x86-64

lite_camera-2.0.0-cp38-cp38-win_amd64.whl (20.5 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

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

File metadata

  • Download URL: lite_camera-2.0.0.tar.gz
  • Upload date:
  • Size: 142.0 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.0.tar.gz
Algorithm Hash digest
SHA256 d5cf467e638ddb782cf7b2ea58862db53ba40b5826a0a7d7aab062f89136740a
MD5 1abc2d50e4a95798be4044a026f72780
BLAKE2b-256 8b62b6a66b4914461377c6aac6895cc45d6c3c5b63ee75dc1d098d0dbe9329a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5a60634f1a4fc0ff79f2fcb1007acfe7e2940b49dd539622a6b4ef506ba461c0
MD5 0b6e545e6beec33c6bf561acf28c8e2d
BLAKE2b-256 5436be2152bc721f19d8732af9e0a830b3c73e03d7e5978f499e9e3eaa914344

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5a7553f63fb6393641a115ff8dd05f199a4d669c5e1556e5de38d0b440b433b2
MD5 6df5fa3829272a884617b753fc4014fd
BLAKE2b-256 1a828f53768cb6adacf76afe26028e1c6070c1367c52c001f57f3d01bb3c4782

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5fee75c0424651dfbc71fcacad79960834be61c68c28af60b67708b8e6a01a85
MD5 cdd0dc8b9cdfc5dab8c4665aa336b89f
BLAKE2b-256 f9d433e784384d90de4330b3e2d9cd1d322b86bca80bfcefe7399ce2f3900750

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lite_camera-2.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1534c60ffaa538eb189cf1ddcbe24c6467c0640773b56dcfa15e2c8dba8846de
MD5 3ce17054c5e1b7a9c9a3a6432bdc7767
BLAKE2b-256 cc089b55cb161bcac2e7aa222a1d9790e12b05ce60cba7f01d0ccb7bc9042e59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 20.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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2e3df39f0433536a7cb88e59736cdac6a3c22e941504416f3570b27aae850959
MD5 1c3725d682792bccf29c0d29800b1ceb
BLAKE2b-256 c2c67987e419eb9c9300f061b3f953bc2deee914a690bb4cc1de48ef961dcf04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lite_camera-2.0.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 20.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.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6f48ddb51360e5da3ea3d0707d37bfffd7aa3b18c00301104eb3af67cdef848e
MD5 cffee29ebb1e6ef62319e76e6917a40e
BLAKE2b-256 2dba38868b14539739ce05e4b40f370060a58151e7d4f0b10dc2974a14863db5

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