Inventive two-dimensional barcodes, each having encoded digital information in a bitmap representing preferably randomized encoded data bits, are printed onto a printed medium. The bitmap may further include a plurality of block identifiers, spaced a predetermined number of encoded data bits apart, which are used to make corrections for missing or added data bits when the barcode is decoded. Upon decoding a barcode printed on the printed media, the digital information is scanned and the number of horizontal and vertical edges in each respective column and row of the barcode are determined. An edge is determined by selecting a pixel and determining if the two pixels adjacent to the selected pixel are of different colors. After all of the edges are counted, selected groups of columns and rows are analyzed to determine local minimas in the number of counted horizontal and vertical edges in each selected group which provide the column and row center line for each selected group. Thereafter, the binary data located at the intersection of each column and row center line are read out to produce a signal representative of the encoded digital information in the printed barcode.