# List of images of varying sizes

**URL:** <https://discourse.julialang.org/t/list-of-images-of-varying-sizes/13167>\
**Category:** General Usage\
**Tags:** images\
**Created:** [August 10, 2018, 11:03am UTC](https://discourse.julialang.org/t/list-of-images-of-varying-sizes/13167 "2018-08-10T11:03:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mprat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mprat/32/711_2.png) [@mprat](https://discourse.julialang.org/u/mprat)\
**Post date:** [August 10, 2018, 11:03am UTC](https://discourse.julialang.org/t/list-of-images-of-varying-sizes/13167/1 "2018-08-10T11:03:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Post date:** [August 10, 2018, 1:53pm UTC](https://discourse.julialang.org/t/list-of-images-of-varying-sizes/13167/2 "2018-08-10T13:53:47Z")

</div>

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

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

```

or

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

```

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [August 10, 2018, 2:04pm UTC](https://discourse.julialang.org/t/list-of-images-of-varying-sizes/13167/3 "2018-08-10T14:04:02Z")

</div>

I believe [JuliaImages](http://juliaimages.github.io/latest/quickstart.html#Quickstart-1) could be of interest to you.

---

<div class="post-metadata">

**Author:** ![mprat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mprat/32/711_2.png) [@mprat](https://discourse.julialang.org/u/mprat)\
**Post date:** [August 10, 2018, 2:44pm UTC](https://discourse.julialang.org/t/list-of-images-of-varying-sizes/13167/4 "2018-08-10T14:44:18Z")

</div>

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