cars.core.datasets

CARS Datasets module

Module Contents

Functions

create_im_dataset(→ xarray.Dataset)

Create image dataset as used in cars.

get_color_bands(dataset)

Get band names list from the cardataset color

cars.core.datasets.create_im_dataset(img: numpy.ndarray, region: List[int], largest_size: List[int], img_path: str = None, band_coords: str = None, msk: numpy.ndarray = None) xarray.Dataset

Create image dataset as used in cars.

Parameters
  • img – image as a numpy array

  • region – region as list [xmin ymin xmax ymax]

  • largest_size – whole image size

  • img_path – path to image

  • band_type – set to band coord names (cst.BAND_IM or BAND_CLASSIF) to add band description in the dataset

  • msk – image mask as a numpy array (default None)

Returns

The image dataset as used in cars

cars.core.datasets.get_color_bands(dataset)

Get band names list from the cardataset color

Parameters
  • dataset (CarsDataset) – carsdataset with the color data

  • key – dataset color data key

  • key – string

Returns

list of color band names