Matrix code detection mask🔗

A compound tool that splits an image to fixed-size blocks and produces a low-resolution detection mask image by classifying each sub-image. The brighter an output pixel corresponding to the sub-image will be, the more likely it is that a sub-image overlaps with a matrix code.


  • image: Input image

  • gridSpacing: The horizontal and vertical spacing between grid corner points in pixel coordinates. A 1-by-2 matrix.


  • mask: A low-resolution mask image whose pixel intensities are probabilities produced by the internal matrix code classifier, scaled to [0, 255].