IIIF Proxy

To improve the ‘displayability’ of digital objects such as coins and books, I have written a proxy for IIIF resources…

The digital collections of the University of Göttingen are mainly fed from two portals:

Both make their digitised material available via IIIF. Unfortunately, the images provided are not optimised for aesthetically pleasing secondary use.

In order to minimise manual post-processing and the resulting storage effort, I have slightly extended an existing IIIF server - Hymir from MDZ - so that it is able to sit on an institutional server and process the images delivered by it.

In order to keep the image processing configurable, a field of the IIIF Image API is used to specify the operation. The quality field was suitable for this, the proxy allows:

  • nofold - remove page fold
  • transparent-background - Transparent background
  • nofold+transparentbg - both together

For the image operations themselves, OpenCV is used, whereby the background is simply removed with a threshold value and only at the edges - i.e. made transparent. Recognising the folds is a little more complicated, but it’s not rocket surgery either:

  • Recognising lines (Probabilistic Hough Line Transform) in the fold area depending on whether they are left or right-sided
  • Sorting the recognised lines by angle and length to identify the most likely candidate of the fold
  • Rotate to align the detected fold vertically

But here the reliability could be improved.

Examples

The following examples show digital copies in the respective portal and in the viewer of the proxy. The viewer of the proxy allows the background colour to be changed in order to increase the contrast. A blue background is preset in the examples.

Transparent background

Original presentation

Picture: Coin Cabinet of the University of Göttingen, Stephan Eckardt, Archaeological Institute Göttingen, 2014 / Licence: Namensnennung - Nicht kommerziell 4.0 (CC BY-NC 4.0)

Without page fold

And with transparent background…

Original presentation

Picture: Niedersächsische Staats- und Universitätsbibliothek Göttingen / Licence: Public Domain Mark 1.0 (PDM)

The project is available on GitHub.

Update 11.4.22

Due to time constraints, the project will not be continued for the time being, especially as the upstream project is not very active at the moment…