Skip to main content

Raspberry Pi Python License Status

LiteCV - Lightweight Computer Vision Library

LiteCV Logo

A lightweight, fast, and easy-to-use Python computer vision library

Features • Installation • Quick Start • Documentation • Examples • Contributing • License


About

LiteCV is a lightweight Python computer vision library designed for simplicity and performance. Inspired by OpenCV, it provides essential image processing operations, real-time camera capture, and a collection of filters optimized for both desktop and mobile devices. Built on top of industry-standard libraries like Pillow, pygame, and numpy, LiteCV offers a clean, intuitive API for computer vision tasks.

Why LiteCV?

  • Lightweight: Minimal dependencies, fast imports
  • Easy to Learn: Simple, intuitive API inspired by OpenCV
  • Fast: Optimized for real-time processing
  • Mobile-Friendly: Designed with mobile devices in mind
  • Well-Documented: Comprehensive examples and API docs
  • Active Development: Regularly maintained and updated

Features

Core Image Operations

  • ✅ Image I/O: Load, save, and convert images
  • ✅ Resizing: Resize by pixels or percentage with quality options
  • ✅ Color Conversion: RGB, Grayscale, and color space transformations
  • ✅ Enhancements: Brightness, contrast, saturation, sharpness adjustments

Filters & Effects

  • 🎨 Basic Filters: Grayscale, Blur, Edges, Sepia
  • 🎨 Advanced Filters: Cartoon, Sketch, Thermal, Night Vision, Infrared
  • 🎨 Motion Detection: Real-time motion tracking
  • 🎨 Customizable: Easy to extend with custom filters

Drawing & Graphics

  • 🖼️ Shapes: Draw circles, rectangles, and lines
  • 🖼️ Text: Render text with custom fonts and sizes
  • 🖼️ Composition: Concatenate and blend images

Camera & Real-Time Processing

  • 📹 Live Camera Feed: Real-time camera capture with pygame
  • 📹 Filter Application: Apply filters to live video streams
  • 📹 Interactive UI: Built-in GUI for camera control
  • 📹 Frame Control: Get individual frames or stream frames

Advanced Features

  • 🔍 Object Detection: Basic object detection framework
  • 🎬 Video Processing: Video frame extraction and processing
  • 📊 NumPy Integration: Direct array access for advanced operations
  • ⚡ Caching: Smart caching for performance optimization

Installation

From Local Repository (Development)

cd litecv
pip install -e .

From PyPI (When Published)

pip install litecv

System Requirements

  • Python: 3.10 or higher
  • Operating System: Windows, macOS, Linux
  • Camera (optional): For real-time camera features

Dependencies

  • pygame>=2.6.1 - Camera capture and real-time display
  • Pillow>=10.0.0 - Image processing
  • numpy>=1.26.0 - Array operations

Quick Start

1. Create and Save an Image

from litecv import new_image

# Create a 400x300 pixel image
img = new_image(400, 300, color='lightblue')

# Add text
img.draw_text('Hello LiteCV!', (50, 50), color='darkblue', size=24)

# Add shapes
img.draw_circle((200, 150), 50, color='red', fill='yellow')
img.draw_rectangle((100, 100), (300, 200), color='green', width=2)

# Save the image
img.save('my_image.jpg')

2. Apply Filters

from litecv import open_image, FilterType, StreamingFilter

# Open an existing image
img = open_image('my_image.jpg')

# Apply a filter
filter = StreamingFilter(FilterType.GRAYSCALE)
result = filter.apply(img.copy())

# Save the result
result.save('my_image_grayscale.jpg')

3. Real-Time Camera

from litecv import RealTimeCameraApp

# Create and start the camera app
app = RealTimeCameraApp(resolution=(800, 600), camera_resolution=(640, 480))
app.start()

# Use keyboard controls:
# 1-9: Switch filters
# 0: Original (no filter)
# ESC: Exit

4. Image Manipulation

from litecv import open_image, concatenate, blend_images

# Open images
img1 = open_image('image1.jpg')
img2 = open_image('image2.jpg')

# Resize
img1.resize(320, 240)

# Adjust properties
img1.brightness(1.2)  # 20% brighter
img1.contrast(0.9)    # 10% lower contrast
img1.saturation(1.5)  # 50% more colorful

# Concatenate images
combined = concatenate([img1, img2], direction='horizontal')
combined.save('combined.jpg')

# Blend images
blended = blend_images(img1, img2, alpha=0.5)
blended.save('blended.jpg')

Available Filters

LiteCV includes 10+ built-in filters accessible via FilterType enum:

Filter Description Use Case
GRAYSCALE Convert to grayscale B&W photography, preprocessing
EDGES Edge detection Object boundary detection
BLUR Gaussian blur Smoothing, privacy masking
SEPIA Vintage sepia tone Retro effects
CARTOON Cartoon effect Artistic rendering
SKETCH Pencil sketch Art simulation
THERMAL Thermal imaging Thermal effect
NIGHT_VISION Night vision effect Low-light simulation
INFRARED Infrared imaging IR effect
MOTION_DETECT Motion detection Movement tracking

