mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-16 11:21:25 +08:00
Adjust rescale_intensity function to new dtype conversion rules
This commit is contained in:
@@ -177,6 +177,9 @@ def rescale_intensity(image, in_range=None, out_range=None):
|
||||
else:
|
||||
omin, omax = out_range
|
||||
|
||||
if imin >= 0:
|
||||
omin = 0
|
||||
|
||||
image = np.clip(image, imin, imax)
|
||||
|
||||
image = (image - imin) / float(imax - imin)
|
||||
|
||||
Reference in New Issue
Block a user