Skip to content

skimage.io.imread returns incorrect dimensions (according to docs) #1496

Closed

Description

@nikhartman

See here: http://stackoverflow.com/questions/30088841

Importing a TIFF image using skimage.io.imread returns an array with shape (3,M,N) instead of (M,N,3). This breaks the flatten and as_grey features. The results are the same calling imread with plugin='tifffile'.

In [1]: im = skimage.io.imread('image.tif')

In [2]: im.shape
Out[2]: (3, 768, 1024)

In [3]: im = skimage.io.imread('image.tif', as_grey = True)

In [4]: im.shape
Out[4]: (3, 768)

In [5]: im = skimage.io.imread('image.tif', flatten = True)

In [6]: im.shape
Out[6]: (3, 768)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions