lib/complexTypes/RegionOfInterestConfig.js
function RegionOfInterestConfig(regionOfInterestConfigDict){
  if(!(this instanceof RegionOfInterestConfig))
    return new RegionOfInterestConfig(regionOfInterestConfigDict)

  regionOfInterestConfigDict = regionOfInterestConfigDict || {}

  // Check regionOfInterestConfigDict has the required fields
  // 
  // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMin', regionOfInterestConfigDict.occupancyLevelMin);
  //  
  // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMed', regionOfInterestConfigDict.occupancyLevelMed);
  //  
  // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMax', regionOfInterestConfigDict.occupancyLevelMax);
  //  
  // checkType('int', 'regionOfInterestConfigDict.occupancyNumFramesToEvent', regionOfInterestConfigDict.occupancyNumFramesToEvent);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMin', regionOfInterestConfigDict.fluidityLevelMin);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMed', regionOfInterestConfigDict.fluidityLevelMed);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMax', regionOfInterestConfigDict.fluidityLevelMax);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityNumFramesToEvent', regionOfInterestConfigDict.fluidityNumFramesToEvent);
  //  
  // checkType('boolean', 'regionOfInterestConfigDict.sendOpticalFlowEvent', regionOfInterestConfigDict.sendOpticalFlowEvent);
  //  
  // checkType('int', 'regionOfInterestConfigDict.opticalFlowNumFramesToEvent', regionOfInterestConfigDict.opticalFlowNumFramesToEvent);
  //  
  // checkType('int', 'regionOfInterestConfigDict.opticalFlowNumFramesToReset', regionOfInterestConfigDict.opticalFlowNumFramesToReset);
  //  
  // checkType('int', 'regionOfInterestConfigDict.opticalFlowAngleOffset', regionOfInterestConfigDict.opticalFlowAngleOffset);
  //  

  // Init parent class
  RegionOfInterestConfig.super_.call(this, regionOfInterestConfigDict)

  // Set object properties
  Object.defineProperties(this, {
    occupancyLevelMin: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyLevelMin
    },
    occupancyLevelMed: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyLevelMed
    },
    occupancyLevelMax: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyLevelMax
    },
    occupancyNumFramesToEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyNumFramesToEvent
    },
    fluidityLevelMin: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityLevelMin
    },
    fluidityLevelMed: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityLevelMed
    },
    fluidityLevelMax: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityLevelMax
    },
    fluidityNumFramesToEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityNumFramesToEvent
    },
    sendOpticalFlowEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.sendOpticalFlowEvent
    },
    opticalFlowNumFramesToEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.opticalFlowNumFramesToEvent
    },
    opticalFlowNumFramesToReset: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.opticalFlowNumFramesToReset
    },
    opticalFlowAngleOffset: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.opticalFlowAngleOffset
    }
  })
}
function RegionOfInterestConfig(regionOfInterestConfigDict){
  if(!(this instanceof RegionOfInterestConfig))
    return new RegionOfInterestConfig(regionOfInterestConfigDict)

  regionOfInterestConfigDict = regionOfInterestConfigDict || {}

  // Check regionOfInterestConfigDict has the required fields
  // 
  // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMin', regionOfInterestConfigDict.occupancyLevelMin);
  //  
  // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMed', regionOfInterestConfigDict.occupancyLevelMed);
  //  
  // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMax', regionOfInterestConfigDict.occupancyLevelMax);
  //  
  // checkType('int', 'regionOfInterestConfigDict.occupancyNumFramesToEvent', regionOfInterestConfigDict.occupancyNumFramesToEvent);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMin', regionOfInterestConfigDict.fluidityLevelMin);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMed', regionOfInterestConfigDict.fluidityLevelMed);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMax', regionOfInterestConfigDict.fluidityLevelMax);
  //  
  // checkType('int', 'regionOfInterestConfigDict.fluidityNumFramesToEvent', regionOfInterestConfigDict.fluidityNumFramesToEvent);
  //  
  // checkType('boolean', 'regionOfInterestConfigDict.sendOpticalFlowEvent', regionOfInterestConfigDict.sendOpticalFlowEvent);
  //  
  // checkType('int', 'regionOfInterestConfigDict.opticalFlowNumFramesToEvent', regionOfInterestConfigDict.opticalFlowNumFramesToEvent);
  //  
  // checkType('int', 'regionOfInterestConfigDict.opticalFlowNumFramesToReset', regionOfInterestConfigDict.opticalFlowNumFramesToReset);
  //  
  // checkType('int', 'regionOfInterestConfigDict.opticalFlowAngleOffset', regionOfInterestConfigDict.opticalFlowAngleOffset);
  //  

  // Init parent class
  RegionOfInterestConfig.super_.call(this, regionOfInterestConfigDict)

  // Set object properties
  Object.defineProperties(this, {
    occupancyLevelMin: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyLevelMin
    },
    occupancyLevelMed: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyLevelMed
    },
    occupancyLevelMax: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyLevelMax
    },
    occupancyNumFramesToEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.occupancyNumFramesToEvent
    },
    fluidityLevelMin: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityLevelMin
    },
    fluidityLevelMed: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityLevelMed
    },
    fluidityLevelMax: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityLevelMax
    },
    fluidityNumFramesToEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.fluidityNumFramesToEvent
    },
    sendOpticalFlowEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.sendOpticalFlowEvent
    },
    opticalFlowNumFramesToEvent: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.opticalFlowNumFramesToEvent
    },
    opticalFlowNumFramesToReset: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.opticalFlowNumFramesToReset
    },
    opticalFlowAngleOffset: {
      writable: true,
      enumerable: true,
      value: regionOfInterestConfigDict.opticalFlowAngleOffset
    }
  })
}
function RegionOfInterestConfig ( regionOfInterestConfigDict ) { if ( ! ( this instanceof RegionOfInterestConfig ) ) return new RegionOfInterestConfig ( regionOfInterestConfigDict ) regionOfInterestConfigDict = regionOfInterestConfigDict || { } // Check regionOfInterestConfigDict has the required fields //  // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMin', regionOfInterestConfigDict.occupancyLevelMin); //   // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMed', regionOfInterestConfigDict.occupancyLevelMed); //   // checkType('int', 'regionOfInterestConfigDict.occupancyLevelMax', regionOfInterestConfigDict.occupancyLevelMax); //   // checkType('int', 'regionOfInterestConfigDict.occupancyNumFramesToEvent', regionOfInterestConfigDict.occupancyNumFramesToEvent); //   // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMin', regionOfInterestConfigDict.fluidityLevelMin); //   // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMed', regionOfInterestConfigDict.fluidityLevelMed); //   // checkType('int', 'regionOfInterestConfigDict.fluidityLevelMax', regionOfInterestConfigDict.fluidityLevelMax); //   // checkType('int', 'regionOfInterestConfigDict.fluidityNumFramesToEvent', regionOfInterestConfigDict.fluidityNumFramesToEvent); //   // checkType('boolean', 'regionOfInterestConfigDict.sendOpticalFlowEvent', regionOfInterestConfigDict.sendOpticalFlowEvent); //   // checkType('int', 'regionOfInterestConfigDict.opticalFlowNumFramesToEvent', regionOfInterestConfigDict.opticalFlowNumFramesToEvent); //   // checkType('int', 'regionOfInterestConfigDict.opticalFlowNumFramesToReset', regionOfInterestConfigDict.opticalFlowNumFramesToReset); //   // checkType('int', 'regionOfInterestConfigDict.opticalFlowAngleOffset', regionOfInterestConfigDict.opticalFlowAngleOffset); //   // Init parent class RegionOfInterestConfig . super_ . call ( this , regionOfInterestConfigDict ) // Set object properties Object . defineProperties ( this , { occupancyLevelMin : { writable : true , enumerable : true , value : regionOfInterestConfigDict . occupancyLevelMin } , occupancyLevelMed : { writable : true , enumerable : true , value : regionOfInterestConfigDict . occupancyLevelMed } , occupancyLevelMax : { writable : true , enumerable : true , value : regionOfInterestConfigDict . occupancyLevelMax } , occupancyNumFramesToEvent : { writable : true , enumerable : true , value : regionOfInterestConfigDict . occupancyNumFramesToEvent } , fluidityLevelMin : { writable : true , enumerable : true , value : regionOfInterestConfigDict . fluidityLevelMin } , fluidityLevelMed : { writable : true , enumerable : true , value : regionOfInterestConfigDict . fluidityLevelMed } , fluidityLevelMax : { writable : true , enumerable : true , value : regionOfInterestConfigDict . fluidityLevelMax } , fluidityNumFramesToEvent : { writable : true , enumerable : true , value : regionOfInterestConfigDict . fluidityNumFramesToEvent } , sendOpticalFlowEvent : { writable : true , enumerable : true , value : regionOfInterestConfigDict . sendOpticalFlowEvent } , opticalFlowNumFramesToEvent : { writable : true , enumerable : true , value : regionOfInterestConfigDict . opticalFlowNumFramesToEvent } , opticalFlowNumFramesToReset : { writable : true , enumerable : true , value : regionOfInterestConfigDict . opticalFlowNumFramesToReset } , opticalFlowAngleOffset : { writable : true , enumerable : true , value : regionOfInterestConfigDict . opticalFlowAngleOffset } } ) }
data structure for configuration of CrowdDetector regions of interest

@constructor module:crowddetector/complexTypes.RegionOfInterestConfig

@property {external:Integer} occupancyLevelMin
minimun occupancy percentage in the ROI to send occupancy events
@property {external:Integer} occupancyLevelMed
send occupancy level = 1 if the occupancy percentage is between
occupancy_level_min and this level
@property {external:Integer} occupancyLevelMax
send occupancy level = 2 if the occupancy percentage is between
occupancy_level_med and this level,
and send occupancy level = 3 if the occupancy percentage is between this
level and 100
@property {external:Integer} occupancyNumFramesToEvent
number of consecutive frames that a new occupancy level has to be detected
to recognize it as a occupancy level change.
A new occupancy event will be send
@property {external:Integer} fluidityLevelMin
minimun fluidity percentage in the ROI to send fluidity events
@property {external:Integer} fluidityLevelMed
send fluidity level = 1 if the fluidity percentage is between
fluidity_level_min and this level
@property {external:Integer} fluidityLevelMax
send fluidity level = 2 if the fluidity percentage is between
fluidity_level_med and this level,
and send fluidity level = 3 if the fluidity percentage is between this
level and 100
@property {external:Integer} fluidityNumFramesToEvent
number of consecutive frames that a new fluidity level has to be detected to
A new fluidity event will be send
@property {external:Boolean} sendOpticalFlowEvent
Enable/disable the movement direction detection into the ROI
@property {external:Integer} opticalFlowNumFramesToEvent
number of consecutive frames that a new direction of movement has to be
detected to recognize a new movement direction.
A new direction event will be send
@property {external:Integer} opticalFlowNumFramesToReset
number of consecutive frames in order to reset the counter of repeated
directions
@property {external:Integer} opticalFlowAngleOffset
Direction of the movement. The angle could have four different values:
left (0), up (90), right (180) and down (270). This cartesian axis could be
data structure for configuration of CrowdDetector regions of interest