Преглед на файлове

[Fix] Removes the channel of monochrome image

Yizhou Chen преди 3 години
родител
ревизия
83b3e1a843
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      tools/utils/raster.py

+ 1 - 0
tools/utils/raster.py

@@ -158,6 +158,7 @@ class Raster:
             # the type is complex means this is a SAR data
             if isinstance(type(ima[0, 0]), complex):
                 ima = abs(ima)
+            ima = ima.squeeze()
         else:
             ima = ima.transpose((1, 2, 0))
         if self.to_uint8 is True: