PyStretch

Python image analysis and manipulation
Download

PyStretch Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Jay Laura

PyStretch Tags


PyStretch Description

PyStretch is a Python module that provides a Python-based image manipulation tool which is able to handle images which are larger than a systems available RAM. This tools was designed to support planetary cartographic images and leverages the Geospatial Data Abstraction Library (GDAL) to handle projection, transformation, and georeferencing information, as well as available supported data formats and image arrays.This package is intended to be run primarily from the pystretch.py script located in bin/.Typical usage often looks like this:python pystretch.py < stretch > < optional segmentation > < input > < optional output >orpython pystretch.py -l -t 5 input.tif -o output_image.tifThe code above performs a linear stretch < -l > by segmenting the image into 5 horizontal sections < -t 5 > and writes to the output < output_image.tif >.Note that segmenting the image into 5 pieces will likely result in 6 total sections as the image is subdivided into 5 sections of equal size and one 'remainder' section.PyStretch TestAs a means to both test the functionality of the script and show the results of the different processing techniques users are encouraged to select a sample image and run it through pystretch_test.py. This script takes a subsection of the input image and processes it with all of the available processing techniques so that users can see some of the most common parameters. For example, the standard deviation stretch is performed with sigma (n) values between 0 (essentially a binary image with the threshold at the mean) and 3 (~98% of the histogram maintained).To run this test to both validate the input and assess the functionality of the script use: python pystretch_test.py -srcwin xorigin yorigin width height input_imageFor example: python pystretch_test.py -srcwin 0 0 250 250 myimage.jp2If you do not know the pixel offset that you wish to test at, but do know the geographic coordinates you can use: python pystretch_test.py -projwin ulx uly lrx lry input_imageProduct's homepage


PyStretch Related Software