Skip to content

imresize spuriously causes NaNs with 4d image #763

@staticfloat

Description

@staticfloat

With a 4-dimensional array:

m = randn(250,202,3,1)
imresize(m, (277, 224, 3, 1))

Running the imresize() multiple times shows NaN's randomly appearing. If I eliminate the fourth dimension, this works just fine:

imresize(m[:,:,:,1], (277, 224, 3))

I assume this is because imresize() is attempting to interpolate across the 3rd axis, and it's reaching out of bounds or something like that. If that is the case, it would be nice if I had a way to specify the dimensions across which I wanted to resize (which I am attempting to do by passing in an explicit tuple of sizes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions