adamancer / stitch2d Goto Github PK
View Code? Open in Web Editor NEWA Python script used to stitch a two-dimensional grid of tiles into a mosaic
License: MIT License
A Python script used to stitch a two-dimensional grid of tiles into a mosaic
License: MIT License
First, I would like to thank you for making this available, I have been using it for stitching the whole slide images our lab has been producing with wonderful results.
I recently upgraded from version 0.5 to version 1.0 and while I was updating the script I made I noticed that the correct color was not maintained when creating an array before saving. However, the correct color was maintained when saving the stitched image directly.
Unfortunately, I am not sure exactly how to troubleshoot the issue and I was wondering if someone might be able to provide some advice. I will attempt to upload my testing script as well as some βdemoβ images so someone can try to recreate what I am saying.
Hi,
I am working on using your package in order to stitch High Resolution SEM microscopy images that are taken in a snake like grid pattern. I am having issue with the package only saving out the first 200 image coordinates while I have 240 images in a 80x3 grid array.
However, it does provide the filenames for all 240 images in the json file.
I have been using the structured mosaic aspect of the package to do this:
from stitch2d import StructuredMosaic
StructuredMosaic.num_cores = 1
mosaic= StructuredMosaic(
Step0_SEM_Images_Folder,
dim = 80, # number of tiles in primary axis
origin="upper left", # position of first tile
direction="horizontal", # primary axis (i.e., the direction to traverse first)
pattern="snake" # snake or raster
)
mosaic.align()
mosaic.save_params(SEM_Params_Filename_Path)
mosaic.save(SEM_Stitched_Image_Path)
Similarly, the images I am using are high resolution each small image is 6144 by 4096 pixels and the code takes a very long time to run (over 300 min), but if I scale the images down by a factor of 3 then it take only 20 seconds.
If helpful I can provide the images or the output json.
I'd appreciate any help you can offer as well as want to thank you for doing this development as this fits my application very well.
Thanks,
Chris
When creating a structured mosaic, the output omits the 101st column of tiles, replacing it with the final column (in my case the 123rd column). Columns 102 through 122 are placed correctly. My file numbering appears to be correct for both alpha and numeric sorting. The fact that is occurs on the 101st & final column leads me to believe it is an arbitrary limit applied in a while loop which is only being ignored for one cycle ("while count <= 100") then picks up again.
i'm getting following error in installation
OS:- Ubantu 17.10
I also updated the supertool still no mluck
Collecting stitch2d
Using cached https://files.pythonhosted.org/packages/92/98/27704653b0243eebb1c08ef9e82475edda58ee841a0e768bed40e2d470fa/stitch2d-0.31.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/stitch2d.egg-info
writing top-level names to pip-egg-info/stitch2d.egg-info/top_level.txt
writing pip-egg-info/stitch2d.egg-info/PKG-INFO
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-7fo41qxe/stitch2d/setup.py", line 35, in
zip_safe=False)
File "/home/gulve/anaconda3/lib/python3.5/site-packages/setuptools/init.py", line 140, in setup
return distutils.core.setup(**attrs)
File "/home/gulve/anaconda3/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/gulve/anaconda3/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/gulve/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/gulve/anaconda3/lib/python3.5/site-packages/setuptools/command/egg_info.py", line 288, in run
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
File "/home/gulve/anaconda3/lib/python3.5/site-packages/setuptools/command/egg_info.py", line 613, in write_pkg_info
metadata.write_pkg_info(cmd.egg_info)
File "/home/gulve/anaconda3/lib/python3.5/distutils/dist.py", line 1107, in write_pkg_info
self.write_pkg_file(pkg_info)
File "/home/gulve/anaconda3/lib/python3.5/site-packages/setuptools/dist.py", line 91, in write_pkg_file
long_desc = rfc822_escape(self.get_long_description())
File "/home/gulve/anaconda3/lib/python3.5/distutils/util.py", line 471, in rfc822_escape
lines = header.split('\n')
TypeError: a bytes-like object is required, not 'str'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-7fo41qxe/stitch2d/
Hi Adam, I am a fellow geologist. I built this rig:
so i could take pictures of the drill core as it comes out of the ground. I am trying to stitch the resulting images with Stitch2D and hitting a wall. In the first case it is just putting the images next to each other, in the second case it cannot find any alignment.
These are the sample images I am trying to stitch:
I am a python and programing newbie, many thanks in advance for you help.
This library is super useful but it doesn't support stitching images that have a bit depth other than 8bit. Also, would it be possible to add an option to load image arrays directly rather than loading them from a file?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.