Metadata-Version: 2.4
Name: rvmn
Version: 0.1.0
Summary: RVMN directional edge detection filters and comparison utilities.
Project-URL: Homepage, https://github.com/your-username/rvmn
Project-URL: Issues, https://github.com/your-username/rvmn/issues
Author: Siddh
License-Expression: MIT
Keywords: edge-detection,image-processing,opencv,rvmn
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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 :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.9
Requires-Dist: numpy>=1.23
Requires-Dist: opencv-python>=4.8
Requires-Dist: scikit-image>=0.20
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Provides-Extra: plots
Requires-Dist: matplotlib>=3.7; extra == 'plots'
Description-Content-Type: text/markdown

# rvmn

RVMN is a small Python package for directional edge detection using custom
RVMN-style masks, plus Sobel/Prewitt comparison helpers.

## Install

```bash
pip install rvmn
```

For local development from this folder:

```bash
pip install -e ".[dev,plots]"
```

## Python Usage

```python
import cv2
import rvmn

image = cv2.imread("image.png")
gray = rvmn.to_grayscale(image)

result = rvmn.apply_rvmn(gray, lam=0.1, rho=0.9, theta=0.3)
sobel = rvmn.apply_sobel(gray)
prewitt = rvmn.apply_prewitt(gray)

metrics = rvmn.compute_metrics(gray, result)
print(metrics.psnr, metrics.rmse)
```

Search for the best parameter combination:

```python
search = rvmn.search_best_params(gray)

print(search.params)
print(search.metrics.psnr)
cv2.imwrite("rvmn_output.png", search.image)
```

Compare RVMN, Sobel, and Prewitt in one call:

```python
comparison = rvmn.compare_edges(gray)

print(comparison.rvmn.params)
print(comparison.sobel_metrics.psnr)
print(comparison.prewitt_metrics.psnr)
```

## Command Line

```bash
rvmn image.png --output results
```

This writes `rvmn_output.png`, `sobel_output.png`, and `prewitt_output.png`.

Use fixed RVMN parameters instead of a full search:

```bash
rvmn image.png --lambda 0.1 --rho 0.9 --theta 0.3 --output results
```

Print machine-readable metrics:

```bash
rvmn image.png --json
```

## Build

```bash
python -m build
```

The build configuration includes only `src/`, `tests/`, `README.md`, and
`pyproject.toml` in the source archive, and only the `rvmn` package in the wheel.
Generated notebooks, images, PDFs, result folders, caches, and old `dist/`
contents are excluded.

## Notes

The coefficient formulas are packaged from the current notebook implementation.
Keep citation and formula details close to your paper/report when publishing.
