-
Notifications
You must be signed in to change notification settings - Fork 9
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
ViewPage: ignore AlternativeImage if not retrievable #37
Comments
To the latter: perhaps in core we should offer a filter based on the filename directly (instead of the image features). Something like What do you think, @kba? |
Oh, it's not as easy though: Even with a |
I build the ImageVersionSelector around the notion of features, because Workspace.image_from_page expects it that way, if there would a filename filter, I would happily use that.
No problem here: The ImageVersionSelector gets configured for each page individually with the current AlternativeImages and their filenames. I think your fix in #38 fixes the problem already. Do you have an example workspace? |
Oh, in that case – we should go for it. ocrd_browser would not have to mess with the image feature mechanism. See https://github.com/bertsky/core/tree/workspace-altimg-retrieve-existing for the preliminaries in core. The next step would be to (wait for approval+merge in core) and then utilize it in
No, only the first half – see above. For an example, it suffices to take any valid PAGE-XML and add an AlternativeImage to it with no |
Ok, I got it now! It really is necessary to distinguish the images by filename, so it would be great if your branch gets merged. |
Ok, so let's wait for OCR-D/core#845 |
Currently,
ocrd_browser.view.page
tries to add an image version for eachAlternativeImage
referenced in the page. But that can lead to an uncaughtFileNotFoundError
duringbrowse-ocrd/ocrd_browser/view/page.py
Line 82 in 73fc4e2
Furthermore, even when I catch this, if the missing path is the last image, it resurfaces as preferred
version
duringbrowse-ocrd/ocrd_browser/model/page.py
Line 141 in 73fc4e2
image_from_page
is not by file path but by features.IMHO this should be more robust: An image file reference (irrespective if it is derived or original) that is nowhere to be found in the filesystem should simply be rendered with an all-white canvas of the same size.
The text was updated successfully, but these errors were encountered: