<a id="running-tools-on-images"></a>

# Running Tools on Images

<a id="creating-a-graph"></a>

## Creating a Graph

When creating a project, the first step is to:

* Add your tools.
* Add links to connect your tools.
  * If necessary, select the link type.

<a id="add-an-image-tool"></a>

### Add an Image Tool

![image](assets/images/easy_studio2_common/create_graph_1.webp)
* The `Image file` tool is added to the graph.
* Double-click again if you need several `Image file` tools.

<a id="add-an-roi-tool"></a>

### Add an ROI Tool

![](assets/images/easy_studio2_common/create_graph_2.webp)
* The `ROI` tool is added to the graph.

<a id="add-a-processing-tool"></a>

### Add a Processing Tool

![image](assets/images/easyqrcode/studio2/read_create_reader_1.webp)
* The `QRCode Reader` tool is added to the graph.

<a id="connect1"></a>

### Connect `Image file` to `ROI`

![image](assets/images/easy_studio2_common/create_graph_4.webp)
* It is the format of the image that is transferred between both tools.

#### NOTE
* In most cases, you do not need to select a `Link type` as the `Link type` will be automatically set when you complete your graph.
* The tools are automatically and dynamically positioned on the graph.<br />
  \\\\
  As you start to create a graph by connecting tools, this graph is displayed on the first line while the other non-connected tools are left on the bottom line until you connect them.

<a id="connect2"></a>

### Connect `ROI` to `QRCode Reader`

![image](assets/images/easy_studio2_common/create_graph_5.webp)

<a id="configure"></a>

### Configure the Tool

You can now configure your tools according to your application and setup.

<a id="opening-images"></a>

## Opening Images

In **eVision Studio**, you can open and process a single image or select multiple images and process them one at a time manually or through on automatic loop at a configurable speed.

<a id="add-and-remove-images"></a>

### Add and Remove Images

In the `Setup View` of the `Image_file` tool:

![image](assets/images/easy_studio2_common/opening_images_add_remove_images.webp)
* Click on the folder button:
  * Select your image(s) in the `Open` dialog box.
  * Use the CTRL and SHIFT keys to select several images.
* You can also click on the same button directly in the `Image_file` tool.

* Click on the image in the list and press the X button or the DEL key.

<a id="select-and-process-an-image"></a>

### Select and Process an Image

In the `Setup View` of the `Image_file` tool:

![image](assets/images/easy_studio2_common/opening_images_select_image.webp)
* You can also click on the same buttons directly in the `Image_file` tool.

* The selected image is automatically processed if the graph is operational.

<a id="loop"></a>

### Automatically Loop Images

In the `Setup View` of the `Image_file` tool:

![image](assets/images/easy_studio2_common/opening_images_loop_images.webp)
* It is the number of images displayed per second in the field `Rate` (in Hz).

* It will start or stop the automatic looping of the images and their processing.

<a id="managing-an-roi"></a>

## Managing an ROI

In some cases, most often to decrease the processing time or to single-out the object you want to analyze, you do not want to process the whole image but only a part of it.

You can define and use regions of interest (ROI) to restrict the area processed with your vision tool.

* In **eVision**:
  * An **ROI** [`EBaseROI`](../../../doxygen_cpp/classeVision_1_1EBaseROI.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseROI.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseROI.html) class designates a rectangular region of interest.
  * A **region** [`ERegion`](../../../doxygen_cpp/classeVision_1_1ERegion.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1ERegion.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1ERegion.html) class designates an arbitrarily shaped ROI. With regions, you can determine precisely which part of the image, down to a single pixel, is used for your processing.

#### SEE ALSO
This topic explains how to use an ROI, that is a rectangular shape attached to an image. If you want to use another form, consider [**Working with a Region**](../working_with_a_region.html.md).

<a id="add-roi-to-image"></a>

### Using the ROI Tool

![](assets/images/easy_studio2_common/managing_an_roi.webp)
* Click in it and drag it to positions it.
* Click and drag the handles to adjust its size.

<a id="configuring-a-tool-and-viewing-the-results"></a>

## Tool Configuration and Results

Once your image(s), including the ROI if you created one, are ready, you need to configure your tool(s).

#### NOTE
When you add a new tool on your graph, all parameters are set to their default value.

<a id="open-setup-view"></a>

### Open the `Setup View`

![](assets/images/easy_studio2_common/configuring_tool_open_tool.webp)

<a id="display-setup-view"></a>

### Adjust Parameters

In the `Setup View` of the tool:

![](assets/images/easy_studio2_common/configuring_tool_display_setup.webp)
* It display the parameter pan.
* It may already be checked.

* Both the graph and the views are updated accordingly.

<a id="display-results"></a>

### Display Results

In the `Setup View` of the tool:

![](assets/images/easy_studio2_common/configuring_tool_display_results.webp)
* Click on a pane name to display only this pane content.
* It may already be checked.
* Check the box next to a name to add a pane to the displayed panes.

<a id="using-the-generated-codes"></a>

## Using the Generated Code

The **eVision Studio** can translate your graph into code that you can use in your application.

![image](assets/images/easy_studio2_common/using_code_display_code.webp)
* It opens the `Code Generation` pane.

* It is ready to be used in your application
* You can keep on changing the graph according to your needs.
