Reconstruction Tool

By Sandra Schloen, May 2020; Updated September 2020

OCHRE's Reconstruction Tool supports digital paleography by allowing a scholar to experiment with the positioning of hotspot cutouts of signs or characters on a high-resolution image to illustrate an argument in support of a reconstruction of a damaged or fragmented section of a text.

Image hotspots on Samuel Dead Sea Scroll, 4Q52 frg. 6 entered by Sarah Shaw Yardney

Image Hotspots

The Reconstruction Tool depends on the availability of image hotspots as designated by a bright orange border around the image icon associated with OCHRE images in the Resources Category.

View the image and be sure to request the high-resolution version by clicking the button with the image icon (otherwise, by default, the image thumbnail will be shown and the reconstruction tool will not be available).

When the high-resolution image loads, the wrench-tool button becomes enabled. Click this button to enable the Reconstruction tool.

Sign gallery

Enabling the Reconstruction tool triggers the creation of a gallery of signs containing of all the hotspot regions extracted from the image. This gives you access to all the exemplars of the available signs in the scribe's own hand-writing to use for comparison with other signs in the image or, in particular, for comparison to broken and fragmentary signs.

If the image being viewed is highly fragmentary and has a limited inventory of signs, use the Add button to include in the Sign Gallery exemplars from another selected Text.

Use the color buttons and the hotspot option pick-list on the image toolbar to control the view of the hotspots, adjusting it to your own liking.

Gallery of signs when using the Reconstruction tool
Drag-drop signs from the gallery to illustrate how they would appear, in context, on the image.

Making arguments

Use the Sign Gallery to make convincing arguments. Let's say you want to justify the presence of a Mêm along the broken bottom edge.

Pan the image to the area in question (use the hand-icon button). Filter (use the pick-list of available signs) the Sign Gallery to display all the exemplars of Mêm in the scribe's own hand-writing. Drag-and-drop selected exemplars from the Gallery onto the image, positioning them in place.

To discard a sign from the image, simply drag it off the view.

Making adjustments**

The Adjustment Tool lets you create an adjusted/edited exemplar to manipulate and position on the image canvas to illustrate your argument. Select a hotspot from the library of cutouts and click the Adjust button. A graphic representation of the hotspot will be placed in the Adjust window and made available for further editing.

Use the Adjustment tool to de-noise, colorize, erase, and touch-up an exemplar.

Adjust the threshold of desired de-noising

Change the color and/or desired transparency

Make adjustments using the eraser or touch-up pencil

Scale or rotate as needed to match the base image

When finished making adjustments, click Apply. The adjusted graphic will be dropped onto the center of the base image where it can be moved to the desired location.

**The Adjustment Tool requires special installation on a Mac; see the instructions at the bottom of this page.

The Adjustment tool respects the bounds of a polygonal hotspot when cropping the exemplar

TIP: Polygon-shaped hotspots

It is quick and easy to create rectangular hotspots, but sometime it is worth the trouble to use the polygon hotspot tool to carefully delimit the extent of a character or sign, separating it from neighboring signs that encroach on its own bounding rectangle. OCHRE respects the polygonal shape and creates a "mask" to crop out, in effect, any residuals from neighboring signs.

Cuneiform cutouts

The Reconstruction tool is not restricted to use with any particular script or language. Here is another example, this time using a Elamite cuneiform tablet from the Persepolis Fortification Archive project.

Perhaps you are studying the signs on the Obverse of the tablet. You may want to add exemplars to the Gallery of the hotspotted signs from a photograph of the Reverse of the tablet. Presumably these are in the same scribe's hand. Use the Linked Items pane in the usual way to select the image of interest then click the Add button to add the additional hotspot cutouts to the Gallery. For this text we gain an additional 25 exemplars from the tablet's reverse.

Use Clear to empty the Sign Gallery and start over.

More exemplars of the requested sign can be added to the library of hotspots cutouts.

Filter for More

Perhaps you wish to consider exemplars of signs that are not attested on the current image, or you wish to see additional (perhaps better!) exemplars of a sign from other tablets.

Filter the sign-list to the desired sign then ask for More. OCHRE will query for other hotspot exemplars of this sign and will report on how many it finds. With your confirmation, OCHRE will add up to an additional 50 exemplars to the library of cutouts.

