The main portal into Library and University Collections’ Special Collections content, collections.ed.ac.uk, is changing. A design overhaul which will improve discovery both logically and aesthetically is coming very soon, but in advance, we’ve implemented an important element of functionality, namely the IIIF approach to images.
What does this all mean? To take each element in turn:
Direct IIIF thumbnails
The search results pages on the site no longer directly reference images on the collections.ed servers, but bring in a LUNA URL using the IIIF image API format, which offers the user flexibility on size, region, rotation and quality.
Embedded image zooming
Using IIIF images served from the LUNA server and the OpenSeadragon viewer, images can now be zoomed directly on the page, where previously we needed an additional link out to the LUNA repository.
Based on the images attached to the record in the Vernon CMS, we have built IIIF manifests and made them available, one per object. Manifests are a set of presentation instructions to render a set of images according to curatorial choice, and they can be dropped into standard IIIF viewers. We have created a button to present them in Universal Viewer (UV), and will be adding another to bring in Mirador in due course.
Watch this space for more development on these sites in the very near future. The look-and-feel will change significantly, but the task will be made easier with IIIF as a foundation.
We have a collection of historic papers from the Scottish Court of Session. These are collected into cases and bound together in large volumes, with no catalogue or item data other than a shelfmark. If you wish to find a particular case within the collection, you are restricted to a manual, physical search of likely volumes (if you’re lucky you might get an index at the start!).
I am hoping to use computer vision techniques, OCR, and intelligent text analysis to automatically extract and parse case-level data in order to create an indexed, searchable digital resource for these items. The Digital Imaging Unit have digitised a small selection of the papers, which we will use as a pilot to assess the viability of the above aim.
The items in the Scottish Session Papers collection differ from the images that Dan was processing, being images of older works, which were printed with a letterpress rather than being typewritten.
The Session Papers images are lacking a delineating border, backing paper, and other features that were used to ease the image processing. In addition, the amount, density and layout of text items is incredibly varied across the corpus, further complicating the task.
The initial task is to find a crop of the image to pass to the OCR engine. We want to give it as much text as possible in as few pixels as possible!
Due to the nature of the images, there is often a small amount of text from the opposite page visible (John’s blog explains why) and so to save some hassle later, we’re going to start by cropping 50px from each horizontal side of the image, hopefully eliminating these bits of page overspill.
Now that we have the base image to work on, I’ve started with the simple steps of converting it to grayscale, and then applying an inverted binary threshold, turning everything above ~75% gray to white, and everything else to black. The inversion is to ease visual understanding of the process. You can view full size versions by clicking each image.
The ideal outcome is that we eliminate smudges and speckles, leaving only the clear printed letters. This entailed some experimenting with the threshold level, as you can see in the image above, a lot of speckling remains. Dropping the threshold to only leave pixels above ~60% gray was a large improvement, and to ~45% even more so:
At a threshold of 45%, some of the letters are also beginning to fade, but this should not be an issue, as we have successfully eliminated almost all the noise, which was the aim here.
We’re still left with a large block at the top, which was the black backing behind the edge of the original image. To eliminate this, I experimented with several approaches:
Also crop 50px from the top and bottom of the images – unfortunately this had too much “collateral damage” as a large amount of the images have text within this region.
Dynamic cropping based on removing any segments touching the top and bottom of the image – this was a more effective approach but the logic for determining the crop became a bit convoluted.
Using Dan’s technique of applying Canny edge detection and then use a rank filter to remove ~1px edges – this was the most successful approach, although it still had some issues when the text had a non-standard layout.
I settled on the Canny/Rank filter approach to produce these results:
Next up, we want to find a set of masks that covers the remaining white pixels on the page. This is achieved by repeatedly dilating the image, until only a few connected components remain:
You can see here that the “faded” letters from the thresholding above have enough presence to be captured by the dilation process. These white blocks now give us a pretty good record of where the text is on the page, so we now move onto cropping the image.
Dan’s blog has a good explanation of solving the Subset Sum problem for a dilated image, so I will apply his technique (start with the largest white block, and add more if they improve the amount of white pixels at a favourable increase in total area size, with some tweaking to the exact ratio):
So finally, we apply this crop to the original image:
As you can see, we’ve now managed to accurately crop out the text from the image, helping to significantly reduce the work of the OCR engine.
On 16th and 17th March the University of Edinburgh and National Library of Scotland will be hosting two International Image Interoperability Framework events.
The IIIF Showcase brings together developers and early adopters to explain the background and value of IIIF, its growing community, and the potential of the Framework and the innovative ways in which it can be used to present digital image collections. There will be presentations from Edinburgh University Library, National Library of Scotland, National Library of Wales, Durham University, University College Dublin, The Bodleian Library, Digirati, Cogapp and others.
Location: National Library of Scotland (NLS) Boardroom on George IV Bridge (see map)
Audience: Individuals and institutional representatives interested in learning more about IIIF
Code of Conduct: The IIIF Code of Conduct applies to all IIIF events and related activities.
Social Media: Tweets about the event should use #iiif and @iiif_io.
IIIF Technical Workshop
The IIIF Technical Workshop unconference, hosted by the University of Edinburgh at Argyle House, will bring together colleagues who have implemented IIIF services, are developing the Framework and associated tools, and working on community initiatives. The workshop will provide opportunities to discuss implementations, issues, initiatives and developments and the forthcoming Annual IIIF conference in June.
I was lucky enough to have a paper accepted to Csv,conf,2* in Berlin on the 3rd-4th of May, which was great to do, but it also got me through the door to see loads of great things going on in data and its surrounding technology. Yes, there was heavy mention made of CSV and Spreadsheets; in fact, at times it was akin to an AA meeting ,with people guiltily admitting their love of Excel. This left me feeling- quite worryingly- vindicated in a lot of the things I do.
As is always the case with any conference review blogpost, it’s not viable to list every link or ruminate on the message of every talk, so I’ll just home in on a few highlights. The talks (available in slide or video form) are appearing over at Lanyrd.com, and they’ll give a lot more depth to what was spoken about.
My own reason for being there- as far as my talk was concerned- was to look at better ways of processing workflow, enriching data, and improving engagement with our collections. Afterwards, I had some interesting conversations: I was alerted to the tool NeuralTalk2 by Maciej Gryka of rainforestqa.com, a company that specialises in cleaning data using mechanical turks and crowdsourced test-cases. Neural Talk, though, is a captioning tool, which will attempt to visually recognise what your image is “of”. I’m sure it fails as much as it succeeds, but, as I pointed out, we’ve not really used this kind of tech to enhance our metadata, so there’d be no harm in running some of our images through and seeing what it comes up with. Another chat, with a lady from UC Santa Cruz, made it clear that we are quite liberal with our approach to crowdsourced data. Where we have generally decided it’s fine to surface as long as it is properly marked as such, they are proceeding rather slowly, due to a particularly strict metadata librarian.
The keynotes were deliberately intended to cover a range of disciplines that might be new to most people at this highly eclectic conference. Resultantly, there were interesting talks on technology and activism (including visualisations of the Ebola crisis and police brutality); ethics in technology and workflows to give your consent without clicking on unreadable terms and conditions (do you know what SmartBins are taking from you as you pass?); dealing with messy spreadsheets (the Enron crisis showed this institution to manage them terribly), and open data with neuroscience (a lot of mouse brains in action).
Some other tools that we could be looking at:
Zegami – great for exploring large banks of images and spotting patterns across them. Can it work with IIIF, I wonder?
OpenRefine– a tool that we perhaps should have been using for some time to rationalise spreadsheet data, which could certainly save lots of time. Our former colleague, Richard Jones of cottagelabs, is a great advocate of these kinds of tools, as his talk made clear.
DataBaker– created in collaboration between the Office of National Statistics and ScraperWiki. This Python application can convert any ‘pretty’ spreadsheet into usable source data in CSV.
Finally, here are three interesting observations, which certainly struck a chord with me:
It is now deemed quite acceptable, as a symptom of rapid development, perhaps, that the CSV is used as the master dataset; perhaps the file-based database’s day is not over. I certainly found out about some interesting applications built in this way.
EVERYONE suffers from problems with diacritics, glyphs, badly formatted data and what happens when you import a CSV into a spreadsheet tool that tries to be too clever. It is not just me.
All in all, an excellent couple of days, which have filled me with ideas for improvements for existing workflows. Hopefully the likes of the DIU will reap some benefits!
Quick caveat: this post is a partner to the one Claire Knowles has written about our signing up to the IIIF Consortium, so the explanation of the acronym will not be explained here!
The Library Digital Development team decided to investigate the standard due to its appearance at every Cultural Heritage-related conference we’d attended in 2015, and we thought it would be apposite to update everyone with our progress.
First things first: we have managed to make some progress on displaying IIIF formatting to show what it does. Essentially, the standard allows us to display a remotely-served image on a web page, with our choice of size, rotation, mirroring and cropped section without needing to write CSS, HTML, or use Photoshop to manipulate the image; everything is done through the URL. The Digilib IIIF Server was very simple to get up and running (for those that are interested, it is distributed as a Java webapp that runs under Apache Tomcat), so here it is in action, using the standard IIIF URI syntax of [http://[server domain]/[webapp location]/[specific image identifier]/[region]/[size]/[mirror][rotation]/[quality].[format]]!
The URL for the following (image 0070025c.jpg/jp2) would be:
This URL is saying, “give me image 0070025 (in this case an Art Collection poster), at full resolution, uncropped, unmirrored and unrotated: the standard image”.
This URL says, “give me the same image, but this time show me co-ordinates 300px in from the left, 50 down from the top, to 350 in from the left, to 200 down from the top (of the original); return it at a resolution of 200px x 200px, rotate it at an angle of 236 degrees, and mirror it”.
The server software is only one part of the IIIF Image API: the viewer is very important too. There are a number of different viewers around which will serve up high-resolution zooming of IIIF images, and we tried integrating OpenSeaDragon with our Iconics collection to see how it could look when everything is up and running (this is not actually using IIIF interaction at this time, rather Microsoft DeepZoom surrogates, but it shows our intention). We cannot show you the test site, unfortunately, but our plan is that all our collections.ed.ac.uk sites, such as Art and Mimed, which have a link to the LUNA image platform, can have that replaced with an embedded high-res image like this. At that point, we will be able to hide the LUNA collection from the main site, thus saving us from having to maintain metadata in two places.
We have also met, as Claire says, the National Library’s technical department to see how they are doing with IIIF. They have implemented rather a lot using Klokan’s IIIFServer and we have investigated using this, with its integrated viewer on both Windows and Docker. We have only done this locally, so cannot show it here, but it is even easier to set up and configure than Digilib. Here’s a screenshot, to show we’re not lying.
Our plan to implement the IIIF Image API involves LUNA though. We already pay them for support and have a good working relationship with them. They are introducing IIIF in their next release so we intend to use that as a IIIF Server. It makes sense- we use LUNA for all our image management, it saves us having to build new systems, and because the software generates JP2K zoomable images, we don’t need to buy anything to do that (this process is not open, no matter how Open Source the main IIIF software may be!). We expect this to be available in the next month or so, and the above investigation has been really useful, as the experience with other servers will allow us to push back to LUNA to say “we think you need to implement this!”. Here’s a quick prospective screenshot of how to pick up a IIIF URL from the LUNA interface.
We still need to investigate more viewers (for practical use) and servers (for investigation), and we need to find out more about the Presentation API, annotations etc., but we feel we are making good progress nonetheless.
At Innovative Learning Week this year we worked with students to develop board games using images from the CRC Flickr account as inspiration. Their challenge was to design a game which used at least three images from Open Educational Resource sites, one of which had to come from the CRC collection. The games also had to include at least three different game mechanics, be openly licensed and have a full set of rules.
Apocalypse Later is a card game in which players cooperate to overcome challenges ranging from volcano eruptions through to a zombie apocalypse, drawing and playing cards to gain advantages and advance in the game. One character is secretly a ‘mole’, whose sole purpose is to prevent the team from winning the game! The game features images from Anton Koberger’s German bible, the seal of Robert the Bruce and a decorated page from the Hours of the Blessed Virgin Mary from the CRC image collection.
In this art-themed board game, players take control of larvae hunting for works of art in various locations across the University. The larvae are highly cultured beings and need inspiration from art works in order to stay alive! Players draw cards representing different types of art (e.g. painting, sculpture) and have to decide whether to play them immediately for in-game bonuses / penalties or retain them for scoring at the end of the game. The player with the highest art value at the end is the winner. Cultured Ai (Arts for Ai) uses CRC plans of McEwan Hall, the Medical School and Glencoe Ballachulish for the game board.
In The Mouse Hunt, players compete in two teams vying for domination of an 18th century Edinburgh tenement! On one side, a team of mice attempts to drive the human inhabitants mad by digging tunnels and making a lot of noise. On the other side, humans set traps and try to rid the house of the rodent infestation! The house in which the game is set was inspired by historical images of Edinburgh from the CRC collection.
In Mythical Continents, players sail the seven seas fighting monsters and collecting relics hidden across the globe. Movement is governed by a wind dial (modelled on the Kalendar and Astronomical Tables from the CRC collection) and players complete to bring all treasures back to Nessie, drawing event and monster cards along the way!
The adoption of IIIF (International Image Interoperability Framework) has been gaining momentum over the past few years for digitised images. Adoption of IIIF for serving images allows users to rotate, zoom, crop, and compare images from different institutions side by side. Scott and I attended the IIIF conference in Ghent earlier this month to learn more about IIIF, so we can decide how we can move forward at the University of Edinburgh to adopt IIIF for our images.
On the Monday we attended a technical meeting at the University of Ghent Library, this session really helped us to understand the architecture of the two IIIF APIs (image and presentation) and speak to others who have implemented IIIF at their institutions.
The main event was on Tuesday at the beautiful Ghent Opera House, where there were lots of short presentations about different use-cases for IIIF adoption and the different applications that have been developed. If you are interested in adoption IIIF at your institution I recommend looking at Glen Robson’s slides on how the National Library of Wales has implemented IIIF. I can see myself coming back to these slides again and again, along with those on the two APIs.
Whilst we were in Ghent there was a timely update from LUNA Imaging, whose application we use as an imaging repository on their plans to support IIIF.
Thanks to everyone we met in Ghent who was willing to share with us their experiences of implementing IIIF and to the organisers for a great event in a beautiful city (and our stickers).
Location-based intelligence is a growing area of importance in the academic library environment (as identified in the most recent NMC Horizon Report) and we’ve been exploring how Bluetooth beacons can be used to deliver information and content to users based on their location in the library space.
More recently, we’ve started to explore ways in which beacons can be used to provide tours of the library building itself. There are several potential use cases for this, such as a tour for new undergraduates showing them where key services are located, or a tour of the paintings on display in the main library for art enthusiasts, but we decided to create a tour of the building for the general public in order to tie in with Doors Open Day 2015. Our library was designed by the British architect Sir Basil Spence and A-listed in 2006: its history is of real interest to our visitors.
Working with colleagues from across Information Services, we developed a tour app (available from the Apple App Store and Google Play) which uses beacons to tell the story of the library building and service.Beacons were set up at seven locations and users who had installed the app on their phone were sent a notification whenever they came into proximity of one – tapping the notification provided the user with a short, 1-2 minute long, video about the area they were in, such as this general introduction to the building:
We had originally hoped to use beacons to create a form of ‘internal GPS’ to show the user their location in the library space (much like the blue ‘you are here’ dot on Google Maps) but we found that their inaccuracy over three metres made it impossible to trilaterate location accurately enough.
Around 50 people downloaded the tour over the weekend and the feedback was extremely positive. We learned some important lessons from this application, which will inform future uses of technology in this way.
Have a backup content delivery mechanism: make sure the content can be accessed manually through the app if the beacons don’t work. This also allows visitors to access the videos once they have left the building.
Have staff on hand to help people download the app: many visitors needed assistance to access the Wi-Fi network and download the app from the relevant online store.
Make sure Wi-Fi is available: provide Wi-Fi so that visitors don’t need to use their data connection to download the app, particularly as apps can be quite large (our app was 50MB). We set up a Wi-Fi hotspot for people who didn’t have access to the network.
Provide some basic signage in the physical space: let people know when they are in a beacon zone and provide QR codes linking to the app stores in order to assist with the download.
Bluetooth: make sure users switch it on!
The content is more important than the medium: we got good feedback for our experiment but, ultimately, a beacon is just a delivery mechanism and it was crucial that we provided high quality content. It took in the region of 50 staff hours to create seven two-minute videos.
Having to download an app is a huge barrier: the need to download an app prevented many visitors from engaging with the tour.
We’re continuing to explore the use of beacons in the library space and recently secured funding to see how Google’s new Eddystone beacon can be used to provide information and updates to library users throughout the building. We are especially keen on exploring the potential for Eddystone to bypass the need to download an app and will blog more as the project progresses!
Gavin Willshaw (Library & University Collections) , Ben Butchart (Edina), Sandy Buchanan (Edina), Claire Knowles (Library & University Collections)
The overwhelming setting of the British Museum played host to this year’s Museums Computer Group “Museums and the Web” Conference, and as usual, a big turnout from museums institutions all over the UK came, bursting with ideas and enthusiasm. The theme (“Bridging Gaps and Making Connections”) was intended to encourage thought about identifying creative spaces between physical museums collections and digital developments, where such spaces are perhaps too big, and how they can be exploited. As usual, there was far too much interesting content to cover fully in a blogpost- everything was thought-provoking, but I’ve picked out a few highlights.
Two projects highlighted collaboration between museums, which can be creatively explosive, and immediately improve engagement. Russell Dornan at The Wellcome Institute showed us #MuseumInstaSwap, where museums paired off and filled their social media feeds with the other museum’s content. Raphael Chanay at MuseoMix, meanwhile, arguably took this a step further by getting multiple institutions to bring their objects to a neutral location (Iron Bridge in Shropshire, Derby Silk Mill), and forming teams to build creative prototypes out of them across the digital and physical spaces. Could our museums collections be exploited in similar ways? Who could we partner up with?
I like to think that our “digital and physical” teams in L&UC collaborate very effectively. Keynote speaker John Coburn from TWAM (Tyne and Wear Archives and Museums) spoke of the importance of this intra-institution collaboration. You will (almost) never find a project that is run entirely from within the digital or physical sphere (Fiona Talbott from the HLF confirmed this- 510 of 512 recent bids had digital outputs relating to physical content), and the ability of the digital area and the content providers to communicate and work together is key. One very good example of this was the Tributaries app, built with sound artists, the history team, archives and so on, to put together an immersive audio experience of lost Tyneside voices from World War I. He also spoke of their TNT (Try New Things) initiative (also creatively explosive!) where staff sign up to do innovation with the collections, effectively in their spare time. With the Innovation Fund encouraging creativity, how do we work this into our daily lives? Can we? If not, how do we incentivise people to do it outwith their spare time? One of the gloomier observations of the day was that, with austerity, there is less and less money in the sector, which is likely to get worse after next month’s spending review. This austerity can breed creativity, though, and it’s good for digital, because people need to ‘work smarter’.
Another really interesting project is going on at the Tate, where they are combining their content with the Khan Academy learning platform. Rebecca Sinker and colleagues showed us how content can be levered and resurrected through a series of video tutorials around the content (be they archival, technical, biographical etc). Pushing the collaborative textual content from the comments area on the tutorials through to social media allows further engagement and new perspectives on the museum objects. Speaking personally, I have had little exposure to our VLE, but I’m quite sure that developing an interface between it and our collections sites could be highly beneficial.
That’s all the tip of the iceberg, though, so take a look at the programme link at the top to find out about lots of other interesting projects.
Outside of the lecture theatre, I had some really interesting conversations with people who have exactly the same problems as ourselves: building image management workflows, incorporating technological enhancements to content-driven websites, and thinking about beacon technology (the sponsors, Beacontent, deserver top marks for the name at least). Additionally, a tour of The Samsung Digital Discovery Centre– where state of the art technology meets British Museum content to improve the experience for children, teenagers, and families- was highly informative.