Spaces:
Sleeping
Sleeping
Update Utils/convert.py
Browse files- Utils/convert.py +3 -1
Utils/convert.py
CHANGED
|
@@ -4,7 +4,7 @@ from rasterio.plot import show
|
|
| 4 |
|
| 5 |
import cv2
|
| 6 |
|
| 7 |
-
def
|
| 8 |
with rasterio.open(file_path) as src:
|
| 9 |
# Read all bands
|
| 10 |
image = src.read()
|
|
@@ -41,4 +41,6 @@ def normalize_band(band):
|
|
| 41 |
normalized = np.zeros_like(band, dtype=np.uint8)
|
| 42 |
return normalized
|
| 43 |
|
|
|
|
| 44 |
|
|
|
|
|
|
| 4 |
|
| 5 |
import cv2
|
| 6 |
|
| 7 |
+
def read_pansharpened_rgb(file_path):
|
| 8 |
with rasterio.open(file_path) as src:
|
| 9 |
# Read all bands
|
| 10 |
image = src.read()
|
|
|
|
| 41 |
normalized = np.zeros_like(band, dtype=np.uint8)
|
| 42 |
return normalized
|
| 43 |
|
| 44 |
+
# Example usage
|
| 45 |
|
| 46 |
+
# Display the image using matplotlib
|