RawHandler
RawHandler is a lightweight wrapper around rawpy that provides convenient tools for working with raw sensor data, particularly for training neural networks on raw images.
Features
RawHandler can:
-
Open and convert most camera raw files into numpy arrays.
-
Apply black and white point correction automatically.
-
Provide multiple representations of the underlying sensor data:
- Mono Bayer representation
- 3-channel sparse representation
- 4-channel RGGB representation
-
Demosaic Bayer data using colour-demosaicing, supporting:
- Bilinear interpolation
- Malvar–He–Cutler (2004)
- DDFAPD – Menon et al. (2007)
-
Convert color spaces from the camera’s native space to standard targets such as XYZ, sRGB, AdobeRGB, or linear Rec.2020 — all available for every representation.
-
Crop, resize, and generate thumbnails while preserving Bayer pattern alignment.
-
Read EXIF/metadata information (ISO, shutter speed, orientation, etc.) and return it as a convenient Python dictionary.
Currently supported: Bayer raw images In progress: Fujifilm X-Trans support
Installation
You can install RawHandler directly from PyPI:
pip install RawHandler
Or install locally from source:
# Clone the repository
git clone https://github.com/rymuelle/RawHandler.git
cd RawHandler
# Editable/development install
pip install -e .
# Standard local install
pip install .
Example
A simple demo notebook is available:
examples/simple_demosaicing.ipynb
This example downloads a raw image and demonstrates the basic functionality of RawHandler.
License
This project is released under the MIT License.
Acknowledgments
Special thanks to the authors of RawNIND:
Brummer, Benoit; De Vleeschouwer, Christophe, 2025. Raw Natural Image Noise Dataset. https://doi.org/10.14428/DVN/DEQCIM, Open Data @ UCLouvain, V1.
Metadata
Release files for RawHandler 0.2.2
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 |
|---|---|---|---|---|
| rawhandler-0.2.2.tar.gz | 17.9 kB | Without provenance | Details for rawhandler-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rawhandler-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for rawhandler-0.2.2-py3-none-any.whl |
Total release size: 36.9 kB
Release files / rawhandler-0.2.2.tar.gz
| Download URL | rawhandler-0.2.2.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b91b5e24b1f82588ab96efcab70131f7b355f7df4d8eca0744ed6de80be29a32
|
|
BLAKE2b-256 checksum How to use checksums |
d63ffc3e5446cbf4e047408415c943360dc6eaadeb83ed7fd6a3b0d30b4aba0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / rawhandler-0.2.2-py3-none-any.whl
| Download URL | rawhandler-0.2.2-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
888b817669394ad190c5e2b9bc6905006b76e28423a3f5d987bb9e1f470a4e27
|
|
BLAKE2b-256 checksum How to use checksums |
ae43a9a1698fa53a9f199826b315316a5a253ef4eeec0aef5d797bb44bb0637f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for RawHandler 0.2.2
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.