Find matrix code🔗
Finds location of a matrix code in the specified region-of-interest in the input image.
image: Input image.
codeType: Prefered type of the detected matrix code. The deployed detection algorithm is optimized for the given code type but it may detect also other types.
maxDetections: The maximum number of matrix codes to detect. Note: The current version of the tool can detect several QR codes but only one code of any other type. The tool may sometimes give some false positives so it is advisable to set maxDetections to a much larger value than the expected number of codes to ensure that all codes will be found.
size: The size of the rectangle in which matrix codes are searched. If size is undefined (either width or height is NAN), the code is searched in the whole image. Otherwise the region of interest is determined by size and frame.
frame: The location of the region-of-interest for the detector. A coordinate frame in world coordinates.
threshold: Threshold for separating the modules of matrix code from the background. QR codes can be detected reliably from an arbitrary image. The other code types are detected only if the entire background is brighter (when invert flag is
true) or darker (when invert flag is
false) than the given threshold. A possible method to set the threshold is to use the histogram tool to calculate a grayscale histogram and pass the histogram to the threshold finding tool.
hysteresis: Hysteresis for module thresholding. If hysteresis is set to a non-zero value, the modules of a matrix code are allowed to contain pixels whose gray level does not meet the rule set by threshold parameter.
invert: Invert flag. If the flag is set to
true, the tool assumes a black code on white background. This can be changed by setting the invert flag to
frame: A coordinate frame for each detected matrix code. Each frame is a 4-by-4 matrix totaling in a 4N-by-4 matrix.
size: The size (width, height) of each detected matrix code in the corresponding frame. An N-by-2 matrix.