<a id="egrabberbridge"></a>

# EGrabberBridge - Using Images from eGrabber Sources

<a id="egrabberbridge-and-egrabber"></a>

## EGrabberBridge and EGrabber

**EGrabberBridge** is a user-friendly namespace of conversion classes. These classes perform the direct conversion from a buffer originating from **eGrabber**, the API of **eGrabber sources**, to an **eVision** data container.

See [EGrabber documentation](https://documentation.euresys.com/Products/eGrabber/eGrabber/en-us/Content/00_Home/home.htm) for more information about the **eGrabber** library.

<a id="egrabber-sources"></a>

## EGrabber Sources

The possible **eGrabber sources** are the following:

* **Euresys Coaxlink** frame grabbers
* **Gigelink** vision cameras

<a id="egrabberbridge-prerequisites"></a>

## Prerequisites

* **Open eVision** 2.9 (or newer)
* A **Coaxlink** frame grabber: **Coaxlink** 11.0.3 (or newer) or **eGrabber** 12.8 (or newer)
* A **Gigelink** vision camera: **eGrabber** 12.8 (or newer)

<a id="egrabberbridge-libraries"></a>

## Libraries

* To use **EGrabberBridge** in C++, include the main **EGrabber** headers before the **eVision** header.
  ```cpp
  #include "EGrabber.h"
  #include "FormatConverter.h"
  #include "eVision.h"
  ```
* To use **EGrabberBridge** in C#, reference the assembly in addition to the **eVision** .NET assembly.

<a id="egrabberbridge-data-containers"></a>

## Data Containers

* **EGrabberBridge** is part of the main **eVision** header.
* The `FormatConverter` header is required only if you need to perform pixel format conversion. See the [EGrabberBridge](../../resources/code_snippets/live_image_acquisition/egrabberbridge/index.html.md) code snippets.
* Each **EGrabberBridge** class derives from a specific data container.

  The following classes are implemented:

  | **Base class**                                                                                                                                                                                                                                    | **EGrabberBridge class**                                                                                                                                                                          | **Corresponding GenAPI pixel format**                |
  |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
  | [`EImageBW8`](../../doxygen_cpp/classeVision_1_1EImageBW8.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EImageBW8.html) [<sub>Python</sub>](../../doxygen_python/classeVision_1_1EImageBW8.html)                                       | [`EGrabberImageBW8`](../../doxygen_cpp/classeVision_1_1EGrabberBridge_1_1EGrabberImageBW8.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EGrabberBridge_1_1EGrabberImageBW8.html)       | `Mono8, BayerGR8, BayerRG8, BayerGB8, BayerBG8`      |
  | [`EDepthMap8`](../../doxygen_cpp/classeVision_1_1Easy3D_1_1EDepthMap8.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1Easy3D_1_1EDepthMap8.html) [<sub>Python</sub>](../../doxygen_python/classeVision_1_1Easy3D_1_1EDepthMap8.html)     | [`EGrabberDepthMap8`](../../doxygen_cpp/classeVision_1_1EGrabberBridge_1_1EGrabberDepthMap8.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EGrabberBridge_1_1EGrabberDepthMap8.html)    | `Coord3D_C8`                                         |
  | [`EImageBW16`](../../doxygen_cpp/classeVision_1_1EImageBW16.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EImageBW16.html) [<sub>Python</sub>](../../doxygen_python/classeVision_1_1EImageBW16.html)                                   | [`EGrabberImageBW16`](../../doxygen_cpp/classeVision_1_1EGrabberBridge_1_1EGrabberImageBW16.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EGrabberBridge_1_1EGrabberImageBW16.html)    | `Mono16, BayerGR16, BayerRG16, BayerGB16, BayerBG16` |
  | [`EDepthMap16`](../../doxygen_cpp/classeVision_1_1Easy3D_1_1EDepthMap16.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1Easy3D_1_1EDepthMap16.html) [<sub>Python</sub>](../../doxygen_python/classeVision_1_1Easy3D_1_1EDepthMap16.html) | [`EGrabberDepthMap16`](../../doxygen_cpp/classeVision_1_1EGrabberBridge_1_1EGrabberDepthMap16.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EGrabberBridge_1_1EGrabberDepthMap16.html) | `Coord3D_C16`                                        |
  | [`EImageC24`](../../doxygen_cpp/classeVision_1_1EImageC24.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EImageC24.html) [<sub>Python</sub>](../../doxygen_python/classeVision_1_1EImageC24.html)                                       | [`EGrabberImageC24`](../../doxygen_cpp/classeVision_1_1EGrabberBridge_1_1EGrabberImageC24.html) [<sub>.NET</sub>](../../doxygen_cs/classeVision_1_1EGrabberBridge_1_1EGrabberImageC24.html)       | `BGR8`                                               |
* These classes have 2 constructors:
  * 1 that requires only an **EGrabber** buffer descriptor (see [EGrabber reference](https://documentation.euresys.com/Products/COAXLINK/COAXLINK/en-us/Content/IOdoc/egrabber-reference/index.html)).
  * 1 that requires an **EGrabber** buffer descriptor and an additional `FormatConverter` parameter used to perform the conversion from the pixel format of the buffer to the pixel format of your **EGrabberBridge** class, if these are different (see [Using EGrabberBridge with Format Conversion](../../resources/code_snippets/live_image_acquisition/egrabberbridge/usingegrabberbridgewithformatconversion.html.md) code snippet).
* Scope and copy of the buffer:
  * **eVision** does not perform any copy of the buffer unless you require a pixel format conversion.
  * The availability of the **EGrabberBridge** data container buffer depends on the **EGrabber** buffer object or on the `FormatConverter` object if a copy is performed.

<a id="egrabberbridge-examples"></a>

## Examples and Code Snippets

* A sample ([UsingEGrabberBridge](../../resources/code_snippets/live_image_acquisition/egrabberbridge/usingegrabberbridge.html.md)) illustrates the use of the **EGrabberBridge** classes using callbacks. The sample is available in C++ and in C# and is present in its corresponding samples solution under the [EGrabberBridge](../../resources/code_snippets/live_image_acquisition/egrabberbridge/usingegrabberbridge.html.md) name.
* A code snippet ([Using EGrabberBridge with Format Conversion](../../resources/code_snippets/live_image_acquisition/egrabberbridge/usingegrabberbridgewithformatconversion.html.md)) is available to show how to use **EGrabberBridge** to perform the inversion of an image acquired using **EGrabber**.
* Camera and **GenTL** parameters can be handled through the **EGrabber** Object setters and getters (see [EGrabber documentation](https://documentation.euresys.com/Products/COAXLINK/COAXLINK/en-us/Content/04_eGrabber/programmers-guide/eGrabber/eGrabber.htm)).
* You can also test out parameters using the **GenTL** application (see [GenTL documentation](https://documentation.euresys.com/Products/COAXLINK/COAXLINK/en-us/Content/04_eGrabber/programmers-guide/GenTL.htm)).

<a id="egrabberbridge-see-alsos"></a>

## See Also

Easy to understand, ready to copy code snippets.

Sample acquiring image using **EGrabberBridge**.
