> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datamarkin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Crossings

> Draw multiple crossing lines with count annotations on an image.

## Overview

This convenience function iterates through all crossing lines managed by a Crossings object and draws each one with its individual styling and count information using the crossing() function.

## Function Signature

```python theme={null}
crossings(
    image: np.ndarray
) -> np.ndarray
```

## Parameters

**image** `np.ndarray` *required*

Input BGR image to annotate. Must be a 3-channel NumPy array with shape (height, width, 3). crossings\_manager: Crossings manager object containing multiple crossing lines. Must have a 'crossings' attribute that is iterable, containing Crossing objects.

## Returns

**result** `np.ndarray`

The input image with all crossing lines and count annotations drawn. Same shape and dtype as input image. Image is modified in-place.

## Examples

```python Example theme={null}
import cv2
import pixelflow as pf

# Load image and create crossing manager
image = cv2.imread("intersection.jpg")
crossings_manager = pf.Crossings()

# Add multiple crossing lines
crossings_manager.add_crossing(
```

```python Example theme={null}
crossings_manager.add_crossing(
```

```python Example theme={null}

# Draw all crossings at once
annotated = pf.annotate.crossings(image, crossings_manager)

# Alternative workflow with tracking integration
tracker = pf.tracker.ByteTracker()
for frame in frames:
```

## Error Handling

> [!WARNING]
>
> This function may raise the following exceptions:
>
> * **AttributeError**: If crossings\_manager lacks 'crossings' attribute or if individual crossing objects lack required attributes.
> * **AssertionError**: If image is not a NumPy array (raised by underlying crossing() calls).

## Notes

> [!NOTE]
>
> * Each crossing line is drawn with its individual color, name, and styling
> * The function processes crossings in the order they appear in the manager
> * All crossing lines share the same adaptive sizing parameters based on image resolution
> * The input image is modified in-place for efficiency
> * This is equivalent to calling crossing() individually for each line


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.