> For the complete documentation index, see [llms.txt](https://nx.docs.scailable.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nx.docs.scailable.net/ai-manager-v6.1.4/ai-manager-plugin/configure-the-plugin/postprocessors/line-crossing-detection.md).

# Line Crossing Detection

Detect or count objects that cross a defined line, and generate an event.

Line crossing detection can be used to detect or count objects which cross a defined line. The postprocessor works by tracking objects through the frames, and detect when this object crosses a line, and the direction.

<figure><img src="https://2982163321-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGfC0TFSmuMDjbpLErO3%2Fuploads%2Fgit-blob-e517e684b89b91e6cb4373d008b90f8d2749ca8b%2Fpostprocessor-line-crossing-params.png?alt=media" alt="Line Crossing Detection postprocessor settings panel"><figcaption><p>Line Crossing Detection settings</p></figcaption></figure>

Use the Nx Meta interface to draw a line on the video frame and click **Apply** for changes to take effect.

<figure><img src="https://2982163321-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGfC0TFSmuMDjbpLErO3%2Fuploads%2Fgit-blob-054c45d3f18d9305eb7e0f072b88213e22e74cc2%2Fpostprocessor-line-crossing-drawing.png?alt=media" alt="Drawing a crossing line on the video frame in the Nx Meta interface"><figcaption></figcaption></figure>

When a crossing is detected, an event is generated. This event can be configured to trigger any action, see [adding event rules](https://nx.docs.scailable.net/ai-manager-v6.1.4/ai-manager-plugin/configure-the-plugin.md).

<figure><img src="https://2982163321-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGfC0TFSmuMDjbpLErO3%2Fuploads%2Fgit-blob-d99f02f3b5ddc19e5349a1742bdc66fd37faaeef%2Fcrossing-event.png?alt=media" alt="Event Rules configuration for a Line Crossing Detection event"><figcaption><p>Line Crossing Detection event configuration</p></figcaption></figure>

Select the Line Crossing Detection postprocessor and click **Apply** before creating the event.

Line Crossing Detection is compatible with any model which generates bounding boxes.
