geowatch.tasks.depth.dzyne_img_util module¶
- geowatch.tasks.depth.dzyne_img_util.pad(img, pad_size=32)[source]¶
Pad image on the sides, so that eash side is divisible by 32 (network requirement) if pad = True:
returns image as numpy.array, tuple with padding in pixels as(x_min_pad, y_min_pad, x_max_pad, y_max_pad)
- else:
returns image as numpy.array
- geowatch.tasks.depth.dzyne_img_util.unpad(img, pads)[source]¶
img: numpy array of the shape (height, width) pads: (x_min_pad, y_min_pad, x_max_pad, y_max_pad) @return padded image
- geowatch.tasks.depth.dzyne_img_util.readRasterImage(filename: str, geoProps={}, convert=False)[source]¶
Reads ntf files
[description]
- Decorators:
task
- Parameters:
filename {str} – filename of the file to read in
- Keyword Arguments:
(default (convert {bool} -- should raster be converted to float and normalized) – {{}})
(default – {False})
- Returns:
Tuple of (img, transform, bands, datatype)