Metadata-Version: 2.4
Name: cv3
Version: 1.3.2
Summary: Pythonic cv2
Home-page: https://github.com/gorodion/cv3
Author: gorodion
Author-email: gorodion <domonion@list.ru>
License: Apache 2.0
Project-URL: Homepage, https://github.com/gorodion/cv3
Project-URL: Documentation, https://cv3.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/gorodion/cv3
Project-URL: Bug Tracker, https://github.com/gorodion/cv3/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.19.5
Requires-Dist: opencv-python>=4.2.0.34
Dynamic: author
Dynamic: home-page
Dynamic: license-file

# cv3: Pythonic OpenCV

cv3 is a Pythonic wrapper for OpenCV that simplifies computer vision tasks by providing
more intuitive interfaces and eliminating common boilerplate code.

## Principles
1. Solve more important tasks than writing extra code
2. You are programming in Python, not C++
3. OpenCV is not scary

## Why cv3?

OpenCV is a powerful computer vision library, but its API can be verbose and unintuitive,
especially for Python developers. cv3 addresses these issues by:

- Providing sensible defaults for common parameters
- Accepting more flexible input types (e.g., float coordinates, pathlib.Path objects)
- Eliminating repetitive code patterns
- Adding Pythonic features like context managers and iterators
- Handling common error cases with better error messages

## Key Benefits

- **Simplified API**: Common operations require fewer parameters
- **Type Flexibility**: Accepts various input types where OpenCV is strict
- **Error Handling**: Better error messages and automatic handling of common issues
- **Pythonic Design**: Context managers, iterators, and other Python idioms
- **RGB by Default**: Works with RGB color format by default (configurable)

## Installation

You can install cv3 using either of the following methods:

1. From PyPI (recommended):

```bash
pip install cv3
```

2. From GitHub (latest development version):

```bash
pip install git+https://github.com/gorodion/cv3.git
```

## Quick Start

```python
import cv3

# Read an image (automatically handles RGB conversion)
img = cv3.imread('image.jpg')

# Draw a rectangle without specifying color or thickness
cv3.rectangle(img, 100, 50, 150, 100)

# Save the image (automatically creates directories if needed)
cv3.imwrite('output/image_result.jpg', img, mkdir=True)

# Display in a window with context manager
with cv3.Window('Result') as window:
    window.imshow(img)
    window.wait_key(0)
```

This is just a small example of what cv3 can do. Check out the [documentation](https://cv3.readthedocs.io/en/latest/)
for a comprehensive overview of all the improvements and additions that cv3 provides over raw OpenCV.

You can also get acquainted with the features in [demo.ipynb](https://github.com/gorodion/cv3/blob/main/demo.ipynb)

## Requirements

- Python 3.6+
- opencv-python (or variants)

## Documentation

https://cv3.readthedocs.org/

## Run tests

```bash
pytest -v
```

---
I hope this is helpful, please contribute 🙂
