__init__.py 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. """
  2. =========================================================
  3. Multi-dimensional image processing (:mod:`scipy.ndimage`)
  4. =========================================================
  5. .. currentmodule:: scipy.ndimage
  6. This package contains various functions for multi-dimensional image
  7. processing.
  8. Filters
  9. =======
  10. .. autosummary::
  11. :toctree: generated/
  12. convolve - Multi-dimensional convolution
  13. convolve1d - 1-D convolution along the given axis
  14. correlate - Multi-dimensional correlation
  15. correlate1d - 1-D correlation along the given axis
  16. gaussian_filter
  17. gaussian_filter1d
  18. gaussian_gradient_magnitude
  19. gaussian_laplace
  20. generic_filter - Multi-dimensional filter using a given function
  21. generic_filter1d - 1-D generic filter along the given axis
  22. generic_gradient_magnitude
  23. generic_laplace
  24. laplace - n-D Laplace filter based on approximate second derivatives
  25. maximum_filter
  26. maximum_filter1d
  27. median_filter - Calculates a multi-dimensional median filter
  28. minimum_filter
  29. minimum_filter1d
  30. percentile_filter - Calculates a multi-dimensional percentile filter
  31. prewitt
  32. rank_filter - Calculates a multi-dimensional rank filter
  33. sobel
  34. uniform_filter - Multi-dimensional uniform filter
  35. uniform_filter1d - 1-D uniform filter along the given axis
  36. Fourier filters
  37. ===============
  38. .. autosummary::
  39. :toctree: generated/
  40. fourier_ellipsoid
  41. fourier_gaussian
  42. fourier_shift
  43. fourier_uniform
  44. Interpolation
  45. =============
  46. .. autosummary::
  47. :toctree: generated/
  48. affine_transform - Apply an affine transformation
  49. geometric_transform - Apply an arbritrary geometric transform
  50. map_coordinates - Map input array to new coordinates by interpolation
  51. rotate - Rotate an array
  52. shift - Shift an array
  53. spline_filter
  54. spline_filter1d
  55. zoom - Zoom an array
  56. Measurements
  57. ============
  58. .. autosummary::
  59. :toctree: generated/
  60. center_of_mass - The center of mass of the values of an array at labels
  61. extrema - Min's and max's of an array at labels, with their positions
  62. find_objects - Find objects in a labeled array
  63. histogram - Histogram of the values of an array, optionally at labels
  64. label - Label features in an array
  65. labeled_comprehension
  66. maximum
  67. maximum_position
  68. mean - Mean of the values of an array at labels
  69. median
  70. minimum
  71. minimum_position
  72. standard_deviation - Standard deviation of an n-D image array
  73. sum - Sum of the values of the array
  74. variance - Variance of the values of an n-D image array
  75. watershed_ift
  76. Morphology
  77. ==========
  78. .. autosummary::
  79. :toctree: generated/
  80. binary_closing
  81. binary_dilation
  82. binary_erosion
  83. binary_fill_holes
  84. binary_hit_or_miss
  85. binary_opening
  86. binary_propagation
  87. black_tophat
  88. distance_transform_bf
  89. distance_transform_cdt
  90. distance_transform_edt
  91. generate_binary_structure
  92. grey_closing
  93. grey_dilation
  94. grey_erosion
  95. grey_opening
  96. iterate_structure
  97. morphological_gradient
  98. morphological_laplace
  99. white_tophat
  100. Utility
  101. =======
  102. .. autosummary::
  103. :toctree: generated/
  104. imread - Load an image from a file
  105. """
  106. # Copyright (C) 2003-2005 Peter J. Verveer
  107. #
  108. # Redistribution and use in source and binary forms, with or without
  109. # modification, are permitted provided that the following conditions
  110. # are met:
  111. #
  112. # 1. Redistributions of source code must retain the above copyright
  113. # notice, this list of conditions and the following disclaimer.
  114. #
  115. # 2. Redistributions in binary form must reproduce the above
  116. # copyright notice, this list of conditions and the following
  117. # disclaimer in the documentation and/or other materials provided
  118. # with the distribution.
  119. #
  120. # 3. The name of the author may not be used to endorse or promote
  121. # products derived from this software without specific prior
  122. # written permission.
  123. #
  124. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  125. # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  126. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  127. # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  128. # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  129. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  130. # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  131. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  132. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  133. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  134. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  135. from __future__ import division, print_function, absolute_import
  136. from .filters import *
  137. from .fourier import *
  138. from .interpolation import *
  139. from .measurements import *
  140. from .morphology import *
  141. from .io import *
  142. __version__ = '2.0'
  143. __all__ = [s for s in dir() if not s.startswith('_')]
  144. from scipy._lib._testutils import PytestTester
  145. test = PytestTester(__name__)
  146. del PytestTester