Metadata-Version: 2.4
Name: dip-utils
Version: 0.1.0
Summary: Reusable Digital Image Processing (DIP) functions using OpenCV, NumPy, and SciPy
License: MIT License
        
        Copyright (c) 2026
        
        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, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        
Project-URL: Homepage, https://github.com/YOUR_GITHUB_USERNAME/dip-utils
Project-URL: Repository, https://github.com/YOUR_GITHUB_USERNAME/dip-utils
Project-URL: Issues, https://github.com/YOUR_GITHUB_USERNAME/dip-utils/issues
Keywords: digital-image-processing,image-processing,opencv,computer-vision,DIP
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: opencv-python>=4.7
Requires-Dist: scipy>=1.9
Dynamic: license-file

# DIP Utils

Reusable Digital Image Processing (DIP) functions built with OpenCV, NumPy, and SciPy. The functions return processed image arrays and do not display plots.

## Install

```bash
pip install dip-utils
```

## Quick start

```python
import dip

image = dip.load_image("input.jpg")

edges = dip.canny_edges(image)
dip.save_image("edges.png", edges)

restored = dip.constrained_least_squares_restoration(
    image, sigma=20, gamma=0.01
)
dip.save_image("cls_restored.png", restored)
```

## Included functions

- `load_image`, `save_image`
- `ideal_low_pass_filter`
- `butterworth_low_pass_filter`
- `histogram_equalization`
- `rotate_image`
- `laplacian_sharpen`
- `wiener_filter`
- `canny_edges`
- `sobel_edges`
- `prewitt_edges`
- `add_impulse_noise`
- `median_filter`
- `impulse_noise_median_filter`
- `region_growing`
- `frequency_noise_reduction`
- `split_and_merge`
- `hough_lines`
- `constrained_least_squares_restoration`

## Image color format

`load_image()` returns an RGB NumPy array. Functions generally expect RGB input. Use `save_image()` to save RGB output without swapping color channels.

## Requirements

Python 3.9 or newer. Dependencies are installed automatically by pip.

## Publishing

This project is prepared for packaging. Before publishing:
1. Replace `YOUR_GITHUB_USERNAME` in `pyproject.toml` with your GitHub username.
2. Check whether `dip-utils` is available on PyPI; if not, change the `name` in `pyproject.toml` and the install command to an available name.
3. Build and test the package:
   ```bash
   python -m pip install --upgrade build twine
   python -m build
   python -m twine check dist/*
   ```
4. Upload to TestPyPI first, then PyPI:
   ```bash
   python -m twine upload --repository testpypi dist/*
   python -m twine upload dist/*
   ```
   Twine will prompt for credentials or a configured API token. Do not put your token in source code.
