Skip to content

Can't detect DataMatrix unless UPC_E is enabled #615

Description

@xqrzd

Is there a dependency between UPC_E and DataMatrix? For example with this config ZXing.Net fails to find a DataMatrix barcode in an image that also has a Code128 barcode:

var reader = new BarcodeReader
{
    AutoRotate = true,
    Options = new DecodingOptions
    {
        TryHarder = true,
        PossibleFormats = [
            BarcodeFormat.DATA_MATRIX
        ]
    }
};

However if I use either of these configurations, it finds the DataMatrix:

var reader = new BarcodeReader
{
    AutoRotate = true,
    Options = new DecodingOptions
    {
        TryHarder = true,
        PossibleFormats = [
            BarcodeFormat.UPC_E,
            BarcodeFormat.DATA_MATRIX
        ]
    }
};
var reader = new BarcodeReader
{
    AutoRotate = true,
    Options = new DecodingOptions
    {
        TryHarder = true
    }
};

I'd prefer to only enable the barcodes I'm interested in for efficiency, but leaving everything enabled is a workaround. ZXing.Net does find a UPC_E barcode in the image, but it's a false positive.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions