Skip to content

Commit

Permalink
DOC Specify method of constrast stretching in stretch()
Browse files Browse the repository at this point in the history
  • Loading branch information
luispedro committed Sep 30, 2014
1 parent 32b26ba commit 30a9f80
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mahotas/stretch.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ def stretch(img, arg0=None, arg1=None, dtype=np.uint8):
img' = stretch(img, max, [dtype=np.uint8])
img' = stretch(img, min, max, [dtype=np.uint8])
Contrast stretch the image to the range [0, max] (first form) or
[min, max] (second form).
Contrast stretch the image to the range [0, max] (first form) or [min, max]
(second form). The method is simple linear stretching according to the
formula::
p' = max * (p - img.min())/img.ptp() + min
Parameters
----------
Expand Down

0 comments on commit 30a9f80

Please sign in to comment.