Library for extracting raw bayer data from a Raspberry Pi JPEG+RAW file
Project description
picamraw
Library for extracting raw bayer data from a Raspberry Pi JPEG+RAW file.
Installable from PyPI; usable without camera hardware present.
Usage example
Extract raw bayer array
from picamraw import PiRawBayer, PiCameraVersion
raw_bayer = PiRawBayer(
filepath='path/to/image.jpeg', # A JPEG+RAW file, e.g. an image captured using raspistill with the "--raw" flag
camera_version=PiCameraVersion.V2,
sensor_mode=0
)
raw_bayer.bayer_array # A 16-bit 2D numpy array of the bayer data
raw_bayer.bayer_order # A `BayerOrder` enum that describes the arrangement of the R,G,G,B pixels in the bayer_array
raw_bayer.to_rgb() # A 16-bit 3D numpy array of bayer data collapsed into RGB channels (see docstring for details).
raw_bayer.to_3d() # A 16-bit 3D numpy array of bayer data split into RGB channels (see docstring for details).
Testing
This package is tested using tox
.
To run tests, simply pip install tox
and then run tox
.
Note: this code has only been tested against an image captured with camera version V2 and sensor_mode 0.
Attribution
This library was forked from the PiCamera package and heavily modified.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
picamraw-1.2.64-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file picamraw-1.2.64-py3-none-any.whl
.
File metadata
- Download URL: picamraw-1.2.64-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5eca59468ef88a6be1df81d659e843582e4ec0149064adefa3b2b617cfacbc7 |
|
MD5 | 54efed792ac6605523c427acc4f1d3c2 |
|
BLAKE2b-256 | 1e474efb0d0ab5d40142424e7f3db545e276733a45bd7f7f9095919ef30c96b3 |