Lightweight pixel and matrix operations for image processing
Project description
PixelMatrix Core
Lightweight pixel and matrix operations for image processing in Python.
Installation
pip install pixelmatrix-core
Features
- Load and manipulate images as NumPy matrices
- Common image transforms (rotate, flip, resize, crop)
- Image analysis (histogram, contrast, entropy)
- Cross-platform system utilities
Quick Start
from imageanalysis import ImageMatrix, rotate, histogram
# Load an image
img = ImageMatrix.from_file("photo.jpg")
# Apply transformations
rotated = rotate(img.data, 45)
# Analyze
hist = histogram(img.data)
print(f"Mean intensity: {img.mean()}")
API Reference
ImageMatrix
img = ImageMatrix.from_file("image.png")
img = ImageMatrix.from_array(numpy_array)
# Properties
img.shape # Image dimensions
img.channels # Number of color channels
# Methods
img.to_grayscale()
img.normalize()
img.save("output.png")
Transforms
from imageanalysis import rotate, flip_horizontal, flip_vertical, resize, crop
rotated = rotate(matrix, angle=90)
flipped_h = flip_horizontal(matrix)
flipped_v = flip_vertical(matrix)
resized = resize(matrix, width=800, height=600)
cropped = crop(matrix, x=10, y=10, width=100, height=100)
Analysis
from imageanalysis import histogram, mean_intensity, contrast, entropy
hist = histogram(matrix)
mean = mean_intensity(matrix)
cont = contrast(matrix)
ent = entropy(matrix)
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pixelmatrix_core-0.1.0.tar.gz
(14.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixelmatrix_core-0.1.0.tar.gz.
File metadata
- Download URL: pixelmatrix_core-0.1.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c175a95f8b0a00b47c670acf0a5c6aa906477b5a6fb3457e9fe03d42176b0e32
|
|
| MD5 |
fca6a02ca592fec58c0214a8ab3794ff
|
|
| BLAKE2b-256 |
1474d79740d700fbbfc193cd9dc100433563fc5c3241d17d3b277d1f5cec097a
|
File details
Details for the file pixelmatrix_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pixelmatrix_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
163f388ec95bf4f80fa5f5ca7be9f938b690eaf651e3d1a48eafe176d40b3eae
|
|
| MD5 |
e0a163d7486ffd8af282703ce4f90247
|
|
| BLAKE2b-256 |
2553e4978dbb7052ae821aaf89e879febeae1f455872084ef19fccea0668867d
|