0

I am writing a c# program where I need to print a lot of small barcodes in a 100x100 grid on a piece of paper. I then scan/photograph the paper and read the barcodes again. Each barcode only need to contain a simple ID code so that I know which which code I am reading and hence where it is on the paper. So a barcode only need to have a value like "4508" which would mean that it is in column 45 and row 8.

My problem is resolution. These barcode will be small and thus I find them hard to print and scan faithfully. But most barcodes seem to be very information inefficient since they encode numbers and ascii characters. Easy to use and read by human - but that's not what I want. These two codes (I forget the format) contain the same information but are clearly not equally simple:

enter image description here

I would like to hear any thoughts about which barcode format would be good for maximum entropy density. I think pharmacode is single bit encoding, but I can't find a free reader for that. Any ideas?

EDIT (CLARIFY ISSUE): I am trying to do some automated calibration. For this I want to divide the paper into i grid whete each cell in the grid has a barcode as well as some calibration data. The bar code encodes the position of the cell. I can then photograph the cell (or maybe the entire grid) and process the image with the barcode yielding the position on the paper.

The problem is that the cells are small 20x20mm which makes the barcode about 15 x 2mm. So a barcode with many thin lines will be more dificult to print than one with few thick lines (like in the picture). So any idea which barcode format would be best suited?

Christophe
  • 74,672
  • 10
  • 115
  • 187
DrDress
  • 127
  • 4
  • 1
    It's not clear to me what specific issue you are having. If resolution is your issue, then I would think a better printer and scanner would solve the issue, right? – Dan Wilson Apr 12 '21 at 14:59
  • 1
    I may be wrong, but I doubt you will find many experts on barcodes in our Softwareengineering community. Asking this on Stackoverflow will IMHO have a higher chance to find someone for this topic (but don't crosspost - if you decide to ask there, please delete your question here *first*). – Doc Brown Apr 12 '21 at 15:20

1 Answers1

4

Since the size and information density seems to be your issue, why not switch from a traditional 1D bar code to a 2D data matrix ?

  • It may allow you to encode the data in less space, and to read it with higher error tolerance.
  • Moreover, the finder pattern and dashed border facilitates its identification and orientation detection in a picture
  • With a printing resolution of 300dpi, you could hope to encode a 6 digit number in a 3.4 x 3.4 mm.
Christophe
  • 74,672
  • 10
  • 115
  • 187