Skip to content

Failed to recognize Barcode #508

@Korzer420

Description

@Korzer420

Hey,

I've encountered a problem where a clear barcode couldn't be recognized by the BarcodeReader.
I tried with all kinds of different options on the reader but without any success.

Below are the two versions of the image that I tried to use:
Test3_Identifier
Test3_Identifier2

In both images the code is in the middle (in case git formats the images a bit weird)

This is the code I'm using

BarcodeReader<Bitmap> barcodeReader = new BarcodeReader<Bitmap>(null,
            bitmap => new BitmapLuminanceSource(bitmap),
                        luminance => new GlobalHistogramBinarizer(luminance))
            {
                Options =
                {
                    CharacterSet = "ISO-8859-1",
                    TryHarder = true,
                    ReturnCodabarStartEnd = true
                }
            };
            Result[] result;
            using (Bitmap image = new Bitmap("C:\\Test\\Barcode\\Test3_Identifier2.png"))
                result = barcodeReader.DecodeMultiple(image);

Small note that the type of barcode is unknown by the time the image is provided, so I can't really pass any possible formats on the options, in case that would help.

Thank you^^

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