Forms

In any image or video, groups of form responses can be inserted via the UI. Regions can have bounds, like x/y coordinates and timestamps, but they do not have to, as is the case with the top-level annotations. So, now, no matter what your UI does, you can append form objects to media by adding the IForm object to the IRegion's associatedForms list.

The resulting JSON output for the IMedia object is below. (Since this media object contains a top-level region, that region's bounds are all 0s and -1 for its timestamp.)

{dimEntry":{
    "originalHash":"c478b5808d14c273e5a58f0389dfd84225f1dd38",
    "id":16011,
    "exif":{
        "exposure":"0.030",
        "orientation":1,
        "flash":-1,
        "model":"GT-N7100",
        "iso":"125",
        "location":[
                40.70903778076172,
                -73.96454620361328
        ],
        "width":1280,
        "whiteBalance":0,
        "aperture":"2.8",
        "focalLength":-1,
        "timestamp":"2013:07:11 15:27:59",
        "duration":0,
        "height":960,
        "make":"SAMSUNG" 
    },
    "timeCaptured":1373570879000,
    "name":"20130711_152759.jpg",
    "uri":"content:\/\/media\/external\/images\/media\/16011",
    "mediaType":"image\/jpeg",
    "thumbnailName":"20130711_152759_thumb.jpg",
    "size":300682
},
"bitmap":"\/c478b5808d14c273e5a58f0389dfd84225f1dd38\/20130711_152759.jpg",
"isNew":false,
"width":1280,
"lastEdited":0,
"bitmapPreview":"\/c478b5808d14c273e5a58f0389dfd84225f1dd38\/20130711_152759_preview.jpg",
"bitmapThumb":"\/c478b5808d14c273e5a58f0389dfd84225f1dd38\/20130711_152759_thumb.jpg",
"genealogy":{
    "dateCreated":0,
    "hashes":[
        "2f3ea762f6872fe9df8e7878defdd06f" 
    ]
},
"associatedRegions":[
    {
        "timestamp":0,
        "id":"98f2eeb72925c5381045d3e40fa9dd2c",
        "bounds":{
                "startTime":-1,
                "displayTop":0,
                "height":0,
                "width":0,
                "displayLeft":0,
                "left":0,
                "endTime":-1,
                "displayWidth":0,
                "top":0,
                "displayHeight":0
        },
        "associatedForms":[
                {
                        "path":"\/forms\/493dde68c49e6b99556186a3e776d705.xml",
                        "title":"iWitness Free Text Annotations",
                        "answerPath":"\/c478b5808d14c273e5a58f0389dfd84225f1dd38\/form_t1373571027245",
                        "namespace":"iWitness Free Text Annotations" 
                },
                {
                        "path":"\/forms\/e9a480caa90d22e4607f84a5a1ae20c8.xml",
                        "title":"iWitness Free Audio Annotation",
                        "answerPath":"\/c478b5808d14c273e5a58f0389dfd84225f1dd38\/form_a1373571027245",
                        "namespace":"iWitness Free Audio Annotation" 
                }
        ]
    }
],
"height":960,
"bitmapList":"\/c478b5808d14c273e5a58f0389dfd84225f1dd38\/20130711_152759_list.jpg",
"_id":"48401d59cc2f8201817b13ce7d2dfca9",
"rootFolder":"\/c478b5808d14c273e5a58f0389dfd84225f1dd38",
"associatedCaches":
    [
            "\/informaCaches\/1373571026954_1373571048312",
            "\/informaCaches\/1373571064283_1373571079767",
            "\/informaCaches\/1373571246205_1373571254371",
            "\/informaCaches\/1373571379026_1373571401690",
            "\/informaCaches\/1373571611503_1373571620318",
            "\/informaCaches\/1373571935013_1373571937287",
            "\/informaCaches\/1373572240795_1373572282778",
            "\/informaCaches\/1373572438709_1373572443901" 
    ]
}

In the output above, the answers to the forms are found in the "answerPath" field, and are inflated into the J3M Data on export.

These forms are javarosa/open data kit compliant (http://www.kobotoolbox.org/) which was a decision I made last year at the RFA conference based on discussions with Globaleaks and Martus' teams: Martus was already using ODK, so we all decided we'd adhere to that standard.

The forms in EyeWitness (I'm attaching them) are based off of specific questions the IBA said they wanted users to answer about each submission. The forms come bundled with the ICTD file, so they're available to the app whenever a trusted destination file is imported. When the media is exported, these values are extended to include the answer data, not a pointer to a file (which is only locally on the device).

When j3m data is exported, you'd see this instead:

{
    "timestamp":1368290496334,
    "regionBounds":{
        "displayTop":200,
        "height":240,
        "width":240,
        "displayLeft":200,
        "left":400,
        "displayWidth":120,
        "top":400,
        "displayHeight":120
    },
    "index":0,
    "id":"98f2eeb72925c5381045d3e40fa9dd2c",
    "associatedForms":[
        {
           "namespace":"iWitness Free Text Annotations",
           "answerData": {
                "iW_free_text":"i'm on a boat!" 
           }
       }
    ]
},
{
    "timestamp":1368290496742,
    "id":"98f2eeb72925c5381045d3e40fa9dd2c",
    "associatedForms":[
        {
           "namespace":"iWitness Free Text Annotations",
           "answerData": {
                "iW_free_text":"this is the boat on the sea." 
           }
       }
    ]
}

The first object pertains to a region of interest within the image, and has a bounds object and an index. The second object is missing those two fields, and therefore can be considered to pertain to the entire media object. InformaCam does not rely on these differences, so it's up to a 3rd-party app to make use of this differentiation if necessary. The library has two helper methods: IMedia.getInnerLevelRegions() and IMedia.getTopLevelRegion() so developers can make use of this data in-app.

iWitness_free_audio.xml Magnifier (1.33 KB) harlo, 07/12/2013 01:47 pm

iWitness_free_text.xml Magnifier (1.41 KB) harlo, 07/12/2013 01:47 pm

iWitness_v_1_0.xml Magnifier (4.8 KB) harlo, 07/12/2013 01:47 pm

Also available in: PDF HTML TXT