Conversion between Coordinate Origins T - Top B - Bottom L - Left R - Right Remember that images loaded into a matrix uses the height as rows and width as columns. So x,y coordinates are flipped y,x to get i,j coordinates. Subpixel Coordinates