Skip to main content

rvmn

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

Install

pip install rvmn

For local development from this folder:

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

Python Usage

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:

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:

comparison = rvmn.compare_edges(gray)

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

Command Line

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:

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

Print machine-readable metrics:

rvmn image.png --json

Build

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.

Metadata

Release files for rvmn 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 rvmn 0.1.0
File Size Uploaded Provenance Actions
rvmn-0.1.0.tar.gz 6.1 kB Without provenance Details for rvmn-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 12.8 kB

Release files / rvmn-0.1.0.tar.gz

Download URL rvmn-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a4d79b39fb27df9f5e988d7ceb7cb7d4e24e9e620eaa2725b9de744a3718e47d
BLAKE2b-256 checksum
How to use checksums
47318152f898bd11ee5605b6cd490e4afbad470418925dcb7222ceddb7fb7241
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

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

Download URL rvmn-0.1.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aea49b60ea13ea070398e990855b33b10563c14b09d7568a5412b11ea10c7a90
BLAKE2b-256 checksum
How to use checksums
1d83d41a86cabe989421791967af82f6b6958e3378adb6f7d094d8dc238b5aff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for rvmn 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