Open hajicj opened 8 years ago
The minimum change to make the data format explicit is to use Top/Left/Height/Width. This is the minimum unambiguous change.
The following needs to be done:
top, left, height, width
as well as x, y, height, width
. (This duality is because I don't want to change how CropObjects are generated in MUSCIMarkerApp methods, at least not yet.)The reencoding is just import-export, easier done from a shell.
X and Y is really ambiguous. There is an ugly coord-swap step in parsing, beccause X in CropObjects is originally column (horizontal direction) and Y is row (vertical direction), while Python uses row-first indexing. At the same time, it is not self-explanatory, which is always worse than self-explanatory in a data format. Top/Left/Bottom/Right is obvious, whether you need row-major or column-major ordering, top to bottom vs. bottom to top, etc.
Proposed fix: make it possible to encode CropObjects using both X/Y/W/H and T/L/B/R.