Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Failed to recognize Barcode

Aperta
#508 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
cli

Direzione di ricerca

The report concerns decoding failure in BarcodeReader<Bitmap> with GlobalHistogramBinarizer and TryHarder set, with the failing image attached as a link rather than in the repository. Start from the reader's decode path and the binarizer, then reproduce with the two sample images. Done would mean either a passing decode test for this image or a documented reason it cannot be decoded. The thread has been quiet for about three years, so confirm the maintainer's current stance first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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^^

Lingua principale
C#
Stelle
3.1k
Fork
704
Merge medio
13g 17h
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di micjahn/ZXing.Net

Tutte le issue di micjahn/ZXing.Net

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.