Skip to content

Image related methods #1323

@fujiisoup

Description

@fujiisoup

Currently I'm using xarray to handle multiple images (typically, a sequence of images),
and I feel it would be convenient if xarray supports image related functions.

There may be many possibilities, but particular methods I want to have in xarray are

  1. xr.open_image(File)
    Currently, I open image by PILLOW, convert to np.ndarray, extract its attributes, then construct xr.DataArray from them.
    If I can do it by 1 line, it would be very great.

  2. xr.DataArray.expand_dims(dim)
    I want to add additional channel dimension to grey scale images (size [W x H] -> [W x H x 1]),
    in order to pass them into convolutional neural network, which usually accepts 4-dimensional tensor [Batch x W x H x channel].

Image (possibly also video?) is naturally high-dimensional and
I guess it would fit xarray's concept.
Is this sufficiently broad interest?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions