juliaimages.github.io
juliaimages.github.io copied to clipboard
Ordering of axes & dimensions
Really enjoying the API of this package.
A bit confused by https://juliaimages.org/latest/pkgs/axes/#Names-and-locations. By convention, x is horizontal and y is vertical. But this does not seem to be the case:
A = rand(10,20,5);
axisA = AxisArray(A, (:x, :y, :z), (1μm, 2μm, 3μm))
Gray.(axisA[:,:,1])
# a horizontal rectangle appears
Perhaps documentation should use (:y, :x, :z)
?
Hi, also FYI https://evizero.github.io/Augmentor.jl/images/#Vertical-Major-vs-Horizontal-Major-1
This is how we usually reason about the axis when processing an image; so it's consistent that x
defines the height. Imagine that the last pixel is placed at the bottom-right place instead of the top-right place and you'll find this convention justified.
This was a rather interesting one for me too because if you look at the cartesian Index and indexing of images of the two images like
It did got me quite confused and I had to do dry runs of algorithm with actual graph 😄
img[2nd dim,1st dim]
2nd dim looks like it represents y-axis,and 1st dim looks it represents x-axis but the thing that looks like the y-axis here is actually supposed to represent x-axis in Cartesian Indexes and similiarly for 1st dim
I am used to thinking in cartesianindexes but the image are usually thought about in terms of rows and columns
It's the way the data is handled between Cartesian indexes and img[y,x] that had me confused