Documentation

API Reference

See docs/api.md for complete API documentation including:

  • AdvancedLiteImage class methods
  • StreamingFilter usage
  • CameraFeed real-time control
  • Utility functions

Usage Guide

See docs/usage.md for:

  • Detailed usage examples
  • Best practices
  • Performance optimization tips
  • Common workflows

Examples

The examples/ folder contains production-ready demo scripts:

Basic Operations

Filters

Real-Time

Advanced

Branding

Running Examples

# Run any example with:
python examples/<filename>.py

# For instance:
python examples/basic_image.py
python examples/filters_demo.py
python examples/camera_app.py

Project Structure

litecv/
├── litecv/
│   ├── __init__.py          # Package entry point
│   └── _litecv.py           # Core implementation
├── examples/
│   ├── basic_image.py       # Basic operations
│   ├── filters_demo.py      # Filter demonstrations
│   ├── camera_app.py        # Real-time camera
│   ├── object_detection.py  # Detection example
│   ├── utilities.py         # Utility operations
│   ├── video_demo.py        # Video processing
│   ├── logo_demo.py         # Logo utilities
│   └── README.md            # Examples documentation
├── docs/
│   ├── api.md               # Complete API reference
│   └── usage.md             # Usage guide
├── logo/
│   ├── logo.png             # Main logo
│   ├── litecv_logo.svg      # Vector logo
│   └── generate_logo.py     # Logo generation script
├── tests/
│   ├── test_import.py       # Import tests
│   └── test_examples.py     # Example validation
├── README.md                # This file
├── LICENSE                  # MIT License
├── setup.cfg                # Package configuration
└── pyproject.toml           # Build configuration

Performance Tips

For Real-Time Applications

# Use optimize_speed=True for mobile/real-time
img.resize(320, 240, optimize_speed=True)
img.blur(radius=2, optimize_speed=True)

# Cache numpy arrays to avoid repeated conversions
arr = img.to_numpy()  # Cached internally

Memory Optimization

# Work with copies to preserve originals
filtered = img.copy()
filtered.blur(5)

# Load images in batches
images = [open_image(f) for f in file_list[:10]]

Troubleshooting

Camera Not Detected

# Check available cameras
import pygame.camera
pygame.camera.init()
cameras = pygame.camera.list_cameras()
print("Available cameras:", cameras)

Import Errors

Ensure all dependencies are installed:

pip install pygame pillow numpy

Image Codec Issues

For specific formats, install additional codecs:

# For WebP support
pip install Pillow-webp

LowMind

LowMind is a companion project providing AI and machine learning utilities. Install it with:

pip install lowmind

Visit the LowMind documentation for more information.


Contributing

We welcome contributions! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

git clone https://github.com/yourusername/litecv.git
cd litecv
pip install -e .
python -m pytest tests/

Code Style

  • Follow PEP 8
  • Use type hints where possible
  • Write docstrings for all public methods
  • Add tests for new features

Roadmap

  • GPU acceleration with CUDA
  • More object detection models
  • Video file I/O
  • Face detection and recognition
  • Machine learning integration
  • Mobile app support
  • Web interface
  • Performance benchmarks

License

LiteCV is licensed under the MIT License - see LICENSE file for details.

MIT License

Copyright (c) 2026 LiteCV Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

Changelog

Version 0.1.0 (2026-05-03)

  • Initial release
  • Core image operations
  • 10+ built-in filters
  • Real-time camera support
  • Object detection framework
  • Comprehensive documentation
  • 8 example scripts

Support


Acknowledgments


Made with ❤️ by the LiteCV team

Metadata

Release files for litecv-vedra 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litecv-vedra 0.1.0
File Size Uploaded Provenance Actions
litecv_vedra-0.1.0.tar.gz 24.8 kB Without provenance Details for litecv_vedra-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for litecv-vedra 0.1.0
File Interpreter ABI Platform Actions
litecv_vedra-0.1.0-py3-none-any.whl Python 3 none any Details for litecv_vedra-0.1.0-py3-none-any.whl

Total release size: 43.9 kB

Release files / litecv_vedra-0.1.0.tar.gz

Download URL litecv_vedra-0.1.0.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8457b05eea27102ad94956b13a3e17aa2afe35f0388edfdbc413d54ee32e676a
BLAKE2b-256 checksum
How to use checksums
b82240bf05a483ec21a954dbe1a5d765c2451f758b4a89e1f66a9a9ccae35339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / litecv_vedra-0.1.0-py3-none-any.whl

Download URL litecv_vedra-0.1.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15029ef703dcd8c3466c076c9560efd81035f07b166a5769fe05b971c1ada430
BLAKE2b-256 checksum
How to use checksums
158d781617eb3510dd5a25f2a2b9e2d1ccf7f83bafec9ac24c4d383ec18393e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for litecv-vedra 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page