# initcvkf

Create constant-velocity linear Kalman filter from detection report

## Description

creates and initializes a constant-velocity linear Kalman
`filter`

= initcvkf(`detection`

)`filter`

from information contained in a
`detection`

report. For more details, see Algorithms and `trackingKF`

.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

The

`detection`

input must contain a 1-D, 2-D, or 3-D position measurement in Cartesian coordinates.For a 1-D position measurement, the function initializes a

`trackingKF`

with a 1-D constant velocity model, in which the state is [*x*;*v*_{x}]. The function sets the`MotionModel`

property of the filter as`"1D Constant Velocity"`

.For a 2-D position measurement, the function initializes a

`trackingKF`

with a 2-D constant velocity model, in which the state is [*x*;*v*_{x};*y*;*v*_{y}]. The function sets the`MotionModel`

property of the filter as`"2D Constant Velocity"`

.For a 3-D position measurement, the function initializes a

`trackingKF`

with a 3-D constant velocity model, in which the state is [*x*;*v*_{x};*y*;*v*_{y};*z*;*v*_{z}]. The function sets the`MotionModel`

property of the filter as`"3D Constant Velocity"`

.

where

*x*,*y*,*z*are the position coordinates. The function sets these position sates same as those in the measurement of the`detection`

.*v*_{x},*v*_{y},*v*_{z}are the corresponding velocity states and the function sets these velocity states as 0.The position components of the state error covariance matrix in the initialized

`trackingKF`

object are the same as those in the measurement covariance matrix contained in the`detection`

. The velocity components of the state error covariance matrix are set to 100 m^{2}/s^{2}. The cross components of the state error covariance matrix are set to 0.The function computes the process noise matrix assuming a one-second time step and an acceleration standard deviation of 1 m/s

^{2}.The measurement noise matrix in the initialized filter is the same as that in the

`detection`

.You can use this function as the

`FilterInitializationFcn`

property of a`multiObjectTracker`

object.

## Extended Capabilities

## Version History

**Introduced in R2017a**