TIP: Querying for hotspots

Rather than letting OCHRE find arbitrarily More hotspot exemplars, you can find all the hotspots of interest more intentionally by using a Query.

Build a query in the usual way, scoping to the Category of Epigraphic units. Metadata properties for Hotspot links and for the desired Sign will be available. Perform the query to generate the list of results, best viewed by using the Image Gallery option from the quick-view toolbar on the Query Results pane.

Be sure to request high-resolution hotspots from the Image Gallery toolbar.

Turn on hotspot links in the Image Gallery to view hotspot exemplars found by using a Query.

Duplicate graphic

Once you have created and adjusted a graphic to be positioned on the image, it is easy to create a duplicate. Simply double-click the graphic and it will be presented again in the pop-up Adjustment Tool.

You can Apply the graphic again, unaltered, to drop another copy on the base image, or you can make additional adjustments (e.g. change its color or transparency) before placing it on the image.

Duplicate an adjusted graphic to put another copy on the image to manipulate.

To Save your Reconstructed View, use one of 2 options:

  • Save the View as a PNG image (which respects transparency of any graphics that have been applied). OCHRE will prompt you for a filename and path for saving the image.

  • Save your working copy as a new OCHRE Resource item, including any graphics that have been applied, adjusted, and positioned. You will be able to come back to this copy and continue to work on it. It will be timestamped and saved in the Resource Inbox. The original image/Resource will not be altered.

Repeat ... explore ... experiment ... discover!

**Installing Reconstruction Tools on a Mac

OCHRE uses the open source library OpenCV (opencv.org) to support advanced image processing features. In order to use the Adjustment Tool to make visual adjustments to the reconstructed hotspots, this library will need to be installed on your computer. If you do not need to adjust the threshold, size, color or transparency of the hotspots, then you do not need this special installation.

OCHRE installs this library automatically on a Windows PC; no additional steps are needed. However, because MacOS makes it difficult for OCHRE to do the installation automatically, Mac users will need to perform the following installation steps manually (requires administrative access to your computer).

These steps will require some ability to use the Mac Terminal. If you need assistance with the following tasks, please contact the OCHRE Data Service (ochre@uchicago.edu).

Step 1: Open Terminal

There are many ways to do this. See this link: https://www.wikihow.com/Open-a-Terminal-Window-in-Mac

Step 2: Confirm that XCode Command Line Tools are Installed

To do so, use Terminal to execute: xcode-select --install

If macOS indicates that installation of these tools is needed, proceed with the download and installation. Otherwise, continue with the next step.

Step 3: Install Homebrew

https://brew.sh/

Homebrew is a trusted package manager for MacOS. Follow the instruction in the link above to install it on your computer.

Step 4: Install Apache Ant

As a prerequisite, check that Apache Ant is installed. Ant should be available on your local computer at /usr/local/bin/ant.

Otherwise, install it with Homebrew. Execute the following in Terminal: brew install ant

Step 5: Allow Homebrew to Install OpenCV with Java Support

You will need to use Terminal to edit a setting in Homebrew.

First, execute this command in Terminal: brew edit opencv. This will open a document in the Terminal window that you will edit and save.

Use the down arrow on your keyboard to scroll down to the line that says: -DBUILD_opencv_java=OFF

Once you are on this line, use the right arrow on your keyboard to move the cursor to the first F in OFF.

Type the letter N, then delete the two FFs. (To delete on the right side of the cursor on a Mac, usually use fn+delete.)

(NOTE: text editors in Terminal can be a little finicky.)

When you are done, the line should read: -DBUILD_opencv_java=ON

To save your changes and exit the file, click Esc on your keyboard (you might not see anything happen), then type :x and hit Enter on your keyboard.

Make sure you are at back at your default command line prompt in Terminal.

Step 6: Install OpenCV Package

All of the previous steps were in preparation for the installation of OpenCV itself.

To install OpenCV execute the following in Terminal: brew install --build-from-source opencv

NOTE: THE INSTALLATION PROCESS IN STEP 6 TAKES A LONG TIME. YOU WILL PROBABLY SEE SOME ACTIVITY IN TERMINAL WHEN IT STARTS. IF SO, THEN ALL IS WELL. LEAVE IT ALONE AND ALLOW IT TO INSTALL.