Skip to content

Incorrect channelview for SubArray #188

@ymtoo

Description

@ymtoo

MWE:

(jl_TQljLn) pkg> st
Status `/tmp/jl_TQljLn/Project.toml`
  [a09fc81d] ImageCore v0.9.4

julia> x = rand(3,100,100,10); # 10 images

julia> @views x1 = x[:,:,:,1]; # first image

julia> size(x1)
(3, 100, 100)

julia> rgb_x1 = colorview(RGB, x1);

julia> size(rgb_x1)
(100, 100)

julia> channelview(rgb_x1) |> size
(3, 100, 100, 10)

julia> channelview(rgb_x1) == x # incorrect channelview
true

julia> x2 = x[:,:,:,1]; 

julia> rgb_x2 = colorview(RGB, x2);

julia> channelview(rgb_x2) |> size
(3, 100, 100)

julia> channelview(rgb_x2) == x
false

julia> channelview(rgb_x2) == x2
true

The channelview(rgb_x1) is equal to the 4D parent array of x1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions