Annotation-StoringAnnotation

←↑↓→

Storing Annotation

GEDI saves all the annotation associated with an image in an xml file in the directory specified when you opened the image (the directory containing the image, by default) whenever you move to a different image from that directory or select a different image file/directory to open. The xml file will have the same name as the image file it is associated with. You can find a small example of the xml format under the GEDI Philosophy section of the GEDI Overview; a more detailed example can be found below.

    <?xml version="1.0" encoding="UTF-8"?>
    <!--GEDI was developed at Language and Media Processing Laboratory, University of Maryland.-->
    <GEDI xmlns="http://lamp.cfar.umd.edu/GEDI" version="1.0">
        <USER name="Elena" date="5/23/2008 17:24" dateFormat="mm/dd/yyyy hh:mm">	</USER>
        <USER name="Orri" date="6/11/2008 13:54" dateFormat="mm/dd/yyyy hh:mm">	</USER>
        <DL_DOCUMENT src="sample.tif" docTag="xml" NrOfPages="3">
            <DL_PAGE gedi_type="DL_PAGE" src="sample.tif" pageID="1" width="1728" height="2292">
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="2" nextZoneID="4" col="1285" row="269" width="166" height="335" orientationD="16.169" offsets="" contents="" segmentation="word"> </DL_ZONE>
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="3" nextZoneID="8" polygon="(151,253);(274,274);(610,294);(561,331);(540,375);(312,380);(255,414);(109,404);(76,363);(107,349);(113,300)" offsets="" contents="" segmentation="word"> </DL_ZONE>
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="4" nextZoneID="5" col="216" row="867" width="1231" height="80" offsets="" contents="I have received an initial progress report from the St. Louis market." segmentation="line"> </DL_ZONE>
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="5" nextZoneID="6" col="214" row="626" width="494" height="35" offsets="56, 244, 302" contents="To: Mr. A. Sadovnick" segmentation="word"> </DL_ZONE>
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="6" nextZoneID="7" col="214" row="704" width="98" height="40" offsets="" contents="" segmentation="word"> </DL_ZONE>
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="7" col="396" row="706" width="303" height="34" offsets="" contents="" segmentation="word"> </DL_ZONE>
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="8" nextZoneID="2" col="216" row="790" width="147" height="27" offsets="21, 42, 58, 77, 95, 116, 132" contents="Subject:" segmentation="character"> </DL_ZONE>
            </DL_PAGE>
            <DL_PAGE gedi_type="DL_PAGE" src="sample.tif" pageID="2" width="1728" height="2292">
                <DL_ZONE gedi_type="DL_TEXTLINEGT" id="9" nextZoneID="10" col="167" row="353" width="291" height="148" contents="" offsets="" segmentation="word"> </DL_ZONE>
                <DL_ZONE gedi_type="Signature" id="10" polygon="(216,681);(330,683);(338,650);(361,683);(398,640);(408,704);(448,704);(448,685);(522,691);(547,666);(619,712);(545,765);(377,772);(315,763);(264,782);(194,772);(189,768)" Name="R. J. Di Donato"> </DL_ZONE>
            </DL_PAGE>
            <DL_PAGE gedi_type="DL_PAGE" src="sample.tif" pageID="3" width="1728" height="2292">
                <DL_ZONE gedi_type="Stamp" id="11" col="1026" row="1779" width="533" height="397" Name="R. H. Orcutt" orientationD="-2.816" Action="Received" Date="May 24 1994"> </DL_ZONE>
            </DL_PAGE>
        </DL_DOCUMENT>
    </GEDI>

The first significant tag type is the USER tag, which documents which users most recently annotated the image, and when. Next comes the DL_DOCUMENT tag, which contains, in this case, 3 DL_PAGE tags, one for each page of this multipage tiff. In non-multipage tiff xml files, there is only one DL_PAGE tag. Each DL_PAGE tag has a number of DL_ZONEs in it, corresponding to the boxes on the pages of the image. As you can see, a zone order has been specified for the first and second pages of the image. This is represented in the xml with the nextZoneID attribute. Also notice that zones with different shapes are represented differently in the xml. Normal zones are represented with col, row, width, and height attributes; Oriented zones with the same plus an additional orientationD attribute; and Polygon zones just with a series of coordinate pairs corresponding to the location of their vertices. You can see, as well, that a DL_TEXTLINEGT zone can be assigned offsets, which split the digital text into the approximate locations of their image-text counterparts. This segmentation can happen on either a character or word basis. Anything broader than that is covered by the "line" specification for the segmentation attribute, and has no offsets. Observe that the polygon zone on the second page is of a user-defined type (Signature) with user-defined attributes (Name); and that the oriented zone on the third page is of a user-defined type, as well (Stamp), also with user-defined attributes (Action, Date, Name). Now, not every piece of information is stored in these xml files; for example, default and allowed values for zone types are stored, along with preferences, and the like, in GEDIConfig.xml files, unique to each directory. You can see an example below:

    <!--GEDI was developed at Language and Media Processing Laboratory, University of Maryland.-->
    <GEDI xmlns="http://lamp.cfar.umd.edu/GEDI" version="1.0">
        <configuration>
            <type_settings>
                <type_setting_entry gedi_type="DL_TEXTLINEGT" color="#0000ff" visible="true" key="None">
                    <type_attribute name="offsets" default="" possible_values="" ArbitraryVal="false"> </type_attribute>
                    <type_attribute name="contents" default="" possible_values="" ArbitraryVal="false"> </type_attribute>
                    <type_attribute name="segmentation" default="word" possible_values="{character;word;line}" ArbitraryVal="false"> </type_attribute>
                </type_setting_entry>
                <type_setting_entry gedi_type="Stamp" color="#cc0033" visible="true" key="None">
                    <type_attribute name="Name" default="" possible_values="" ArbitraryVal="true"> </type_attribute>
                    <type_attribute name="Action" default="Received" possible_values="{;Received; Sent}" ArbitraryVal="true"> </type_attribute>
                    <type_attribute name="Date" default="" possible_values="" ArbitraryVal="true"> </type_attribute>
                </type_setting_entry>
                <type_setting_entry gedi_type="DL_PAGE"> </type_setting_entry>
                <type_setting_entry gedi_type="Signature" color="#000000" visible="true" key="None">
                    <type_attribute name="Name" default="" possible_values="" ArbitraryVal="true"> </type_attribute>
                </type_setting_entry>
            </type_settings>
        </configuration>
    </GEDI>