micjahn / ZXing.Net

.Net port of the original java-based barcode reader and generator library zxing
Apache License 2.0
2.71k stars 666 forks source link

How to get barcode coordinates from ResultPoints #168

Closed vickyRathee closed 5 years ago

vickyRathee commented 5 years ago

The ResultPoints return the x,y array. Is there a way I can use those to calculate the width, height, left, top properties of barcode found or can create a border on image using those coordinates later.

image

Expected result :

"left": 195
"top": 327
"width": 182
"height": 95

Example Image

bc4

micjahn commented 5 years ago

Not for 1D barcodes. ZXing.Net doesn't try to find the complete area of the barcode. If it finds one single line which can be decoded it will stop and return the result. Only 2D codes like QR, DataMatrix or PDF417 will give you a rectangle of the barcode area.