Constructor for Js_objectdetectGaze which captures face and eye positions using the js_objectdetect library
        
        
            
- Source:
 
Methods
detectEyes(workingImage, width, height)
    Performs eye detection on the passed workingImage
    Parameters:
| Name | Type | Description | 
|---|---|---|
workingImage | 
            
            ImageData | either the whole canvas or the upper half of the head | 
width | 
            
            number | width of working image | 
height | 
            
            number | height of working image | 
- Source:
 
detectFace(imageCanvas, width, height)
    Performs face detection on the passed canvas
    Parameters:
| Name | Type | Description | 
|---|---|---|
imageCanvas | 
            
            canvas | whole video canvas | 
width | 
            
            number | width of imageCanvas | 
height | 
            
            number | height of imageCanvas | 
- Source:
 
findLargestRectangle(rectangles)
    Goes through an array of rectangles and returns the one with the largest area
    Parameters:
| Name | Type | Description | 
|---|---|---|
rectangles | 
            
            array | array | array of format [xCoordinate, yCoordinate, width, height] | 
- Source:
 
getEyePatches(imageCanvas, width, height) → {Object}
    Isolates the two patches that correspond to the user's eyes
    Parameters:
| Name | Type | Description | 
|---|---|---|
imageCanvas | 
            
            Canvas | canvas corresponding to the webcam stream | 
width | 
            
            number | of imageCanvas | 
height | 
            
            number | of imageCanvas | 
- Source:
 
Returns:
    the two eye-patches, first left, then right eye
- Type
 - Object
 
mergeRectangles(rects) → {array}
    Merges detected rectangles in clusters
Taken from trackingjs and modified slightly to reflect that rectangles are arrays and not Objects
    Parameters:
| Name | Type | Description | 
|---|---|---|
rects | 
            
            array | rectangles to me clustered | 
- Source:
 
Returns:
    result merged rectangles
- Type
 - array