Skip to main content

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.

Release files for picamraw 1.2.64

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

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

Release files / picamraw-1.2.64-py3-none-any.whl

Download URL picamraw-1.2.64-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5eca59468ef88a6be1df81d659e843582e4ec0149064adefa3b2b617cfacbc7
BLAKE2b-256 checksum
How to use checksums
1e474efb0d0ab5d40142424e7f3db545e276733a45bd7f7f9095919ef30c96b3
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.2.64 This release

1 release file

1.2.63

1 release file

1.1.42

1 release file

1.1.41

1 release file

1.1.27

1 release file

1.1.22

1 release file

1.0.15

1 release file

1.0.0

1 release file

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