ocr-d / format-converters Goto Github PK
View Code? Open in Web Editor NEWConverters for various file formats used for representing OCR
License: Apache License 2.0
Converters for various file formats used for representing OCR
License: Apache License 2.0
UB-Mannheim/ocr-fileformat already contains some converters.
Hi @wrznr, it is better to make the region labelling outside the image on a white border. The labelling could disrupt the transcription or the recognition. I tried to solve this myself. See the image.
https://files.gitter.im/tboenig/0o3l/grafik.png
Here is an example of line image and matching text, both extracted with page2img.py
:
Obviously there is a vertical offset, the text belongs to the next line, so a wrong image was extracted. All other line images show a similar vertical offset. The PAGE XML file was created by Transkribus, and it contains data which might be the cause for that:
[...]
<Page imageFilename="0111_nzz_18901222_0_0_a1_p1_1.tif" imageWidth="3839" imageHeight="5551">
<PrintSpace>
<Coords points="4,-27 3842,-27 3842,5524 4,5524"/>
</PrintSpace>
[...]
<TextRegion type="paragraph" id="r_5_3" custom="readingOrder {index:12;}">
<Coords points="117,1676 975,1676 975,1941 117,1941"/>
[...]
<TextLine id="tl_32" primaryLanguage="German" custom="readingOrder {index:1;}">
<Coords points="122,1689 976,1689 976,1741 122,1741"/>
<Baseline points="121,1762 976,1764"/>
[...]
The PrintSpace
tag is not handled by page2img.py
, nor is it handled in ocrd_segment.
ABBYY produced this PAGE XML which contains good coordinates for the text line:
[...]
<Page imageFilename="1200024.tif" imageWidth="3839" imageHeight="5551">
<PrintSpace>
<Coords points="0,0 3838,0 3838,5551 0,5551"/>
</PrintSpace>
[...]
<TextRegion type="paragraph" id="r_5_3" custom="readingOrder {index:12;}">
<Coords points="112,1678 970,1678 970,1943 112,1943"/>
[...]
<TextLine id="tl_32" primaryLanguage="German" custom="readingOrder {index:1;}">
<Coords points="115,1723 969,1723 969,1775 115,1775"/>
<Baseline points="115,1798 969,1798"/>
[...]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.