Paolo-Fraccaro
commited on
Commit
•
63d3c60
1
Parent(s):
e3b141c
fix big
Browse files
app.py
CHANGED
@@ -41,8 +41,8 @@ from skimage import exposure
|
|
41 |
def stretch_rgb(rgb):
|
42 |
|
43 |
ls_pct=0
|
44 |
-
pLow, pHigh = np.percentile(
|
45 |
-
img_rescale = exposure.rescale_intensity(
|
46 |
|
47 |
return img_rescale
|
48 |
|
|
|
41 |
def stretch_rgb(rgb):
|
42 |
|
43 |
ls_pct=0
|
44 |
+
pLow, pHigh = np.percentile(rgb[~np.isnan(rgb)], (ls_pct,100-ls_pct))
|
45 |
+
img_rescale = exposure.rescale_intensity(rgb, in_range=(pLow,pHigh))
|
46 |
|
47 |
return img_rescale
|
48 |
|