trackerSensorSpec
Sensor specification for multi-target multi-sensor specification-based tracker
Since R2024b
Description
creates a sensor specification based on the input application. You can use tab completion at
each input argument to view the available applications. This hierarchy shows the list of
prebuilt sensor specifications available in the toolbox.spec
= trackerSensorSpec(domain
,category
,subcategory
)
Examples
Create a sensor specification for a camera mounted on an ego vehicle.
cameraSpec = trackerSensorSpec("automotive","camera","bounding-boxes")
cameraSpec = AutomotiveCameraBoxes with properties: ReferenceFrame: 'ego' MaxNumMeasurements: 64 MountingLocation: [0 0 0] m MountingAngles: [0 1 0] deg EgoOriginHeight: 0.3 m Intrinsics: [3⨯3 double] ImageSize: [480 640] pixels MaxRange: 100 m CenterAccuracy: 10 pixels HeightAccuracy: 10 pixels WidthAccuracy: 10 pixels DetectionProbability: 0.9 NumFalsePositivesPerImage: 0.01 NumNewTargetsPerImage: 0.01
Specify the mounting location and angles, resolution, intrinsic matrix, maximum range, and height of the ego vehicle.
cameraSpec.MountingLocation = [3.7920 0 1.1]; cameraSpec.MountingAngles = [0 1 0]; cameraSpec.ImageSize = [480 640]; cameraSpec.Intrinsics = [800 0 320 0 600 240 0 0 1]; cameraSpec.MaxRange = 80; cameraSpec.EgoOriginHeight = 0.4;
Create a target specification for a car. Then, use the sensor specification for the camera and the target specification for the car as inputs to the multiSensorTargetTracker function to create a JIPDA tracker.
carSpec = trackerTargetSpec("automotive","car","highway-driving"); tracker = multiSensorTargetTracker(carSpec,cameraSpec,"jipda")
tracker = fusion.tracker.JIPDATracker with properties: TargetSpecifications: {[1×1 HighwayCar]} SensorSpecifications: {[1×1 AutomotiveCameraBoxes]} MaxMahalanobisDistance: 5 ConfirmationExistenceProbability: 0.9000 DeletionExistenceProbability: 0.1000
Use the dataFormat
function to determine the data format for the inputs required by the tracker.
The camera requires bounding boxes in the image space.
cameraData = dataFormat(cameraSpec)
cameraData = struct with fields:
Time: 0
BoundingBox: [4×64 double]
Create a specification for a marine radar. The radar of interest is on top of a stationary tower.
radarPosition = [0;0;35]; % radar's relative position to the tower origin. towerPosition = [3800;15200;110]; % tower origin location in scenario coordinate. radarOrientation = [0 1 0;-1 0 0;0 0 1]; % radar's relative orientation to the tower origin. towerOrientation = [-0.2 0.6 0.7;0.9 0.3 0;-0.2 0.7 -0.6]; % tower orientation in scenario coordinate. marineRadarSpec = trackerSensorSpec("custom")
marineRadarSpec = CustomSensor with properties: MaxNumMeasurements: 32 MeasurementModel: [] DetectabilityModel: [] ClutterModel: [] BirthModel: [] UpdateModels: 0
Define the measurement, detectability, clutter, and birth model of the marine radar specification. For measurement, specify that the radar of interest reports the position in the scenario coordinates.
measurementModel = sensorMeasurementModel("position");
measurementModel.OriginPosition = zeros(3,1);
measurementModel.Orientation = eye(3);
For detectability, specify that the radar detects targets within its field of view around a center beam.
detectabilityModel = sensorDetectabilityModel("field-of-view");
detectabilityModel.AzimuthLimits = [-10 10];
detectabilityModel.ElevationLimits = [-15 15];
detectabilityModel.RangeLimits = [0 10000];
detectabilityModel.OriginPosition = cat(2,radarPosition,towerPosition);
detectabilityModel.Orientation = cat(3,radarOrientation,towerOrientation);
detectabilityModel.DetectionProbability = 0.95;
For clutter, specify that the radar assumes a uniform Poisson clutter model, which assumes false measurements or noise (referred to as "clutter") in radar data are uniformly distributed across the observation space.
clutterModel = sensorClutterModel("uniform-poisson");
clutterModel.ClutterDensity = 5e-9;
For birth, specify that the radar assumes a uniform Poisson birth model, which assumes new targets can appear uniformly across the entire observation space.
birthModel = sensorBirthModel("uniform-poisson");
birthModel.BirthDensity = 5e-9;
Configure the marine radar specification using these models.
marineRadarSpec.MeasurementModel = measurementModel; marineRadarSpec.DetectabilityModel = detectabilityModel; marineRadarSpec.ClutterModel = clutterModel; marineRadarSpec.BirthModel = birthModel;
To update the specification based on time or measurement, you can set the UpdateModels
property to true
and specify the ModelUpdateFcn
function handle of the specification. For example, the following model update function allows you to update the radar center beam orientation with time, and update the position variance with measurement.
marineRadarSpec.UpdateModels = true; marineRadarSpec.ModelUpdateFcn = @updateRadarSpec; function spec = updateRadarSpec(spec, data) if ~isempty(data.Time) spec.DetectabilityModel.Orientation(:,:,1) = data.TimeVaryingModelData.BeamOrientation; end if ~isempty(data.MeasurementTime) spec.MeasurementModel.PositionVariance = data.MeasurementVaryingModelData.PositionVariance; end end
Input Arguments
Sensor domain, specified as "aerospace"
,
"automotive"
, or "custom"
(since R2025a).
Note
When you specify the domain as "custom"
, do not specify the
category
and subcategory
input
arguments.
Sensor category, specified as one of these values:
"radar"
or"infrared"
if the domain is"aerospace"
"radar"
,"camera"
or"lidar"
if the domain is"automotive"
Sensor subcategory, specified as one of these values:
"monostatic"
,"bistatic"
(since R2025a) or"direction-finder"
if the domain is"aerospace"
and the category is"radar"
"angle-only"
if the domain is"aerospace"
and the category is"infrared"
"clustered-points"
if the domain is"automotive"
and the category is"radar"
"bounding-boxes"
if the domain is"automotive"
and the category is"camera"
or"lidar"
Output Arguments
Sensor specification, returned as one of the objects in this table based on the input arguments.
Input Arguments | Sensor Specification Object |
---|---|
"aerospace","radar","monostatic" | AerospaceMonostaticRadar |
"aerospace","radar","bistatic" | AerospaceBistaticRadar (since R2025a) |
"aerospace","radar","direction-finder" | AerospaceESMRadar |
"aerospace","infrared","angle-only" | AerospaceAngleOnlyIR |
"automotive","radar","clustered-points" | AutomotiveRadarClusteredPoints |
"automotive","camera","bounding-boxes" | AutomotiveCameraBoxes |
"automotive","lidar","bounding-boxes" | AutomotiveLidarBoxes |
"custom" | CustomSensor (since R2025a) |
You can use this sensor specification object to define a tracker using the multiSensorTargetTracker
function. You can use the dataFormat
function on the spec
object to determine the data format required
by the tracker.
Version History
Introduced in R2024bYou can create the AerospaceBistaticRadar
and CustomSensor
sensor
specification.
See Also
Functions
Objects
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)