5.14. sail.BMImageArray

5.14.1. __init__

Interface:
def __init__(self)


def __init__(self,
            handle: sail.Handle,
            h: int,
            w: int,
            format: bm_image_format_ext,
            dtype: bm_image_data_format_ext)

Parameters

  • handle : sail.Handle

Handle instance

  • h : int

Height instance

  • w : int

Width instance

  • format : bm_image_format_ext

Format instance

  • dtype : bm_image_data_format_ext

Dtype instance

5.14.2. __getitem__

Get the bm_image from index i.

Interface:
def __getitem__(self, i: int)-> sail.bm_image

Parameters

  • i : int

Index of the specified location.

Returns

  • img : sail.bm_image

result bm_image

5.14.3. __setitem__

Copy the image to the specified index.

Interface:
def __setitem__(self, i: int, data: sail.bm_image)

Parameters

  • i: int

Index of the specified location.

  • data: sail.bm_image

Input image

5.14.4. copy_from

Copy the image to the specified index.

Interface:
def copy_from(self, i: int, data: sail.BMImage):

Parameters

  • i: int

Index of the specified location.

  • data: sail.BMImage

Input image

5.14.5. attach_from

Attach the image to the specified index.(Because there is no memory copy, the original data needs to be cached)

Interface:
def attach_from(self, i: int, data: BMImage):

Parameters:

  • i: int

Index of the specified location.

  • data: BMImage

Input image.

5.14.6. get_device_id

Get device id of this BMImageArray.

Interface:
def get_device_id(self)  -> int: