objectDetection class

Create object detection report

Description

The objectDetection class creates and reports detections of objects in a tracking scenario. Each report contains information obtained by a sensor for a single object. You can use the objectDetection output as the input to trackers such as trackerGNN or trackerTOMHT.

Construction

detection = objectDetection(time,measurement) creates an object detection at the specified time from the specified measurement.

detection = objectDetection(___,Name,Value) creates a detection object with properties specified as one or more Name,Value pair arguments. Any unspecified properties have default values. You cannot specify the Time or Measurement properties using Name,Value pairs.

Input Arguments

expand all

Detection time, specified as a nonnegative real scalar. This argument sets the Time property.

Object measurement, specified as a real-valued N-element vector. N is determined by the type of measurement. For example, a measurement of the Cartesian coordinates implies that N = 3. A measurement of spherical coordinates and range rate implies that N = 4. This argument sets the Measurement property.

Output Arguments

expand all

Detection report, returned as an objectDetection object. An objectDetection object contains these properties:

PropertyDefinition
TimeMeasurement time
MeasurementObject measurements
MeasurementNoiseMeasurement noise covariance matrix
SensorIndexUnique ID of the sensor
ObjectClassIDObject classification
MeasurementParametersParameters used by initialization functions of nonlinear Kalman tracking filters
ObjectAttributesAdditional information passed to tracker

Properties

expand all

Detection time, specified as a nonnegative real scalar. You cannot set this property as a name-value pair. Use the time input argument.

Example: 5.0

Data Types: double

Object measurement, specified as a real-valued N-element vector. You cannot set this property as a name-value pair. Use the measurement input argument.

Example: [1.0;-3.4]

Data Types: double | single

Measurement noise covariance, specified as a scalar or a real positive semi-definite symmetric N-by-N matrix. N is the number of elements in the measurement vector. For the scalar case, the matrix is a square diagonal N-by-N matrix having the same data interpretation as the measurement.

Example: [5.0,1.0;1.0,10.0]

Data Types: double | single

Sensor identifier, specified as a positive integer. The sensor identifier lets you distinguish between different sensors and must be unique to the sensor.

Example: 5

Data Types: double

Object class identifier, specified as a positive integer. Object class identifiers distinguish between different kinds of objects. The value 0 denotes an unknown object type. If the class identifier is nonzero, trackerGNN or trackerTOMHT immediately create a confirmed track from the detection.

Example: 1

Data Types: double

Measurement function parameters, specified as a cell array. The cell array contains all the arguments used by the measurement function specified by the MeasurementFcn property of a nonlinear tracking filter such as trackingEKF or trackingUKF. Each cell contains a single argument.

Example: {[1;0;0],'rectangular'}

Object attributes passed through the tracker, specified as a cell array. These attributes are added to the output of the trackerGNN and trackerTOMHT trackers but not used by the trackers.

Example: {[10,20,50,100],'radar1'}

Examples

collapse all

Create a detection from a position measurement. The detection is made at a timestamp of one second from a position measurement of [100;250;10] in Cartesian coordinates.

detection = objectDetection(1,[100;250;10])
detection = 
  objectDetection with properties:

                     Time: 1
              Measurement: [3x1 double]
         MeasurementNoise: [3x3 double]
              SensorIndex: 1
            ObjectClassID: 0
    MeasurementParameters: {}
         ObjectAttributes: {}

Create an objectDetection from a time and position measurement. The detection is made at a time of one second for an object position measurement of [100;250;10]. Add measurement noise and set other properties using Name-Value pairs.

detection = objectDetection(1,[100;250;10],'MeasurementNoise',10, ...
    'SensorIndex',1,'ObjectAttributes',{'Example object',5})
detection = 
  objectDetection with properties:

                     Time: 1
              Measurement: [3x1 double]
         MeasurementNoise: [3x3 double]
              SensorIndex: 1
            ObjectClassID: 0
    MeasurementParameters: {}
         ObjectAttributes: {'Example object'  [5]}

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2018b