Read Data Matrix ECC 200
Use this tool to detect and read one or more codes of the type data matrix ECC 200 in an image. If the tool is added, the current processing image is automatically scanned and by default the first data matrix code, that was found on it is read.
Training
This tool is used with a training mode. easyTouch and easyTouch+ can be used to estimate values in the current image in the processing mode. This may be useful to find out, whether the codes in the image can be read at all. The training mode should then be used to determine the best parameter settings with a series of images.
- Run the application step by step via the "Run Once" button or via the shortcut F6 until an image is shown that you want to use as training image.
- Add the current image to the set of training images by clicking on the
button or by using the shortcut F3. The tool automatically highlights the possible contours of the codes in the images.
- If necessary, draw an ROI over the code.
- To add further training images, repeat the previous steps again.
- Click on the "Apply training data" button to perform the training. The parameters for the set of training images are automatically determined. In addition, the tool automatically switches to the processing mode and shows the detected codes in the current image.
Check the training
- Click on the processing image to switch to the processing mode.
- Run MERLIC with a series of images to check whether the codes are detected and read.
- To check the decoded data of a specific code, move the mouse pointer over the code in the image. The decoded data will be instantly shown in a tooltip. Alternatively, you can also check the decoded data in the respective tool result.
You can restrict the area for the data code detection. Draw an ROI over the image part in which you want to read codes and add the image as training image. The codes are now only read in the defined image part.
Tool Structure
The Tool Board is split into the training area on the left of the and the graphics window with the Quick Info on the right.
Training area
Graphics window
The first image on the left side of the Tool Board shows the image that is currently loaded. At this stage MERLIC already provides a preview of all found codes and already provides results if the reading was successful with the default parameter settings.
You have to select the training image by clicking on the button to transfer the image shown in "Processing" to the "Training" area. You can also add an additional image. To do so, run the program in single steps until the image you want to use as training image is shown in "Processing" and press the
button. In any case, press the button "Apply training data" to adapt the parameters to the training image.
The parameters can then be tested with further images within the same tool. See the topic Working with the Training Mode to learn more about how to work with tools that require a training.
Parameters
Basic Parameters
Image:
This parameter represents the image in which the data code should be read.
If a color image is used as input image for this tool, only the first channel, i.e., the red channel, is used for the processing.
Expected Number of Codes:
This parameter defines the expected number of codes that are present in the image. As a default, this value is set to 1. If less codes are found than the expected number, the code reading fails.
Due to the image processing that is in use, it is possible that the tool will find more than the minimum expected number of codes. In this case use an ROI to restrict the area of the data code detection.
Additional Parameters
ROI:
The parameter "ROI" defines the region of interest (ROI) for the code detection. Image parts outside of the union of the "ROI" and the "Processed Region" are not processed.In addition, if either of them is empty, the image part inside of the other one is processed. In case both of them are empty, the whole image is processed. However, if easyTouch is used to determine the parameter values, the whole image is used for the processing.
By default the ROI is defined as an empty ROI. If you want to use a non-empty ROI for the processing, you either have to connect the parameter to an appropriate ROI result of a previous tool or you have to draw new ROIs into the image using the available ROI buttons.
If easyTouch is used to determine the parameters values, the whole image is used for the search.
Alignment Data:
This parameter represents the alignment data that are used to align the ROI. By default no alignment data are connected and thus no effect is visible. If you want to use specific alignment data, you have to connect the parameter to an appropriate result of a previous tool such as Determine Alignment with Matching, Determine Alignment with Straight Border, Align Image, or Rotate Image.
Timeout:
By using this parameter, it is possible to interrupt the execution of the tool after a defined period in milliseconds. This is especially useful in cases where a maximum cycle time has to be ensured. The temporal accuracy of this interrupt is about 10 ms. The accuracy depends on several factors including the speed of your computer. The timeout is ignored in training mode. The default timeout is 0 ms.
|
Value |
Description |
|---|---|
|
0 |
No timeout is set. |
|
1 - 1000 |
This is the available value range for setting the timeout in milliseconds. |
Contrast Tolerance:
The "Contrast Tolerance" describes the tolerance of the search with respect to local contrast variations (e.g., in the presence of glare or reflections). Depending on the value of the parameter, two different algorithms are applied. The default setting is "low".
|
Value |
Description |
|---|---|
|
low |
Fast algorithm: This setting is useful if few local contrast variations are present. It is less robust in case of strong local contrast variations. |
|
high |
Robust but slower algorithm: This setting is useful if strong local contrast variations are present. |
|
any |
Strong contrast variations may or may not be present. Both algorithms are applied. |
Finder Pattern Tolerance:
This parameter represents the tolerance of the search with respect to a defect or partially occluded finder pattern. The finder pattern includes the L-shaped side as well as the opposite alternating side. Dependent on this parameter, different algorithms are used during the symbol search. The default setting is "low".
Robustness of the detection differs depending on the defined value even if the finder pattern of the symbol is not disturbed. For example, if "high" is chosen, only symbols with an equidistant module grid can be found, and hence the robustness to perspective distortions is decreased.
|
Value |
Description |
|---|---|
|
low |
It is assumed that all elements of the finder pattern can be extracted. The finder pattern is not occluded and shows almost no disturbances. |
|
high |
It is assumed that at least parts of the finder pattern can be extracted . It is also assumed that the finder pattern is at least partially occluded. Note, however, that in this mode the parameters for the symbol search should be restricted as narrow as possible because otherwise the run time increases. If the Finder Pattern Tolerance is set to "high", the value of the parameter "Module Size Tolerance" is ignored and thus grayed out. In this case, an equidistant grid is assumed. |
|
any |
It is assumed that the finder pattern may or may not be occluded - therefore both algorithms are applied. |
Mirrored Code:
This parameter describes whether the symbol is or may be mirrored which is equivalent to swapping rows and columns of the symbol. The default setting is "no".
|
Value |
Description |
|---|---|
|
no |
The code does not appear mirrored. |
|
yes |
The code always appears mirrored. |
|
any |
The code may appear mirrored. |
Minimum Gap Width
This parameter defines the minimum gap width in direction of the symbol rows and columns. The default setting is "no".
|
Value |
Description |
|---|---|
|
no |
There is no minimum gap width. |
|
small |
The gap width is at least small. |
|
big |
The gap width is big. |
Maximum Gap Width
This parameter defines the maximum gap width in direction of the symbol rows and columns. The default setting is "small".
|
Value |
Description |
|---|---|
|
no |
There is no maximum gap width. |
|
small |
A small gap is allowed. |
|
big |
A big gap is allowed. |
Module Size Tolerance:
This parameter describes whether the size of the modules may vary (in a specific range) or not. Dependent on this parameter, different algorithms are used for calculating the module's center positions. The default setting is "fixed". The value of "Module Size Tolerance" is ignored if "Finder Pattern Tolerance" is set to "high". In this case an equidistant grid is assumed.
|
Value |
Description |
|---|---|
|
fixed |
An equidistant grid is used. |
|
variable |
The grid is aligned only to the alternating side of the finder pattern. |
|
any |
Both algorithms for 'fixed' and 'variable' are tested one after another. |
Minimum Module Size:
This parameter specifies the minimum size of the modules in the image. It is defined in pixels and set to 6 px by default.
|
Value |
Description |
|---|---|
|
6 |
Default minimum module size; all symbols with a module size higher than 6 can potentially be read. |
|
1 - 100 |
Available value range for setting the minimum module size. |
Maximum Module Size:
This parameter specifies the maximum size of the symbol modules. It is defined in pixels and set to 20 px by default.
|
Value |
Description |
|---|---|
|
20 |
This is the default maximum module size. All symbols of a module size up to 20 px can potentially be read. |
|
6 - 100 |
This is the available value range for setting the maximum module size. |
Code Property:
The parameter determines if the symbol appears dark on a light background or light on a dark background. The default setting is "dark".
|
Value |
Description |
|---|---|
|
dark |
This is the default setting. The symbol appears dark on a light background. |
|
light |
The symbol appears light on dark background. |
|
any |
The symbol may appear either dark on light background or light on dark background. |
Maximum Slant:
This parameter determines the maximum deviation of the angle of the L-shaped finder pattern from the (ideal) right angle. The angle is specified in radians and corresponds to the distortion that occurs when the symbol is printed or during the image acquisition. The default maximum slant is 0.17 rad.
|
Value |
Description |
|---|---|
|
0.17 |
This is the default maximum slant. All symbols with a slant of up to 0.17 can potentially be read. |
|
0 - 0.52 |
This is the available value range for setting the maximum slant. |
Robust Against Small Modules:
This parameter defines the robustness of the decoding of data codes with very small module sizes. Setting the parameter "Robust Against Small Modules" to 1, which is high, increases the likelihood of being able to decode data codes with very small module sizes. Additionally, in that case the minimum module size should also be adapted accordingly. Setting "Robust Against Small Modules" to 1 can significantly increase the internal memory usage of the tool. Therefore the default setting is 0, which means low.
|
Value |
Description |
|---|---|
|
0 |
This is the default setting. Use this setting if only a low robustness against small modules is required. |
|
1 |
Use this setting if a high robustness against small modules is required. This setting increases the memory usage. |
Conform to Standard:
This parameter controls the behavior of the tool while reading symbols that do not fit the model restrictions on the size defined in the parameters "Minimum Module Size" and "Maximum Module Size". The parameter is set to 0 by default.
|
Value |
Description |
|---|---|
|
0 |
The code is not conform to standard: All symbols are returned as a result, independent of their size and the size specified in the model. |
|
1 |
The code is conform to standard: All other symbols that are not conform to the standard's restrictions are rejected. |
Quiet Zone Available:
This parameter controls the behavior of the tool while detecting symbols that could be read but show defects in their quiet zone. The parameter is set to 0 by default.
|
Value |
Description |
|---|---|
|
0 |
All readable codes are returned as result, even if their quiet zone shows defects. |
|
1 |
Only codes with a validated quiet zone are read. Symbols with poor grades for their quiet zone are not returned as a result. |
Minimum Number of Columns:
This parameter defines the minimum number of module columns in the symbol. It is set to 10 by default.
|
Value |
Description |
|---|---|
|
10 |
This is the default minimum number of columns. All symbols with more than 10 columns can potentially be read. |
|
10 - 144 |
This is the available value range for setting the minimum number of columns. |
Maximum Number of Columns:
This parameter defines the maximum number of module columns in the symbol. It is set to 144 by default.
|
Value |
Description |
|---|---|
|
144 |
This is the default number of maximum columns. All symbols with up to 144 columns can potentially be read. |
|
10 - 144 |
This is the available value range for setting the maximum number of columns. |
Minimum Number of Rows:
This parameter defines the minimum number of module rows in the symbol. It is set to 8 by default.
|
Value |
Description |
|---|---|
|
10 |
This is the default minimum number of rows. All symbols with more than 10 rows can potentially be read. |
|
10 - 144 |
This is the available value range for setting the minimum number of rows. |
Maximum Number of Rows:
This parameter defines the maximum number of module rows in the symbol. It is set to 144 by default.
|
Value |
Description |
|---|---|
|
144 |
This is the default maximum number of rows. All symbols with up to 144 rows can potentially be read. |
|
10 - 144 |
This is the available value range for setting the maximum number of rows. |
Processing Region:
This parameter defines the region of interest (ROI) for processing. Image parts outside of the union of the ROI and "Processed Region" are not processed. In addition, if either of them is empty, the image part inside of the other one is processed. In case both of them are empty, the whole image is processed.
By default, "Processing Region" is defined as empty region. To specify a "Processing Region", you have to connect the parameter to an appropriate region result of a previous tool to make sure that a region is transmitted to this tool.
If easyTouch is used to determine the parameters values, the whole image is used for the search.
Results
Basic Results
Decoded Data:
The result is a string with the decoded data. If more than one code is read, the result is returned in a tuple. The tuple entries are sorted with respect to their "row" and "column" values in which they appear in the image. Thus, if several lines are read, the decoded data of the first line are returned at first, then the data of the second line, etc. In case there are several codes within a line, they are returned from left to right until the next line is processed such like a text.
The decoded data of a specific code is also shown if you move the mouse pointer over the code in the image. This way, you can quickly check the codes directly in the image.
Tool State:
"Tool State" returns information about the state of the tool and thus can be used for error handling. Please see the topic Tool State Result for more information about the different tool state results.
Additional Results
Extracted Contour:
This result is the contour of the detected data code(s).
Processing Time:
This result returns the duration of the most recent execution of the tool in milliseconds. The result is provided as additional result. Therefore, it is hidden by default but it can be displayed via the button beside the tool results. For more information see the section Processing Time in the tool reference overview.
Training Results
Basic Training Results
Expected Number of Codes Out:
This result returns the value used for the parameter "Expected Number of Codes". It defines the expected number of codes that are present in the image.
Additional Training Results
Contrast Tolerance Out:
This result returns the value used for the following parameter: "Contrast Tolerance". It describes the tolerance of the search with respect to local contrast variations.
Finder Pattern Tolerance Out:
This result returns the value used for the following parameter: "Finder Pattern Tolerance". It represents the tolerance of the search with respect to a defect or partially occluded finder pattern.
Mirrored Code Out:
This result returns the value used for the following parameter: "Mirrored Code". It describes whether the symbol is or may be mirrored which is equivalent to swapping rows and columns of the symbol.
Maximum Gap Width Out:
This result returns the value used for the following parameter: "Maximum Gap Width".
Minimum Gap Width Out:
This result returns the value used for the following parameter: "Minimum Gap Width".
Module Size Tolerance Out:
This result returns the value used for the following parameter: "Module Size Tolerance". It describes whether the size of the modules may vary (in a specific range) or not.
Maximum Module Size Out:
This result returns the value used for the following parameter: "Maximum Module Size". It represents the maximum size of the symbol modules.
Minimum Module Size Out:
This result returns the value used for the following parameter: "Minimum Module Size". It represents the minimum size of the modules in the image.
Code Property Out:
This result returns the value used for the following parameter: "Code Property". It determines if the symbol appears dark on a light background or light on a dark background.
Maximum Slant Out:
This result returns the value used for the following parameter: "Maximum Slant". It determines the maximum deviation of the angle of the L-shaped finder pattern from the (ideal) right angle.
Robust Against Small Modules Out:
This result returns the value used for the following parameter: "Robust Against Small Modules". It defines the robustness of the decoding of data codes with very small module sizes.
Conform to Standard Out:
This result returns the value used for the following parameter: "Conform to Standard". It controls the behavior of the tool while reading symbols that do not fit the model restrictions on their size.
Maximum Number of Columns Out:
This result returns the value used for the following parameter: "Maximum Number of Columns". It defines the maximum number of module columns in the symbol.
Minimum Number of Columns Out:
This result returns the value used for the following parameter: "Minimum Number of Columns". It defines the minimum number of module columns in the symbol.
Maximum Number of Rows Out:
This result returns the value used for the following parameter: "Maximum Number of Rows". It defines the maximum number of module rows in the symbol.
Minimum Number of Rows Out:
This result returns the value used for the following parameter: "Minimum Number of Rows". It defines the minimum number of module rows in the symbol.
Application Examples
This tool is used in the following MERLIC Vision App examples:
- read_lot_number_and_ECC200.mvapp