Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image input file group requirement #2

Closed
bertsky opened this issue Apr 9, 2020 · 4 comments
Closed

image input file group requirement #2

bertsky opened this issue Apr 9, 2020 · 4 comments

Comments

@bertsky
Copy link
Contributor

bertsky commented Apr 9, 2020

Thanks @JKamlah for making this great tool!

Would it be much effort to remove the requirement to have an explicit second input file group for the image? This should be just dereferenced from the /Page/@imageFilename in the PAGE file (relative to METS file path).

Also, line 35: in_grps[1]: unbound variable is not a good error message IMO.

@JKamlah
Copy link
Member

JKamlah commented Apr 16, 2020

Sure it is. I will think about how to implement it, because i dont want to lose the option to add processed images e.g. binarized version instead of the original images.

@bertsky
Copy link
Contributor Author

bertsky commented Apr 16, 2020

In the OCR-D functional model, all PAGE annotations will always refer to the original image. Derived images are under AlternativeImage only.

You could look at /PcGts/Page/AlternativeImage/@filename for binarized/dewarped/deskewed etc images. But you have to make sure to re-calculate all coordinates then: any segment's @points always refer to the original image under /Page/@imageFilename in PAGE, but AlternativeImage can be cropped (consistent with Border), deskewed (consistent with @orientation) or even dewarped (without information).

@bertsky
Copy link
Contributor Author

bertsky commented Apr 16, 2020

So maybe you can at least make the second input file group for images optional (and default to @imageFilename), also avoiding the above strange error message when missing?

@JKamlah
Copy link
Member

JKamlah commented Apr 16, 2020

The errormsg is alread fixed. I will implemented the optional image param soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants