How to detect barcodes when they are arranged horizontally and vertically at the same time?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- computer-vision
Research direction
Start with the BarcodeReader setup and DecodeMultiple call in the reporter's snippet, then reproduce with the three attached images to see which codes are missed. The issue asks two questions, so no change is specified yet. Done means either a documented option for orientation-independent and duplicate reads, or a maintainer-agreed change to DecodingOptions behaviour with a test covering the rotated and duplicated cases.
Written by the indexing model from the issue text.
Description
Hi,
Firstly, sorry to post this as an issue (I know this is not a bug), but I don't found a official community forum for ZXing integration.
I have this 3 situations:
BarCode1.jpg : 2 Barcodes code 128 and 2 Barcodes 39=>All codes are read correctly
CODE_39[39;210;327;210] : ABC-1234
CODE_128[33;105;319;105] : ABC-abc-1234
CODE_128[424;52;600;52] : 123456787
CODE_39[404;213;628;213] : 123456
BarCode2.jpg : 2 Barcodes code 128 (1 horizontal and 1 vertical) and 3 Barcodes 39(1 horizontal and 1 vertical)=>Only horizontal codes are read correctly
CODE_39[39;210;327;210] : ABC-1234
CODE_128[33;105;319;105] : ABC-abc-1234
BarCode3.jpg : 2 Barcodes code 128 (1 horizontal and 1 vertical) and 2 Barcodes 39(2 horizontal and 1 vertical)=>Only horizontal codes are read correctly and the duplicate code was ignored.
CODE_39[39;267;327;267] : ABC-1234
CODE_128[33;133;319;133] : ABC-abc-1234
My code is very simple
private string ScanBarcode(Bitmap bitmap)
{
Bitmap target;
var reader = new ZXing.Windows.Compatibility.BarcodeReader()
{
AutoRotate = true,
Options = new DecodingOptions
{
TryHarder = true,
PureBarcode = false,
ReturnCodabarStartEnd = true,
}
};
Result[] result = reader.DecodeMultiple(bitmap);
if (result==null) return "not found";
string barcodeResult = "";
foreach (var res in result)
{
barcodeResult += res.BarcodeFormat.ToString() +"[" +res.ResultPoints[0].X +";"+ res.ResultPoints[0].Y +";" +res.ResultPoints[1].X + ";" + res.ResultPoints[1].Y + "]" + " : " + res.Text + "\r\n";
}
return barcodeResult;
}
I'm using ZXing.Windows.Compatibility (0.16.13.0) and ZWing (0.16.10.0)
My questions are
1 - Exists an option to force read all barcodes regardless of orientation?
2 - Exists an option to force read all barcodes regardless of whether they are duplicated?
The case of duplication is weird but we have some forms where the same barcode is duplicated, I think, for redundancy reasons if the form is scratched out, but I would still like to get the position of both barcodes.
Thanks
- Dominant language
- C#
- Stars
- 3.1k
- Forks
- 704
- Avg merge
- 13d 17h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micjahn/ZXing.Net
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 Half a day Newbie friendliness 22/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 12/100
All issues in micjahn/ZXing.Net
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Street address filter matches across line breaks and reads "Dr." in a greeting as a street suffixOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
philterd/phileas-dotnet#185 ·
-
bug 優先: 低
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
.NET area: storage bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Larson-Logan/medal-sync#61 ·
Maintainers usually reply within 1 day