Reputation: 4925
I would like to load a raw image data (such as the .raw ones from http://eeweb.poly.edu/~yao/EL5123/SampleData.html) into Julia and display them.
Basically, I am looking for a way to load file into Julia as Array{xxx}
type.
Any ideas?
Upvotes: 2
Views: 477
Reputation: 42214
Here is the code and along with the resulting plot:
using Plots, Images, HTTP
r = HTTP.request("GET", "http://eeweb.poly.edu/%7Eyao/EL5123/image/lena_gray.raw")
img = reshape(r.body, 512, 512)
v = rotr90(colorview(Gray, img./256));
Plots.plot(v)
savefig("lena.png")
Upvotes: 2