Skip to content

abhiTronix/Orthotile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orthotile

A python library for manipulating high-res Orthomosaic TIFF image for Computer Vision tasks.

Usage example

1. For generating tiles from orthomosaic TIFF image:

import orthotile

# intialize class with suitable orthomosaic TIFF image and output folder path
otiles = orthotile.Tiler(orthomosaic_image_path="orthomosaic_image.tiff", output_folderpath=".")

# generate tiles of given dimension
otiles.generate_tiles(tile_dimensions=512)

2. For stitching tiles back to orthomosaic image:

import orthotile

# initialize Stitcher class with tiles folder path, 
# orthomosaic image channel shape and tile dimension/size
sticher = orthotile.Stitcher(
    tiles_folder_path=".",
    orthomosaic_channel_width=57588,
    orthomosaic_channel_height=47222,
    tiles_size=512,
)

# stitch tiles back to orthomosaic image and cleanup tiles
sticher.stitch(cleanup_tiles=True)

3. Combined workflow for generating tiles and then stitching tiles:

import orthotile

# initialize Tiler class with suitable orthomosaic TIFF image and output folder path
otiles = orthotile.Tiler(orthomosaic_image_path="orthomosaic_image.tiff", output_folderpath=".")

# generate tiles of given dimension
otiles.generate_tiles(tile_dimensions=512)

# ==== Pass Tiler class parameters to Stitcher class ====

# initialize Stitcher class with metadata from Tiler class directly
sticher = orthotile.Stitcher(**otiles.get_metadata)

# stitch tiles back to orthomosaic image and cleanup tiles
sticher.stitch(cleanup_tiles=True)

Module installation

Installing from the source should be as simple as running:

python -m pip install .

About

A python library for manipulating high-res Orthomosaic TIFF image for Computer Vision tasks.

Resources

License

Stars

Watchers

Forks

Languages