Calculating Linear Measurements (Canadian Grid)

These notes were prepared by Brian Schlining on 2013-09-17

Overview

Once upon a time a group of very, very dedicated research technicians and interns dilegently spent vast swaths of their precious lives drawing little lines on many, many thousands of nearly identical images collected by the Tripod. When they were done they said, "this is good". But their Sisyphian labors had not yet been completed; they still need to apply the dreaded 'Canadian Grid' to the data in order to convert them to real units and bring closure and meaning to their toil.

Information That You WILL Need

We will convert VARS annotations to area using the following camera parameters [1] (so go and collect this info now!!):

Known Camera Parameters

Rover (as of 2012-12-10)

How to Generate Measurements

This is pretty straightforward, here's what you'll need to do:
  1. If you haven't already done so download and extract a VARS distribution for executing scripts. You can get it here
  2. Unzip the distribution somewhere, we'll call the directory you unzipped it into as VARS_HOME. You may need to do the following:
            cd VARS_HOME/bin
            chmod u+x *
    
  3. Run the code to fetch and run distance calculations as:
            cd  VARS_HOME/bin
            ./gsh ../scripts/groovy/process_cg_measurements cameraHeight alpha beta theta videoArchiveName outputFile
    
    The documentation for the code is:
     Script that converts any 'measurement' associations found in your VARS query results
     and converts them to distances in the same units as the cameraHeight
    
     Usage:
       CanadianGridDistanceApp      
    
     Arguments:
        cameraHeight:     The height of the camera above the seafloor. All area measurements will
                          be in the same units as cameraHeight (i.e. you should use centimeters
                          instead of meters)
        alpha:            The vertical angular field of view in degrees
        beta:             The horizontal angular field of view in degrees
        theta:            The tilt of the camera from horizontal in degrees
        videoArchiveName: The VideoArchive to process
        targetFile:       The name of the file to write to
    
    An example line for demonstration:
            ./gsh ../scripts/groovy/process_cg_measurements 112 33.6 42 39 "Pulse60Grid" Pulse60GridMeasurements.txt