Skip to main content

Easy to use multi-core affine transformations

Project description

Travis Status AppVeyor Status Codecov Status ReadTheDocs Status PyPI license code quality code style Requirements Status

This project explores how C++17 and OpenMP can be combined to write a surprisingly compact implementation of n-dimensional parallel affine transformations which are linked into Python via the affine_transform module.

While this project is still under development, the following features are supported:

  • Linear and cubic (without prefiltering) interpolation

  • Constant boundaries

  • Compiling code for arbitrarily dimensional data

  • Parallelism via OpenMP

Short example usage

import numpy as np

from affine_transform import transform
from mgen import rotation_from_angle

import matplotlib.pyplot as plt


# Create a simple white square in an image
original = np.zeros((601, 401))
original[100:300, 100:300] = 1

# Rotate by 22.5° (around the centre of the square (200,200))
# and shift +200 in x and +100 in y
transformed = transform(
    original, rotation_from_angle(np.pi / 8), np.array([200, 100]), origin=(200, 200)
)

Project details


Download files

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

Source Distribution

affine_transform-0.2.1.tar.gz (1.1 MB view details)

Uploaded Source

File details

Details for the file affine_transform-0.2.1.tar.gz.

File metadata

  • Download URL: affine_transform-0.2.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for affine_transform-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3f5b267b733b1655f4d88ac55cee5cec0bbd3765249737b3a6f9bfcdf346dbb9
MD5 f9681e9893b208959a1de4e1a8aa2462
BLAKE2b-256 eb6677a9f6a19682485ef57ce178e8c6f95e37ebf358648daac4f752a859deaa

See more details on using hashes here.

Supported by

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