@Benoit9 I’ll have a look, thanks!
@ckneal Thanks for the idea. I barely know anything about image processing, but I’m very happy to learn. I just didn’t know what a good starting point was.
This is kind of a side project, so I didn’t want to put that much time it (doing random background reading) and I asked for directions here. Still, it would be very helpful to do it and learn the basics of image processing during the process.
Anyway, here’s some sample data in case someone gets it working before I do:
https://gist.github.com/razvangheorghe/4280db65023083b561c6430de15ff6df
I don’t know how to plot the data in PyPlot to get the density plot from the x, y, and z columns, so a piece of advice would be helpful here as well.
However, the data is ordered such that I can just reshape it into a square matrix and that is the density.
I’m reading it with this:
using DelimitedFiles
function readImage(path::String)
image = readdlm(path, Int64)
z = reshape(image[:, 3], (301, 301))
return z
end
and plotting it like this:
const PrecArray64 = Union{Array{Int64, 2}, Array{Float64, 2}}
using PyPlot
function showImage(image::PrecArray64)
clf()
imshow(image, aspect = "equal", extent = (-150,150,-150,150))
colorbar()
gcf()
end
showImage(readImage("img.dat"))