summaryrefslogtreecommitdiffstats
path: root/julia
diff options
context:
space:
mode:
Diffstat (limited to 'julia')
-rw-r--r--julia/misc.jl27
1 files changed, 27 insertions, 0 deletions
diff --git a/julia/misc.jl b/julia/misc.jl
new file mode 100644
index 0000000..5d98e0b
--- /dev/null
+++ b/julia/misc.jl
@@ -0,0 +1,27 @@
+### Julia image manipulation
+
+Pkg.update()
+Pkg.add("Images")
+Pkg.add("ImageView")
+
+using ImageView, Images
+img = imread("my_photo.jpg")
+# eg, rotate via a matrix transform
+img.data = img.data'
+display(img, pixelspacing = [1,1])
+
+### Julia .mat loating
+
+Pkg.update()
+Pkg.add("MAT")
+using MAT
+file = matopen("matfile.mat")
+read(file, "varname")
+close(file)
+
+file = matopen("matfile.mat", "w")
+write(file, "varname", variable)
+close(file)
+
+vars = matread("matfile.mat")
+