I have images (will attach examples) that either require auto size detection or require explicit size specification. That is for one kind of image, dmtxread image.tif will decode properly but dmtxread -s 12x12 image.tif will not (the barcodes are 12x12). For the other kind of image, it's the reverse: dmtxread image.tif will fail to find a barcode while dmtxread -s 12x12 image.tif will find the barcode.
The behavior of -s s follows that of -s 12x12. I think it has to do with the function MatrixRegionAlignCalibEdge. If I force symbolShape in this function to be either DmtxSymbolShapeAuto or DmtxSymbolSquareAuto, I can get rid of the above problem. I don't know how to fix the function so that it works in all cases automatically.
Fails to decode unless size (-s 12x12) is specified
Fails to decode if size (-s 12x12) is specified