# Combine

Sometimes you may want to combine multiple CV Mats together and run computer vision algorithmy on the combined feed. This is usually the case if you have, for example, multiple overlapping cameras covering the same area.

In this case, you can use the **Combine** node.

<figure><img src="/files/PKI508wee8sw31tEjUVY" alt=""><figcaption></figcaption></figure>

## Input pins

<div align="left"><figure><img src="/files/ECqbh3HiDj83gTGbruYL" alt=""><figcaption></figcaption></figure></div>

* **Resolution**: number of width and height pixels for the CV Mat which will be outputted.
* **Inputs**: each pin represents a single incoming CV stream, which will be combined together with the other inputs to a single output.

## Output pins

* **Output:** CV stream which outputs all incoming streams together, through a single CV Mat.

## Node properties

In the properties of the *Combine* node, you can increase the number of inputs, by clicking on **Add input** button in the node properties. Similarly, you can remove the number of inputs by clicking on **Remove input** button.

<div align="left"><figure><img src="/files/WDVbxt6lQ3IwJrhnxDuM" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Good to know**: This node needs to have at least two inputs.
{% endhint %}

## Setup window

Once you choose the desired number of inputs, it is time to arrange them as pleased, so they look exactly as desired relative to each other on the Output texture. For this, the **Combine** node offers a *Setup* window in which each CV input acts like a polygon that can be easily repositioned, reshaped, or rescaled within the borders of the Combined texture.

You can open the *Setup* window by clicking on the **Setup** button of the node.

<div align="left"><figure><img src="/files/3WuxlKJqzJuGMvuEbRDR" alt=""><figcaption></figcaption></figure></div>

In this window, you will be able to see all inputs as polygons, listed under the *Setup* collapsible. Below this list, you can choose one of several combining modes for the overlapping polygon areas such as Max, Min, Sum, or simply None.

<figure><img src="/files/2wGkD1l0cyNf6sgHML6T" alt=""><figcaption></figcaption></figure>

To select a polygon, simply click on its name on the list. Once you do so, a new collapsible called *Edit* will appear, displaying properties unique to the selected polygon.

<figure><img src="/files/9wLrdECpw5APgC2P5wW0" alt=""><figcaption></figcaption></figure>

To move a polygon point around, you can select the specific point and drag it to the desired location. Another way to achieve this is by adjusting the X and Y values of that point under the *Polygon points position* section.

<figure><img src="/files/627Q6KXAUBsI6zH9eNEv" alt=""><figcaption></figcaption></figure>

Clicking on **Reset** button will restore the initial positions of all polygon points. You can also perform a horizontal or vertical flip on the polygon by enabling the **Flip X** and **Flip Y** checkboxes.

To scale or rotate the polygon, simply right-click on it and choose the desired entry from the menu.

<figure><img src="/files/is478PKzQ41UvB1chErC" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lightact.com/layers-and-layouts/layer-layouts/nodes/computer-vision/combine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
