What is the space gap between ISBN main and supplementary barcode? - barcode

Currently I'm learning ISBN barcode generation. In that I created a main and supplementary barcode. I'm not aware how much space we need to provide between main and supplementary barcode. Is there any spec and regulation for the gap between ISBN main and supplementary barcode?

Related

Accuracy of barcodes

In books (e.g. "Barcodes for Mobile Devices", ISBN 978-0-521-88839-4), Papers (e.g. "Bar Codes May Have Poorer Error Rates Than Commonly Believed", DOI: 10.1373/clinchem.2010.153288) or websites information about the accuracy or error rates of barcodes are given.
The given numbers vary for e.g. Code39 from 1 error in 1.7 million, over 1 error in 3 million to 1 error in 4.5 million.
Where do these numbers come from and how can one calculate it (e.g. for Code39)?
In the definition of Code39 in ISO/IEC 16388:2007 I also couldn't find usefull information.
The "error rate" these numbers describe is the read error rate, i.e. how often a barcode may be read incorrectly when scanned. In order for barcodes to be useful this needs to be a very low value and so barcode formats that have lower read error rates are potentially better (although there are other factors involved as well).
These numbers are presumably determined by scientific testing. In the website you linked to there is a further link to a study by Ohio University that describes the methodology they used, which is an example of how this can be done:
An automated test apparatus was constructed and used for the test. The apparatus included a robot which loaded carrier sheets onto oscillating stages that were moved under four fixed mounted, “hand held” moving beam, visible laser diode bar code scanners. Scanner output was a series of digital pulses. Decoding of all symbols was performed in a computer using software programs based on standard reference decode algorithms. Each symbol was scanned by
each scanner until 283 decodes were obtained. [...] An error occurred and was recorded whenever the decoded data did not match the encoded data for a given symbol.
Got to barcodefaq site you linked to and click on the Barcode type e.g. UPC and you will get a PDF that explains the methodology used. The article cited explains the error encountered as well as containing links to further informatiion.

What is the relationship between GS1 standard barcodes and generic barcode symbols?

We are implementing GS1 linear barcodes (Code 128, Code 39) and GS1 2D barcodes (Data Matrix, PDF41 [sic]) and also GS1 DataBar barcodes in our application. Since I am new to this, I have few questions regarding GS1-type barcodes.
What is the relation between GS1 standard barcodes and generic barcode symbols?
Can any text be made into GS1-type barcode (e.g. GS1 DataMatrix) or does the text have to follow a certain mandatory format?
Thanks in advance.
A quick nit: There is no such format as a GS1 Code 39 nor "PDF41" (I
presume that you meant PDF417 but as with Code 39 this is not a
GS1-adopted carrier symbol.)
With the exception of the purpose-designed GS1 DataBar family of barcodes the remaining GS1 barcode symbologies are "application standards" of various general-purpose ISO/IEC barcode standards adapted for dedicated use within the supply chain industry and are specified by the GS1 General Specifications. Each format was created as a specialisation of some pre-existing carrier symbology (Code 128, Data Matrix, QR Code), meaning that they work within the limits of the existing specification to produce a more-restricted, special-purpose variant that is optimised for use in their particular application – for example by reducing the range of available symbol sizes, applying constraints on the data capacity and specifying a particular structure for the encapsulated data.
With regard to having a mandatory data structure, where available in the carrier symbology the GS1 specialisations mandate the use the "FNC1 in first position" mechanism to indicate the presence of data that conforms to the GS1 Application Identifier standard format described by the GS1 specifications. The product data is thus represented within this standard format and encoded within the carrier symbol using a scheme that is broadly similar across the GS1 symbologies.
The "extraction" part of this answer gives details of formatting data according to the GS1 AI standard format structure.

How to add redundancy into an OCR-scanned code

This is more of an algorithmy question - I am not very mathematical so was looking for an engineery solution... If this is off topic for SO let me know and I will delete the question.
I created a mashup of open source goodness to do Optical Character Recognition on difficult backgrounds: https://github.com/metalaureate/tesseract-docker-ocr
I want to use it to scan labels with a pre-defined ID code, e.g., 2826672. The accuracy is about 70% for digits.
Question: how do I add redundancy programmatically to my code to increase accuracy to 99%, and how do I decode it? I can imagine some really kludgy ways, like doubling and inverting the digits, but I don't know how to do this in a way that honors information theory without my having to translate a lot of math.
How do I add and decode digits to correct for OCR errors?
If you have the freedom of actually printing the labels, then there's no real reason to stick with plain ol' numbers. Use QR codes instead. Both the size (information capacity) and information redundancy is configurable, so you can customize it to fit your specific scenario. Internally, Reed-Solomon error correction is used. They offer There are plenty of libraries for both QR code generation and recognition from a scan.
Further info is available in Wikipedia.

self-encoded QR barcode?

I was wondering if it's possible to create a QR in some file format, say png, then encode the png in QR, such that the resulting QR is the same one you started with?
I don't think so. Each QR code needs to encode the original data along with variable amounts of redundancy.
So to encode the original QR code, you need the encode the same amount of information and additional redundancies, which means the result can't be the same since it encodes more information.
There are different sizes of QR codes ranging from 21x21 to 177x177. They can hold anywhere from 152 to around 31,000 data bits. Unfortunately, even using 1 bit per "pixel", the amount of data a code can hold never reaches the number of bits required to store it.
There are sizes, though for which it is not far off. I imagine some simple compression algorithm, or maybe even ignoring common parts like the calibration areas could get to a point where you can store some representation of it in itself. It is feasible to me that you could find a way to store a qr code of some size as a qr code of the same size.
The problem then is constructing a code which creates itself. With different error correction options, there is room to fudge a few pixels around, which helps the probability that such a thing is possible, but it would still take a fair bit of magic. Perhaps some sort of genetic algorithm could do better than brute force, but you may need to read the full spec and build one cleverly by hand. The search space is pretty big.
As freespace mentioned, it's not possible to encode an image in that same image itself, for several reasons.
I have created a QR Code which contains an URL which contains (again) the original image:
http://qr.ai/qqq
I really think that's the closest you can get.
A QR code can contain max. 4296 characters. I assume this is unicode, and that two bytes are used to represent one character. This means that a QR code can contain a maximum of 7089 bytes, which is enough to store a small image (like a small qr code).
The only issue here, is that most QR readers expect qr-codes to contain text (not image data).

Accuracy of barcode vs qrcode?

I want to develop a supermarket application for checking and billing.
Should I use barcodes or qrcodes? Which will give better accuracy?
The biggest difference here is that a linear barcode (e.g. Code 3 of 9, UPC, EAN, etc.) and a 2-dimensional symbology (e.g. QRCode, DataMatrix, etc.) store data in very different ways. A linear barcode can be read with a simple laser scanner, while most 2-D symbologies require an imager in order to be read. In general, imagers can also read linear barcodes, but are also more expensive than laser scanners.
You will want to consider whether your customers may already have linear scanners only, or whether they would be willing to pay the premium for an imager in order to get the benefit of the extra data that can be encoded in the 2-D symbologies.
Both will be accurate, the question is how much data do you need to store. QR has much more capacity than something like 3of9 barcode.

Resources