Extension:Semantic Image Annotator

Semantic Image Annotator is an extension for Semantic MediaWiki that allows you to add semantic annotations to images in your wiki. It requires SemanticForms to work.

Download
Download the current version of Semantic Image Annotator as a .zip file here. The extension will hopefully be added to the MediaWiki repositories in the near future, so that snapshot versions can be downloaded from there.

Installation
To install this extension, copy the SemanticImageAnnotator folder from the .zip file to your /wiki/extensions/ folder and include the following line in your LocalSettings.php :

Set Up
After the installation, you have to create a Template and a Form to work with Semantic Image Annotator. The form has to have the name Form:ImageAnnotation and it is good practice to call the corresponding Template the same. More information on using Semantic Forms can be found on it's extension page. A good starting point is the Quick start guide.

Usage
This is a brief introduction on how to use the Semantic Image Annotator. A more detailed guide will appear on this page in the near future.

Creating Annotations
After Successful installation, the button Annotate this image will appear above images on their File: page. Clicking this button will start the "annotation mode". You are then able to draw rectangular annotations on the image. After accepting a particular annotation shape, a Semantic Forms popup window with the form that you have created will appear. In this window, you can specify the details of your annotation.

Displaying Annotations
To display annotations that you have created, you use the Semantic MediaWiki ask parser functions with the result format imageannotation. If you want to display every annotation for a particular image, you can query for the special property SIAannotatedImage, giving the filename as its value. So for example if you have an image called Spieler.png, your query would look like this:

If you have created a form/template that stores additional properties for the annotaions, you can also simply query for these properties. If your query returns annotations for multiple images, they are all displayed (see Planned Features). You can also specify the parameter width= and give an integer number to scale the images width to this size (in pixels).

How it works
Semantic Image Annotator defines a custom namespace for annotations (ImageAnnotation:). Each annotation is stored as a unique page in this namespace. Semantic Image Annotator also defines a few custom properties that are added to an image annotation page that are necessary to correctly store and retrieve annotations:
 * SIAannotatedImage
 * The name of the image file that this annotation belongs to.


 * SIArectangleCoordinates
 * The coordinates, relative to the image dimension, at which the annotation is drawn.


 * SIAimageURL
 * The url (relative to the wiki) at which the annotated image is stored.


 * SIAcreatedBy
 * The user that created the annotation.

Future Development
The Semantic Image Annotator is still under heavy development. Feedback, bug reports and feature requests are therefore very welcome! Using this pages Discussion is a very good way to get in touch with the developers and maintainers of Semantic Image Annotator

Upcoming Features
These are features that are at the top of the priority list and will be implemented shortly:
 * 1) Configurable Namespace Number for the ImageAnnotation Namespace
 * 2) Different handling of multiple images

Planned Features
These features are planned already and will be implemented in the near future:
 * 1) Modifying annotation shapes
 * 2) Dragging annotations to a different position
 * 3) Resizing annotations
 * 4) Add different shapes, e.g. circles and custom shapes
 * 5) Define custom colors for annotation shapes