List of images of varying sizes

I am pretty new to Julia (learning as I go!) and have a computer vision / ML / image processing background.

If I have a set of bounding box annotations for a given image, and generate a bunch of sub-images corresponding to the “zoomed-in” bounding boxes. I want to store these in some kind of “list-like” container, but the sub-images are of varying sizes. What is the best way to store these? I don’t need the properties of arrays that enforce “rectangular-ness”; in fact, more often than not, no two sub-images are of the same size.

Kinds of operations I want to apply to this list of images:

  • Displaying them one by one (interactively?)
  • Apply image processing manipulations (blur, feature extraction, color histogram)
  • Display or aggregate these results
  • Ideally, anything that can be broadcast with dot-notation, but regular old for loops will do

Ideas?

You can use Array{Any,1} to store object of any types, including images of any size:

[1, "foo", rand(3), rand(4,5)]

or

lst = Array{Any}(undef, 0)
push!(lst, 1)
push!(lst, "foo")
push!(lst, rand(3))
push!(lst, rand(4,5))

I believe JuliaImages could be of interest to you.

@dfdx Thanks, I forgot about Array{Any, 1}! Worked beautifully.