Closed chaddy314 closed 3 years ago
Running Segment
on a page currently resets any orientation read from the file. As LAREX segmentation should only affect the Layout this probably isn't the expected behavior for most users (?)
Saving (via Ctrl+S
or the Save Result
button) throws the following error:
controller.js:2168 Uncaught ReferenceError: i is not defined
at controller.js:2168
at Array.forEach (<anonymous>)
at Controller.unrotateSegments (controller.js:2167)
at Controller.exportPageXML (controller.js:705)
at HTMLDocument.KeyInput.document.onkeydown (keyInput.js:279)
Saving should now work.
Rebased to current dev version(57dd0d504413f3aa5193540ee586854f4b808e4b). Saving should now work again, as well as proper derotation of segments.
Orientation doesn't reset on page change.
With this project structure: The second page is rotate 90 degrees even though no XML exists:
This branch produces worse segmentation results for pages which were rotated.
The following segmentatione results were produces by LAREX segmentation with the same settings on the same pages: a) Rotated b) Not rotated
I guess we should also rotate the images in the backend before running the segmentation algorithm (or at least make it user configurable)
I guess rotating directly when setting image https://github.com/OCR4all/LAREX/blob/005aaea52616ec869b776895b5a28d9d11c37e29/src/main/webapp/resources/js/viewer/controller.js#L209 instead of afterwards https://github.com/OCR4all/LAREX/blob/005aaea52616ec869b776895b5a28d9d11c37e29/src/main/webapp/resources/js/viewer/controller.js#L234 would be an improved as the non-rotated image wouldn't appear before rapidly being rotated.
Orientation doesn't reset on page change.
fixed in latest commit
All problems / bugs but the one regarding segmentation results seem to be resolved and ready for a merge into dev
.
While the open problem is IMO a very important one and one which has to be absolutely addressed before pushing the dev
branch to staging
I'll merge this PR already to ease testing this in combination with the other new features.
Larex now deskews images and regions according to the @orientation angle annotated. /PcGts/Page/@orientation is read from pageXML and is added to the PageAnnotations send to the client. The rotation of each region will be executed during controller.loadAnnotations() and rotated back on export. closes #173