2

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?

sramij
  • 4,775
  • 5
  • 33
  • 55

1 Answers1

2

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")

enter image description here

Przemyslaw Szufel
  • 40,002
  • 3
  • 32
  • 62