Phovision
A pure Python computer vision library implementing various image processing algorithms from scratch. This library provides implementations of common image processing operations with no dependencies except NumPy.
Features
Image Processing:
- Gaussian Blur
- Median Filter (Noise Removal)
- Mean Filter (Averaging)
- Bilateral Filter (Edge-preserving smoothing)
Image I/O (Pure Python Implementation):
- Read images from files, URLs, base64 strings, or bytes
- Save images in various formats
- Convert images to base64 strings
- Supported formats: PNG (read), BMP (read/write), PPM/PGM (read/write)
Installation
pip install phovision
Usage
Basic Image Processing
from phovision import (
read_image, save_image,
gaussian_blur, median_filter,
mean_filter, bilateral_filter
)
# Read an image
image = read_image('input.bmp') # or .ppm, .pgm, .png
# Apply filters
blurred = gaussian_blur(image, kernel_size=5, sigma=1.0)
denoised = median_filter(image, kernel_size=3)
averaged = mean_filter(image, kernel_size=3)
smoothed = bilateral_filter(image, kernel_size=5, sigma_spatial=1.0, sigma_intensity=50.0)
# Save results
save_image(blurred, 'blurred.bmp') # or .ppm, .pgm
save_image(denoised, 'denoised.bmp')
Flexible Image I/O
from phovision import read_image, save_image, to_base64
# Read from local file
img1 = read_image('local_image.bmp')
# Read from URL
img2 = read_image('https://example.com/image.png')
# Read from base64 string
img3 = read_image('data:image/bmp;base64,...)
# Convert to base64 (useful for web applications)
base64_str = to_base64(img1, format='PPM') # or 'BMP'
# Save in different formats
save_image(img1, 'output.bmp') # Windows Bitmap
save_image(img1, 'output.ppm') # Portable Pixmap (color)
save_image(img1, 'output.pgm') # Portable Graymap (grayscale)
Working with NumPy Arrays
import numpy as np
from phovision import read_image, gaussian_blur
# Create a synthetic image
width, height = 200, 200
x, y = np.meshgrid(np.linspace(0, 1, width), np.linspace(0, 1, height))
synthetic = np.sin(10 * x) * np.cos(10 * y) * 127 + 128
synthetic = synthetic.astype(np.uint8)
# Process the synthetic image
processed = gaussian_blur(synthetic, kernel_size=5, sigma=1.0)
# The library works directly with numpy arrays
if isinstance(processed, np.ndarray):
print("Output is a numpy array!")
Requirements
- Python >= 3.7
- NumPy >= 1.21.0
License
MIT License
Metadata
Release files for phovision 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phovision-0.1.5.tar.gz | 9.3 kB | Without provenance | Details for phovision-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phovision-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for phovision-0.1.5-py3-none-any.whl |
Total release size: 17.9 kB
Release files / phovision-0.1.5.tar.gz
| Download URL | phovision-0.1.5.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22e17266cb86eae42dc80a6860b6a96843cf944301b44c5159fc8992ab289448
|
|
BLAKE2b-256 checksum How to use checksums |
6feca1360fa56f38dc739ec3412cce63d37520cbb4a11a618cfbe4fe9c8bd4f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / phovision-0.1.5-py3-none-any.whl
| Download URL | phovision-0.1.5-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47744f6171a94dadf90474a924c029d70f43e051b97e0ce1d3197e8079811401
|
|
BLAKE2b-256 checksum How to use checksums |
897833a39367e7290ef792fcc996b2888e2c860f91f3ea7b6d3815d9f5f79d2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for phovision 0.1.5
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.