Skip to main content

Pythonic API for the framewave SIMD library

Project description

************************************************
:mod:`motmot.FastImage` -- SIMD image processing
************************************************

.. module:: motmot.FastImage.FastImage
:synopsis: SIMD image processing
.. index::
module: FastImage
single: FastImage

Description
===========

FastImage implements low-level image processing operations designed to
operate very quickly by using SIMD instructions. This is achieved by
calling the Framewave__ library. A bridge to numpy is made through the
`array interface`__.

__ http://framewave.sourceforge.net/
__ http://docs.scipy.org/doc/numpy/reference/arrays.interface.html

Allocation of aligned memory
============================

For the SIMD instructions to perform at maximal speed, images must be
aligned on 32-byte boundaries. FastImage relies on the underlying
image processing library to allocate the memory, trusting that it
knows best::

import motmot.FastImage.FastImage as FastImage
import numpy as np

# Allocate the image
fi_im1 = FastImage.FastImage8u( FastImage.Size(4,5) ) # width, height

# Get a numpy view
im1 = np.asarray( fi_im1 )
assert im1.shape == (5,4) # height, width

In the above example, im1.strides will be (32,1), indicating that each
row is aligned on a 32 byte boundary.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

motmot.FastImage-0.5.5.zip (33.3 kB view details)

Uploaded Source

motmot.FastImage-0.5.5.tar.gz (25.8 kB view details)

Uploaded Source

File details

Details for the file motmot.FastImage-0.5.5.zip.

File metadata

File hashes

Hashes for motmot.FastImage-0.5.5.zip
Algorithm Hash digest
SHA256 396e45bcc4217530c61f10b80e39bd250aac2779687cd1f3ec96e5a06c48d781
MD5 5d58e639e3a739f5bb44989ba6bc1a61
BLAKE2b-256 05e6944e992c168a4bd93a50a02d2a6e85ac636576df9efb7083c47d6e170a92

See more details on using hashes here.

Provenance

File details

Details for the file motmot.FastImage-0.5.5.tar.gz.

File metadata

File hashes

Hashes for motmot.FastImage-0.5.5.tar.gz
Algorithm Hash digest
SHA256 6a6e31f6377514a5615f714474be934651148bdbec6195d27d9cb2dc4f1ea632
MD5 e20c214dd917605817642ddf498293fc
BLAKE2b-256 314d4b7b08c595d56beb8837f383bd9a5bfbe3e02f9a033a4dbb2624ceb7683e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page