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-0.1.3.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-0.1.3-py3-none-any.whl (57.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for grid_samp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fb3cbd389c42c15858da89b417f4b7fc4d83691a2e88008bd5d3c1debab3df2a
MD5 89519b49d2752d859a89952ca3f631a7
BLAKE2b-256 be7c1a0abbfb070a3aee27826d42698159e70f8054e8808f9025a0ff1438f26b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grid_samp-0.1.3-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.11.14

File hashes

Hashes for grid_samp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a9cd7396598a48519c6b9c4568e835c5479fdceb82420fb9499c6e7d8532e0e6
MD5 761fdcfa7e0da28fd80b837e93cb4255
BLAKE2b-256 74429e22fd8972bc3d9da1e4ad12d94c38f13c0eddf6741ac292f91e02363bdf

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