Skip to main content

The official PIL Implementation of GridSamp: A common environment for grid-based image sampling using intuitive python code.

Project description

GridSamp

The official PIL Implementation of GridSamp: A common environment for grid-based image sampling using intuitive python code.

Overview

The GridSamp Python toolbox was created by Leemans, Bossens, and Wagemans (manuscript in preparation) as a tool for grid-based image sampling. It was created in Python 3.8 and is dependent on the following Python libraries: Pillow, numpy, scipy, and skimage. We thank the developers of each of these libraries and the Python programming language.

Install

pip install grid_samp

or

# clone the repo
git clone https://github.com/MLeemans1/GridSamp.git
cd grid_samp

# install locally
pip install -e .

Usage

A simple example:

# Open grid_samp toolbox
from grid_samp import ImageRegion, ImageRegionList
from grid_samp.grids import FixedGrid
from grid_samp.assemble import Mosaic

# Load example image
image = Image.open('example img.jpg')

# Initialize grid
fixed_grid = FixedGrid(image = image, n_rows = 4, n_cols = 5)

# Access and manipulate image regions
region_list = fixed_grid.image_regions
swapped_regions = region_list.swap(region_1_index = 10, region_2_index = 14)

# Extract result
swapped_regions_mosaic_1 = Mosaic.generate(image, swapped_regions)

Development Status

Contributions and feedback are welcome!

Cite GridSamp

Leemans, M., Bossens, C., & Wagemans, J. (in preparation). GridSamp: An open source python toolbox for grid-based image sampling.

Contact

maarten.leemans@kuleuven.be - Maarten Leemans, Maintainer

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

grid_samp-1.0.4.tar.gz (94.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grid_samp-1.0.4-py3-none-any.whl (57.8 kB view details)

Uploaded Python 3

File details

Details for the file grid_samp-1.0.4.tar.gz.

File metadata

  • Download URL: grid_samp-1.0.4.tar.gz
  • Upload date:
  • Size: 94.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for grid_samp-1.0.4.tar.gz
Algorithm Hash digest
SHA256 6fedfb2bc2b1bf48fd97d31bb464f3551b523e2f5a4c9ee2e8c3a6ec2a26e426
MD5 45b43264b26d2c6bda973bb01719e16f
BLAKE2b-256 f3a82a210c54906bf040dd80785a6d0dc1ddb3da4d3a2302680d18884a2d5293

See more details on using hashes here.

File details

Details for the file grid_samp-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: grid_samp-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 57.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for grid_samp-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 37884f16c20db3255b515c67be36653b37047fa43e617be0ebb6192154de4dce
MD5 279f648309631efac8f0306c2f9079b7
BLAKE2b-256 fcb9c4b9f1bde107d58b3e413314571f9168c28e0b810cca44d069500d82c8d6

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