Back to Adaptive Vision Library website
You are here: Start » Function Reference » Datacodes » ReadMultipleDataMatrixCodes_Deprecated
ReadMultipleDataMatrixCodes_Deprecated
Header: | AVL.h |
---|---|
Namespace: | avl |
Detects and recognizes several Data Matrix codes.
Syntax
C++
void avl::ReadMultipleDataMatrixCodes_Deprecated ( const avl::Image& inImage, atl::Optional<const avl::Rectangle2D&> inRoi, atl::Optional<const avl::CoordinateSystem2D&> inRoiAlignment, const avl::DataMatrixCodeParams& inCodeParams, int inMaxCodeCount, int inContrastThreshold, bool inAllowMultipleScales, int inFlags, atl::Array<avl::DataCode>& outDataMatrixCodes, atl::Array<avl::Path>& outCandidates, atl::Optional<avl::Rectangle2D&> outAlignedRoi = atl::NIL )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | const Image& | Input image | |||
inRoi | Optional<const Rectangle2D&> | NIL | Region of interest | ||
inRoiAlignment | Optional<const CoordinateSystem2D&> | NIL | Coordinate system for the region of interest | ||
inCodeParams | const DataMatrixCodeParams& | Specification of codes that can be found | |||
inMaxCodeCount | int | 0 - | 2 | Maximum number of codes to be found | |
inContrastThreshold | int | 1 - | 20 | Minimal difference between dark and bright modules | |
inAllowMultipleScales | bool | False | Specifies whether codes of different module sizes are expected | ||
inFlags | int | 0 - | Undocumented advanced tweaks for difficult cases | ||
outDataMatrixCodes | Array<DataCode>& | ||||
outCandidates | Array<Path>& | Diagnostic information about detection results | |||
outAlignedRoi | Optional<Rectangle2D&> | NIL | Input ROI after transformation (in the image coordinates) |
Optional Outputs
The computation of following outputs can be switched off by passing value atl::NIL
to these parameters: outAlignedRoi.
Read more about Optional Outputs.
Description
This filter detects and recognizes data matrix codes on an image.
Supported code types: ECC 200 and ECC 000-140.
Hints
- Specify the range of possible codes on an image by setting the inCodeParams input. The more narrow is the specification, the faster the filter works.
- Set inCodeParams.Polarity to specify whether dark-on-bright or bright-on-dark codes are to be read.
- Specify the range of possible code sizes with inCodeParams.MinRowCount, inCodeParams.MaxRowCount, inCodeParams.MinColumnCount, inCodeParams.MinColumnCount.
- Specify the range of possible module sizes (in pixels) with inCodeParams.MinModuleSize and inCodeParams.MaxModuleSize.
- Set inCodeParams.ExpectedGapSize according to the following rules:
- Zero – no gaps at all (modules are fully filled).
- Small – gaps up to 25% of the module size.
- Medium – gaps up to 50% of the module size; it may require a bigger Quiet Zone.
- Large – gaps up to 75%; comes with no guarantee.
- Modify inCodeParams.MaxRectangleRatio if you expect to work also with non-square codes. The value specifies maximal ratio between the length of the longer side to the length of the shorter side.
- Specify the maximal number of codes on a single image by setting inMaxCodeCount.
- If the codes may appear with different module sizes, also set inAllowMultipleScales to True.
- Set inContrastThreshold to a value, which is lower than minimal difference of pixel values between a dark and a bright module (contrast), but greater than maximal difference of pixel values within one module (noise level).
- If you are having problems with reading codes from low quality images, consider adding image morphology or smoothing.
Examples
Remarks
Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.
See Also
- ReadMultipleDataMatrixCodes – Detects and recognizes several Data Matrix codes.