Stitching images
In this notebook we demonstrate how images can be stitched. Stitching is commonly necessary when images are acquired in [overlapping] tiles. Combining these tiles vertically or horizontally is called stitching.
After acquiring the images, you typically know how much the images overlap. Here we assume that the overlap is given as a number of pixels. If you only know the percentage of overlap, you need to compute this number by multiplying the percentage with the image size (width or height).
Note that these images contain some overlapping pixels. If we just assemble the images side-by-side, we see these pixels twice.
|
cle._ image
shape | (254, 296) |
dtype | float32 |
size | 293.7 kB |
min | 8.0 | max | 248.0 |
|
Pyclesperanto allows stitching the images with overlap. The overlapping region will be blended linearly.
|
cle._ image
shape | (254, 256) |
dtype | float32 |
size | 254.0 kB |
min | 8.0 | max | 248.00002 |
|
To demonstrate how the linear blending works, we create two synthetic images. First we combine them as shown above.
|
cle._ image
shape | (100, 200) |
dtype | float32 |
size | 78.1 kB |
min | 1.0 | max | 2.0 |
|
Then we stitch the images using linear blending.
|
cle._ image
shape | (100, 170) |
dtype | float32 |
size | 66.4 kB |
min | 1.0 | max | 2.0 |
|
Note: Computing the registration parameters for optimal overlapping the images is currently not supported in pyclesperanto.