ReadIDMax
Finds and decodes 1D or 2D symbols (1D/Stacked, Data Matrix, QR Code and Postal) within a region of interest.The function can be configured for a variety of symbologies, a number of results, and can handle a high degree of rotation and perspective distortion.Optionally, can also be used to train Data Matrix and QR Code models, and verify quality metrics.The ReadIDMax function is used to locate and decode 1D or 2D symbols.
1D Symbologies
The ReadIDMax function supports decoding multiple 1D symbologies in the same image, including the following types of 1D symbologies:
- Code 128
- Code 39
- Interleaved 2 of 5
- Pharmacode
- UPC/EAN
- Code 93
- Codabar
- PDF417
- DataBar
- DataBar Limited
- DataBar Expanded
- EAN.UCC Composite
- POSTNET
- PLANET
- Japan Post
- Australian Post
- UPU
- Intelligent Mail Barcode
2D Symbologies
The ReadIDMax function can locate and decode 2D Data Matrix and QR Code symbols.The function can locate multiple 2D symbols, but unlike 1D symbols, all the symbols must be the same symbology type.For example, if the image contained a mixture of Data Matrix and QR Code symbols, and the function's Symbology Group parameter is set to Data Matrix, the function would ignore the QR Code symbols and only return the Data Matrix symbols.
The function can be trained to decode the same type of 2D symbol, by establishing the size of the symbol grid size, the 2D symbology type and the error checking and correction (ECC) method the symbol uses to verify the accuracy of the data it contains.
Training the ReadIDMax function can improve its performance, especially when all the symbols to be decoded share the same qualities, while not training the function allows it to decode a wider variety of symbols without needing to reconfigure it.
1D/2D Image Requirements
The ReadIDMax function requires minimal configuration before scanning 1D symbols, but the following guidelines should be used for input images:
-
All symbols must be greater than 50 pixels in length, while the maximum width of any module cannot exceed 10 pixels.
Note: A module is the narrowest element of the symbol (either a space or a bar). - For linear symbologies (where modules have different widths, but uniform heights), a module must be at least 1.6 pixels in width and 50 pixels high.For Postal Codes (where the modules are of uniform width, but varying height), a module must be at least 2.5 pixels in width.
- A quiet zone (an area on either end of a symbol that contains no marks) must be present that is at least the minimum size specified in the print specification for the symbology type.
- The contrast between modules and the background must be at least 32 grey levels.
- The pixel aspect ratio can be no greater than 1.35 to 1.
2D symbols have fewer image requirements.In general, there must be a quiet zone (or margin) surrounding the symbol on all four sides that is equal to the width of one module inside the symbol itself.
IDMax and IDQuick
The ReadIDMax function offers two processing modes for the decoding algorithm:
- Choose IDQuick for high-speed decoding of symbols that are well formed and appear in high contrast.
- Choose IDMax for advanced image processing and image-analysis techniques for challenging images.
By default, the function uses the IDMax mode, however, experiment with IDQuick to determine how it affects the performance of the function in the application.
Results
Only symbols that are found and decoded generate results.For each symbol in an image, the ReadIDMax function generates the following results through Vision Data Access functions:
- The decoded string.
- The angular orientation of the found symbol, in degrees.
- A location (Row/Column) for the center of the symbol.
- The particular symbology of the symbol.
- Codes and modifiers from the ISO/IEC to uniquely identify the symbology according to industry standards.
ReadIDMaxInputs
Syntax: ReadIDMax(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Symbology Group,Maximum Results,Advanced Decode Mode,Enable Training,1D Symbologies.Code 128,1D Symbologies.Code 39,1D Symbologies.I2of5,1D Symbologies.Pharmacode,1D Symbologies.UPC/EAN,1D Symbologies.Code 93,1D Symbologies.Codabar,Stacked Symbologies.PDF 417,Stacked Symbologies.DataBar,Stacked Symbologies.DataBar Limited,Stacked Symbologies.DataBar Expanded,Stacked Symbologies.EAN.UCC Composite,Postal Symbologies.POSTNET,Postal Symbologies.PLANET,Postal Symbologies.Japan Post,Postal Symbologies.Australia Post,Postal Symbologies.UPU,Postal Symbologies.Intelligent Mail Barcode,Decode Settings.Perspective,Decode Settings.QRMode,Decode Settings.Ignore Polarity,Decode Settings.Allow Flexible Grid Size,Decode Settings.Checksum,DecodeSettings.Polarity,Decode Settings.Omnidirectional,DecodeSettings.Sort Mode,Decode Settings.Allow Identical 1D Symbols,Decode Settings.Expand UPC-E,Verify,Timeout,Show)
Parameter | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image. Note: If using a colorIn-Sight vision system, the function must reference an Imagefunction (for example, ColorToGreyscaleFilter),which converts the color image to greyscale.
|
|||||||||||||||||||||
Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools. The default setting is (0,0,0), the top leftmost corner of the image.
|
|||||||||||||||||||||
Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode. Tip: With this parameter
selected, you can press the Maximize
Region button on the property sheet's toolbar to maximize the region and cover the entire image.
|
|||||||||||||||||||||
Specifies one of four symbology groups to read.
|
|||||||||||||||||||||
Specifies the maximum number of symbols to be located and decoded (1 to 128; default = 1). Note: If this parameter's specified value exceeds the number of symbols in the ROI , the function will still continue to search for the specified number of symbols.If the number of symbols in the ROI varies, the execution time of the function can be reduced by lowering the Timeout parameter setting.
|
|||||||||||||||||||||
Specifies the setting to be used to decode Data Matrix or 1D/Stacked symbology groups.
|
|||||||||||||||||||||
When enabled, trains a model of the first Data Matrix or QR Code symbol read.Training the function may improve performance, especially when all the symbols to be decoded share similar characteristics. Trained information is retained until this checkbox is disabled.To retrain a symbol, disable the checkbox, then enable the checkbox again. Tip: It is recommended to have only one symbol in the Region when training is enabled.
|
|||||||||||||||||||||
1D Symbologies |
Specifies which 1D Symbologies to read (multiple symbologies can be selected and read).
|
||||||||||||||||||||
Specifies which Stacked Symbologies to read (multiple symbologies can be selected and read).
|
|||||||||||||||||||||
Specifies which Stacked Symbologies to read (multiple symbologies can be selected and read).
|
|||||||||||||||||||||
|
|||||||||||||||||||||
Specifies whether the print quality tests (also known as quality verification metrics) will be performed. For more information, see ID.
Note:
|
|||||||||||||||||||||
Specifies the amount of time, in milliseconds(0 to 30000), that the functionwill search for a valid ID symbol before execution is halted and an #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied. Note: At times, the ReadIDMax function may exceed the specified Timeout parameter value by varying percentages.If this happens, adjust the Timeout parameter value lower to compensate for the overage.
|
|||||||||||||||||||||
Specifies the display mode for the ReadIDMaxgraphical overlay on the image. Note: The Showparameter is only implemented for Data Matrix and QR Code symbols.
|
ReadIDMax Outputs
Returns |
An IDMax data structure containingthe decoded alphanumeric string, or #ERR if any of the input parametersare invalid. |
Results |
When thefunction is initially inserted into a cell, a result table is inserted in the spreadsheet.The number of indexed strings returned in the result table is equal to the value entered in the Maximum Results parameter.If no symbol can be located and decoded,then #ERR is returned. Note: For Data Matrix symbols, the base 256 latch character (Decimal 231 Hex E7) will cause encoded data to be processed as bytes, per the Data MatrixISO/IEC 16022 specification.Use the GetStringIDMax function to return the encoded data.For more information, see IDMax.
|
ReadIDMaxVision Data Access Functions
If the Verify checkbox is disabled when the ReadIDMax function is initiallycreated, then a single Vision Data Accessfunction will be automatically inserted into the spreadsheet:
String |
GetString(IDMax, [Index]) |
Returns the alphanumeric string encoded in theindexed symbol. |
If the Verify checkbox is enabled (and the function performs additional quality verification metrics) when the ReadIDMax functionis initially created, the additional Vision Data Access functions thatare automatically inserted into the spreadsheet depend on the selected Symbology Group.Additional data elements can be accessed using the ReadIDMaxVision Data Access functions.For more information, see IDMax.
- If the Verifycheckbox is enabled after the ReadIDMax function is initially created,the additional Vision Data Access functions will not be automaticallyinserted into the spreadsheet.Also, the Verify checkbox must be enabledbefore the additional Vision Data Access functions will execute in thespreadsheet.
- If decoding Data Matrix symbols, use the GetStringIDMax function instead of GetString for more accurate and detailed information about the decoded symbol.