Solving a Vision Problem
A typical vision-based application follows these steps:

External images must be stored in a host PC memory buffer with a known address. They must be linked to the Open eVision image object with parameters containing the address and pitch (32 bytes default) of the buffer, and the width and height of the image.
For details see Image Construction and Memory Allocation.
To optimize resolution and repeatability, the area of interest should occupy most of the field of view, and the targeted inspection equipment should be simulated as accurately as possible, with realistic lighting.
You should create two series of images:
- objects without defects (accepted by the inspection process) in all situations (such as unstable lighting conditions and movement freedom).
- objects with unacceptable defects (to be rejected by the inspection process).
Use Open eVision Libraries to process the images:

Reduce defects or enhance properties (such as contrast between the object of interest and background).

Locate the area of interest using techniques such as segmentation, edge detection or pattern matching.

EasyGauge returns accurate measurements of known objects
EasyImage provides statistical parameters
Measurements are performed locally so quantify the shape of objects geometrically, defects can be related to abnormal gray-level values.

Your solution must reliably separate good images from bad images by comparing ROI features to assess quality, detect defects, and recognize and sort objects.
If it can't, repeat steps 2 and 3 to improve your set of features.

Open eVision supports simultaneous execution by multiple (unlimited) threads on the same CPU, but data can only be accessed by one thread at a time
So independent tasks can execute simultaneously in your application, but each bit of shared data must be controlled by a separate task.
Rules for Thread-Safe Developments
The following rules avoid data corruption, crashes and misbehaving programs.

Basic types |
Recommendations |
Restrictions |
---|---|---|
Basic pixel structures EColor, EPeak, EISH, ELAB, ELCH, ELSH, ELUV, EBW1, EBW8, EBW8Path, EBW16, EBW16Path, EBW32, EC15, EC16, EC24, EC24A, EC24Path, EPath, ERGB, ERGBColor, EVSH, EXYZ, EYIQ, EYSH, EYUV, EDepth8, EDepth16 and EDepth32f |
|
No |
Pixel collection classes EColorLookup, EPseudoColorLookup, EPeakVector, EBW8Vector, EBWHistogramVector, EBW8PathVector, EBW16PathVector, EBW16Vector, EBW32Vector, EC24Vector, EPathVector, EColorVector, EColorLookup and EC24PathVector |
No restrictions on read-only access. |
A single instance may not be modified by several threads. If a thread is modifying an instance, no other thread can access it. |
Image classes EImageBW1, EImageBW8, EImageBW16, EImageBW32, EImageC15, EImageC16, EImageC24 and EImageC24A |
No restrictions on read-only access. |
A single instance may not be modified by several threads. If a thread is modifying an instance, no other thread can access it. |
Depth map classes |
No restrictions on read-only access. |
A single instance may not be modified by several threads. If a thread is modifying an instance, no other thread can access it. |
Point cloud classes |
No restrictions on read-only access. |
A single instance may not be modified by several threads. If a thread is modifying an instance, no other thread can access it. |
ROI classes EROIBW1, EROIBW8, EROIBW16, EROIBW32, EROIC15, EROIC16, EROIC24 and EROIC24A |
No restrictions on read-only access. |
A single instance may not be modified by several threads. If a thread is modifying an instance, no other thread can access it. Different ROI can be added or removed from an image or moved event if their parent image is the same. Consequently, different threads can work on different areas of an image possibly changing in position and size during the process. |

Library |
Recommendations |
Restrictions |
---|---|---|
Static methods from this class (provided threading rules applying to their arguments are not broken). |
No |
|
|
No |
|
EasyMatch, EasyFind, EasyQRCode Library and EasyOCR2 Library |
|
A single instance cannot be accessed from several threads. Search field (read-only) can be shared by different objects. |
EasyGauge and Shape subclasses Gauging classes (EPointGauge, ELineGauge, ERectangleGauge, ECircleGauge, EWedgeGauge), EWorldShape and EFrameShape) |
|
Can be attached, moved or removed from different threads, even in the same hierarchy. A single instance must not be used by different threads. |
Basic geometric classes (EFrame, EPoint, ECircle, ELine, ERectangle and EWedge) |
|
Can be accessed from different threads provided that an instance is not used by two different threads simultaneously. |
Gauging classes measuring and processing operations |
May be executed in different threads with no blocking even if these gauges perform their measuring operations in the same image. Multiple CPU usage will be optimal. |
A single instance cannot be read / modified by two threads . |
|
A single instance cannot be read / modified from different threads. |
|
EasyOCR, EasyOCV and EasyBarCode |
Different instances may be created and used from different threads. |
A single instance cannot be accessed from several threads. |
Different instances may be used from different threads. |
|
|
Multiple CPU usage will be optimal. |
A single instance cannot be used by several threads. A single MatrixCode cannot be used in multiple threads. |

When an Open eVision function fails, an exception is thrown which contains an error code and a description. To catch a potential exception, the function call is included in a try-catch block.

Timing a particular piece of code is achieved simply with start and stop operations:
- Start timing: Easy::.StartTiming
- Stop timing: Easy::.StopTiming
- Clock resolution: Easy::.TrueTimingResolution

-
Open eVision Studio
Speeds up and automates the creation of a solution. You can test the functions to find appropriate parameter values, and generate code of your operations to copy and paste into prototype applications.
-
Open eVision examples
Euresys download area contains:
- sample projects: how to use Open eVision libraries with a particular IDE.
- sample application programs: how to combine Open eVision functions and libraries in a variety of combinations and applications.