# tracked_features

Python API: `depthai_nodes.message.creators.tracked_features`

## Functions

### create_feature_point

```python
def create_feature_point(x: float, y: float, id: int, age: int) -> dai.TrackedFeature:
```

Create a tracked feature point.

Parameters

 * `x` (`float`): X coordinate of the feature point.
 * `y` (`float`): Y coordinate of the feature point.
 * `id` (`int`): ID of the feature point.
 * `age` (`int`): Age of the feature point.

Returns

 * `dai.TrackedFeature`: Tracked feature point.

### create_tracked_features_message

```python
def create_tracked_features_message(reference_points: np.ndarray, target_points: np.ndarray) -> dai.TrackedFeatures:
```

Create paired tracked features from reference and target points.

Parameters

 * `reference_points` (`np.ndarray`): NumPy array of shape `(N, 2)` with reference `[x, y]` points.
 * `target_points` (`np.ndarray`): NumPy array of shape `(N, 2)` with matching target points.

Returns

 * `dai.TrackedFeatures`: Message containing alternating reference and target features. Each pair shares an ID; reference features
   have age 0 and target features have age 1.

Raises

 * `ValueError`: If either input is not a NumPy array of shape `(N, 2)`, or the arrays contain different numbers of points.
