{ "info": { "author": "adamancer", "author_email": "mansura@si.edu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Topic :: Multimedia :: Graphics" ], "description": "Stitch2D\n========\n\n*Some features in this script require OpenCV 3.0 and ImageMagick.*\n\nStitch2D is a Python script that can be used to stitch a two-dimensional\ngrid of tiles into a mosaic. You can install it from the command line\nusing pip:\n\n::\n\n pip install stitch2d\n\nOverview\n--------\n\nUsers can set offsets manually (if the offset is regular) or\nautomatically (if OpenCV is installed). If OpenCV is used, tiles that\ncannot be placed confidently are excluded from the final mosaic. Tiles\nare not warped in either case.\n\nThe options available in this module are fairly basic. For more complex\ntilesets, consider using the `image stitching\nplugin `__ in Fiji.\n\n`Documentation `__\nis available at ReadTheDocs.\n\nUsing the Command Line Tools\n----------------------------\n\n\u21e9 `Example tileset for\nmosaic `__ (18.5 MB; 8\ncolumns, snaked)\n\nBegin by collecting the tilesets you want to stitch as subdirectories in\na single folder. Each subdirectory processed with a single command will\nbe processed use the same parameters, so offsets for the different\ntilesets should be very identical.\n\nThere are four subcommands that can be accessed from the command line:\nmosaic, composite, organize, and select. In addition to the text below,\ninformation about of these commands can be accessed from the command\nline using -h.\n\n**mosaic**\n\nUse the mosaic subcommand to stitch together a set of tiles. The\nresulting mosaic is saved in the parent of the directory containing the\nsource tiles. From the command line:\n\n::\n\n stitch2d mosaic\n\nYou can specify additional keyword arguments to control how tiles are\nstitched:\n\n::\n\n stitch2d mosaic -path /path/to/tiles -matcher brute-force -scalar 0.5 -threshold 0.7 --equalize_histogram --create_jpeg\n\nOptional arguments include:\n\n- **-path**: Specifies to path to the source tiles. This argument works\n in all subcommands except organize. If no path is specified, you will\n be prompted to select a directory.\n- **-numcols**: Specifies the number of columns in the mosaic. If not\n provided, the user will be prompted for this information.\n- **--raster**, **--snake**: Specifies whether tileset is rastered or\n snaked. If neither argument is provided, the user will be prompted\n for this information.\n- **--create\\_jpeg**: Specifies whether to create a half-size JPEG\n derivative of the final mosaic.\n- **--manual**: Force manual selection of offsets. The script will\n default to manual matching if OpenCV is not installed.\n\nThe following arguments can be used to tweak the behavior of OpenCV:\n\n- **-matcher**: Specifies the algorithm used for feature matching. Must\n be either \"brute-force\" or \"flann\"; \"brute-force\" is the default.\n **Note:** The flann matcher has proven unreliable and is currently\n disabled.\n- **-scalar**: Specifies the amount by which to resize source tiles\n before attempting to match features. Must be a decimal between 0 and\n 1; the default value is 0.5. Smaller values are faster but\n potentially less accurate. The mosaic itself will be made from the\n full-sized tiles.\n- **-threshold**: The threshold for the Lowe test. Must be a decimal\n between 0 and 1; the default value is 0.7. Lower values give fewer\n but better matches.\n- **--equalize\\_histogram**: Specifies whether to try to equalize\n histogram in the source image. This can increase contrast and produce\n better matches, but increases computation time.\n\nThese keywords can also be passed directly stitch2d.mosey().\n\nMore information about OpenCV parameters can be found in the\n`OpenCV-Python\ntutorials `__.\n\n**composite**\n\nMakes a composite image by recoloring and overlaying SEM element maps\nwith data for different elements.\n\n::\n\n stitch2d composite -path /path/to/mosaics -red Fe -green Mg -blue Al\n\nThe composite commands accepts the **-path**, **-label**, and\n**-create\\_jpeg** arguments as defined above for mosaic. Additional\narguments are used to map colors to elements. Valid color arguments\ninclude **-red**, **-green**, **-blue**, **-cyan**, **-magenta**,\n**-yellow**, **-black**, and **-white**. Pixels in the images being\ncomposited should be tints/shades of these eight colors.\n\nThe composite function uses the filename to determine which element is\npictured, so the filename of each mosaic should end with \\_{element}.\n\n**select**\n\nUse the selector tool to select tiles to exclude from future SEM element\nmapping. This tool does the following:\n\n- Creates a points file for use with Noran System Seven. File contains\n the center point of each tile that was kept from the original grid.\n **The points file has not been tested.**\n- Moves excluded tiles to a directory in the source folder. These tiles\n are automatically reintegrated if the selection script is run again.\n- Produces a list of tiles to skip. The mosaic script uses this list to\n fill in gaps in the mosaic where the excluded tiles were removed.\n- Produces a screenshot showing the final selection grid.\n\nTo use the select script:\n\n::\n\n stitch2d select\n\nClick the tiles you'd like to remove, or click a darkened tile to\nreinstate it. As with the mosaic script, the select command accepts an\noptional path argument using the -path flag.\n\n**organize**\n\nThis command organizes element maps produces by Noran System Seven into\nelement-specific folders suitable for mosaicking. It accepts optional\narguments for the source and destination directories:\n\n::\n\n stitch2d organize /path/to/source /path/to/destination\n\nRecommended Libraries\n=====================\n\nOpenCV\n------\n\n`OpenCV `__ is a super useful, basically open\nsource computer vision library. It's a bit complicated to install. I\nfound the following tutorials useful:\n\n- `OS\n X `__\n (check the comments if you have issues getting the Python bindings to\n show up)\n- `Ubuntu `__\n- `Windows `__\n\nImageMagick\n-----------\n\nThe Python Imaging Library will sometimes fail to open TIFFs. When the\nmosaic script encounters unreadable TIFFs, it uses\n`ImageMagick `__ to create a usable copy of\nthe entire tile set. If ImageMagick is not installed, this workaround\nwill fail and the mosaic will not be created.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adamancer/stitch2d.git", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "stitch2d", "package_url": "https://pypi.org/project/stitch2d/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/stitch2d/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/adamancer/stitch2d.git" }, "release_url": "https://pypi.org/project/stitch2d/0.31/", "requires_dist": null, "requires_python": null, "summary": "Stitch a planar set of tiles into a mosaic", "version": "0.31" }, "last_serial": 2311152, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "707a00894ae473f14a43e45189bbad57", "sha256": "afeca2d3fdaaecf0f4093b9e9aac85db017c0817890adc807cca63110916ea5b" }, "downloads": -1, "filename": "stitch2d-0.2.tar.gz", "has_sig": false, "md5_digest": "707a00894ae473f14a43e45189bbad57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18914, "upload_time": "2015-10-29T21:30:36", "url": "https://files.pythonhosted.org/packages/84/ab/6ea9ad7c0795b008d32280dc18a613fc6f95b6b1e82b3c40969068c6a605/stitch2d-0.2.tar.gz" } ], "0.21": [ { "comment_text": "", "digests": { "md5": "3bdde82bde3c5c7f0347dd9c946c77bc", "sha256": "9800931f27cfba0930a66264cc031e4932641de37dbe4970164f137dc1900210" }, "downloads": -1, "filename": "stitch2d-0.21.tar.gz", "has_sig": false, "md5_digest": "3bdde82bde3c5c7f0347dd9c946c77bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20886, "upload_time": "2015-10-29T21:38:35", "url": "https://files.pythonhosted.org/packages/ec/7a/33ac68925a1915661e68cccccc33310e9724fafe040a6afaf383151eaa15/stitch2d-0.21.tar.gz" } ], "0.22": [ { "comment_text": "", "digests": { "md5": "930f19a0c095f5202eec850e38251b20", "sha256": "fc8106c64a9a28445a1f574ed0e8a79ffd19e27bed6055c0d5a18918aaa70899" }, "downloads": -1, "filename": "stitch2d-0.22.tar.gz", "has_sig": false, "md5_digest": "930f19a0c095f5202eec850e38251b20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 156142, "upload_time": "2015-10-29T22:21:11", "url": "https://files.pythonhosted.org/packages/32/26/ca4e48b7e76241b3303b5af75ac866948dfd15e2a5778a318bc043825c22/stitch2d-0.22.tar.gz" } ], "0.23": [ { "comment_text": "", "digests": { "md5": "e6c98e68cf820accfa576218cf772e1b", "sha256": "3732c47b0e17702ac94f192bf29ac82cd8cd1ffd20a5e665b4b6d38864093baa" }, "downloads": -1, "filename": "stitch2d-0.23.tar.gz", "has_sig": false, "md5_digest": "e6c98e68cf820accfa576218cf772e1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 156346, "upload_time": "2015-10-30T21:11:05", "url": "https://files.pythonhosted.org/packages/47/ab/b488722a046a89596707e7053ca3e8fa5aac1df564b0648c0e62af5d3764/stitch2d-0.23.tar.gz" } ], "0.24": [ { "comment_text": "", "digests": { "md5": "0e455d9d4028cf5df00e68f84f148d92", "sha256": "93cb925e2f01b35864d0732e7f6a4e1638625a865fc2c11e513bc00de1f51028" }, "downloads": -1, "filename": "stitch2d-0.24.tar.gz", "has_sig": false, "md5_digest": "0e455d9d4028cf5df00e68f84f148d92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 161976, "upload_time": "2016-03-12T21:29:02", "url": "https://files.pythonhosted.org/packages/78/38/0e5bc5f71d2b3304057ceb1ea332d194a2bac21eeb7b72a6fcdeee44ed46/stitch2d-0.24.tar.gz" } ], "0.30": [ { "comment_text": "", "digests": { "md5": "0c22791c220afbc80092080e5f44b1bf", "sha256": "5d37ceb87cff51d55ef69d49d4b08f049aeff5aebec7b88b8fe6516d12d15d7b" }, "downloads": -1, "filename": "stitch2d-0.30.tar.gz", "has_sig": false, "md5_digest": "0c22791c220afbc80092080e5f44b1bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 163953, "upload_time": "2016-08-26T18:48:33", "url": "https://files.pythonhosted.org/packages/06/93/9e7d04d6d291135a448d94ebb9585f3c036c2a482a4785768dd28b4d0b5d/stitch2d-0.30.tar.gz" } ], "0.31": [ { "comment_text": "", "digests": { "md5": "99d20c1c959ad6fee1c31ab9909f57b4", "sha256": "957c56bdf93baf037840103e351960da0e54cb8600ec74915247a647abfaa4f0" }, "downloads": -1, "filename": "stitch2d-0.31.tar.gz", "has_sig": false, "md5_digest": "99d20c1c959ad6fee1c31ab9909f57b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 165109, "upload_time": "2016-08-29T14:17:16", "url": "https://files.pythonhosted.org/packages/92/98/27704653b0243eebb1c08ef9e82475edda58ee841a0e768bed40e2d470fa/stitch2d-0.31.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99d20c1c959ad6fee1c31ab9909f57b4", "sha256": "957c56bdf93baf037840103e351960da0e54cb8600ec74915247a647abfaa4f0" }, "downloads": -1, "filename": "stitch2d-0.31.tar.gz", "has_sig": false, "md5_digest": "99d20c1c959ad6fee1c31ab9909f57b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 165109, "upload_time": "2016-08-29T14:17:16", "url": "https://files.pythonhosted.org/packages/92/98/27704653b0243eebb1c08ef9e82475edda58ee841a0e768bed40e2d470fa/stitch2d-0.31.tar.gz" } ] }