ReadMultipleDataCodes


Reads multiple data codes (1D and 2D).

Applications:The main tool for reading both linear and matrix codes (Data Matrix, QR Code), including DPM.

Syntax

C++
C#
Python
 
def ReadMultipleDataCodes(
	state: ReadDataCodes_State,
	inImage: Image,
	inDpmParams: DpmParams,
	/,
	*,
	inRoi: Rectangle2D | None = None,
	inRoiAlignment: CoordinateSystem2D | None = None,
	inMatrixSymbologies: MatrixSymbologies | None = None,
	inLinearSymbologies: LinearSymbologies | None = None,
	inDetectorParams: DataCodeDetectorParams = DataCodeDetectorParams(Polarity.Any, 10, DatacodeDetectionMethod.FinderEdges, DatacodePyramidStrategy.Precise, DatacodeDecodeStrategy.Precise, DatacodeFinderTradeoff.Balanced, True, DatacodePerspectiveLevel.Low, DatacodeDistortionLevel.Low, True, 30.0, None, False),
	inMatrixCodeParams: MatrixCodeParams = MatrixCodeParams(8, 72, 8, 72, 3.5, 24.0, True, True, False, True, 4.0),
	inLinearCodeParams: LinearCodeParams = LinearCodeParams(0.9, 6.0, 4, None, True, True, None, False, 0.25),
	inComputeScores: bool = False,
	inMaxCodeCount: int = 1000,
	inAllowMultipleScales: bool = False,
	outAlignedRoi: Rectangle2D | None = None
)
-> (
	outDataCodes: list[DataCode],
	outCandidates: list[Path],
	outNoReads: list[DataCode]
)

Parameters

Name Type Range Default Description
Input will be modified ioState ReadDataCodes_State
Input value inImage Image Input image
Input value inRoi Rectangle2D | None None Region of interest
Input value inRoiAlignment CoordinateSystem2D | None None Coordinate system for the region of interest
Input value inMatrixSymbologies MatrixSymbologies | None None Specifies which matrix symbologies the filter should try to read
Input value inLinearSymbologies LinearSymbologies | None None Specifies which linear symbologies the filter should try to read
Input value inDetectorParams DataCodeDetectorParams DataCodeDetectorParams(Polarity.Any, 10, DatacodeDetectionMethod.FinderEdges, DatacodePyramidStrategy.Precise, DatacodeDecodeStrategy.Precise, DatacodeFinderTradeoff.Balanced, True, DatacodePerspectiveLevel.Low, DatacodeDistortionLevel.Low, True, 30.0, None, False) Parameters of the code detection algorithm, common for linear and matrix codes
Input value inMatrixCodeParams MatrixCodeParams MatrixCodeParams(8, 72, 8, 72, 3.5, 24.0, True, True, False, True, 4.0) Parameters specific to matrix (2D) codes
Input value inDpmParams DpmParams Parameters specific to direct part marking codes
Input value inLinearCodeParams LinearCodeParams LinearCodeParams(0.9, 6.0, 4, None, True, True, None, False, 0.25) Parameters specific to linear (1D) codes
Input value inComputeScores bool False Enables computing of confidence scores (slower)
Input value inMaxCodeCount int 0 - 1000 Maximum number of codes in one image
Input value inAllowMultipleScales bool False Specifies whether to continue search for codes at a higher resolution even when some codes have already been found at a lower resolution
Output value outDataCodes list[DataCode] List of codes that have been correctly detected and decoded
Output value outCandidates list[Path] Diagnostic information about detection results
Output value outAlignedRoi Rectangle2D | None None Input ROI after transformation (in the image coordinates)
Output value outNoReads list[DataCode] List of codes that have been detected but not decoded