Create large sparse images in Julia

Is it possible to create a large sparse image in Julia? Tim Holy's (excellent) Images.jl library looks like it is designed for full image matrices, where each defines each pixel.

enter image description here

I would like to make a bifurcation diagram which is rather meager. Ideally, I would like to make one poster size, but the corresponding full image matrix would be too large to generate.

Thank you for your time.

+6
source share
1 answer

An Image can be created from any AbstractArray that includes a sparse matrix:

 julia> using Images julia> S = sprand(10^4, 10^4, 0.01); julia> img = grayim(S) Gray Images.Image with: data: 10000x10000 Base.SparseMatrix.SparseMatrixCSC{Float64,Int64} properties: colorspace: Gray spatialorder: xy 

Now, what do you do with this image, determine how happy you are with this. But nothing prevents you from defining it.

UPDATE: images now treat any AbstractArray as an image, no more Images .

+6
source

All Articles