Coordinate system of matlab
Show older comments
I drew a visualization below (sorry for bad drawing)

and its an 800x533 rectangle. Correct me if I'm wrong, but in Matlab, the image would be 533x800 when read in, so i assume that it is of form [row, column] where row = 533 and column = 800. However, i read that Matlab uses two types of coordinate systems which i find really frustrating and confusing at the same time.
Normally, the coordinate system is (x,y) where x is the axis along the row(horizontal) and y is the axis along the column(vertical), but i read that Matlab coordinate system is actually (y,x)? Does it mean that instead of [row,column], its [column,row] instead?
I've drawn a tiny blue indicator on the red blocks in the image, if i want to find the coordinate of the top-left corner of each red block(blue indicator), would it be as so:
for i=1: num_block_row
for j=1: num_block_col
coor = [j,i]; %instead of i,j
disp(coor)
end
end
Also, I'm not sure if indices can actually be used as coordinates of each blocks in the image, so do inform me if I'm wrong.
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!