Skip to main content

Image Tiler

Image Tiler is a Python package that allows you to split an image into tiles based on a grid and overlap between tiles. It also provides functionality to combine the tiles back into the original image.

Installation

You can install Image Tiler using pip:

pip install image-tiller

Usage

SplitImage Class

The SplitImage class is used to split an image into tiles based on a grid and overlap between tiles. The class takes in an image path, the number of rows and columns in the grid, and the overlap between tiles.

CombineTiles Class

The CombineTiles class is used to combine tiles back into the original image. The class takes in a list of tiles, the number of rows and columns in the grid, and the overlap between tiles.

Example

from ImgTiler import SplitImage, CombineTiles
import cv2

img = cv2.imread('image.jpg')
grid = (3, 4) #3 rows, 4 columns
overlap = 30 #30 pixels
show_rects = True
show_image = True

splitter = SplitImage(img, grid, overlap) # Create SplitImage object
tiles = splitter.split_image(show_rect=show_rect, show_tiles=show_image) # Split image into tiles

combiner = CombineTiles(tiles, grid, overlap) # Create CombineTiles object
img2 = combiner.combine_tiles(show_image=show_image) # Combine tiles into original image

Original Image

Orignal Image

Split Result

Split Image without Rectangle Split Image with Rectangle

Combined Image

Combined Image without rectangle Combined Image with rectangle

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT license.

Metadata

Release files for image-tiller 0.1.2.1

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

Source distribution (sdist)

Source distribution for image-tiller 0.1.2.1
File Size Uploaded
image_tiller-0.1.2.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for image-tiller 0.1.2.1
File Interpreter ABI Platform
image_tiller-0.1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / image_tiller-0.1.2.1.tar.gz

Download URL image_tiller-0.1.2.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cacbb7a7485ab6e229b9fe2c99020b405ca8ed89309fe7213a84d2e0d30d75db
BLAKE2b-256 checksum
How to use checksums
3d504cc9856ec95d1a4c906e5b9c7878b6ef82b93771366081f42be0328c4fc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / image_tiller-0.1.2.1-py3-none-any.whl

Download URL image_tiller-0.1.2.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d066c3190a4174c6d5afe85c232df0ef702a62b6b90f6f3fcf65b74b0b07e8c
BLAKE2b-256 checksum
How to use checksums
451dd0b81afbd4d06816fffa0243c26718ed9a3f7128e294dbac27e414343342
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.2.1 This release

2 release files

0.1.1

2 release files

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