3 ms·
Eh it depends on what you're doing with it. If you're doing some kind of convolution type thing that is going to access a whole lot of nearby pixels in all dire
by dheera 6y ago
Eh it depends on what you're doing with it. If you're doing some kind of convolution type thing that is going to access a whole lot of nearby pixels in all directions, it doesn't really matter.
Also there are times I like to store "images" such that accessing image[x,y] yields (x,y) as if the image were placed in the 1st quadrant, which makes code easier to read and more intuitive. In that case the outer irritation being x-wise and the inner irritation being y-wise is faster. I absolutely hate those irritating image[height-y, x] type bullshit appearing all over my code. If you want readability image[x, y] should be (x,y) with the origin at the lower left as it always is in grade school. (I hate the people who invented matrices for putting 0,0 at the top left and inverting the y-axis.)