SmartCamBCR is a low cost barcode reader, which was developed by using a simple webcam as the input device. Barcodes are a class of the simplest printed patterns that can be reliably recognized by a computer. These codes consist of sequence of parallel, light and dark stripes printed on papers. Since 1952, various kinds of scanners were developed to read barcodes. Most of these barcode readers use a laser beam to scan the barcode and give the resulting value. There are some disadvantages in these kinds of barcode readers. These disadvantages includes that the barcode has to be manually oriented towards the laser beam to get the barcode value, high cost and the harmfulness for the user from the exposure to the laser beam.

SmartCamBCR has overcome these limitations in currently available barcode readers. Apart from orientation invariant reading and low cost, it can read damaged and deformed barcodes as well. SmartCamBCR has been developed by using image processing techniques, Artificial Intelligent techniques and some mathematical theories. This is a real time application and that requires good processing power. This is the main reason for using the language Visual C++ for the development of the SmartCamBCR.


The theory behind the SmartCamBCR is, it runs in three steps, which are called Localization, Transformation and decoding. Localization process is based on mathematical morphology. The two fundamental operators of mathematical morphology are erosion and dilation. Also this process uses Canny edge detection mechanism to get the edge image from the given original image. In Canny method it uses a filter which is narrow as possible to provide suppression of high frequency noise and to provide good localization of the edges.

Transformation process is based on Hough line detection method. In this method, the original image plane is transformed into the Hough plane. In the Hough plane, each point in the original plane is represented by a line. Since a barcode is a set of bars or lines parallel to each other, this method can be used to find the angle of the bars of the barcode.

The decoding method mainly consist of two parts; generation of the barcode waveform from the sequence and deciphering the barcode value from the waveform. For the first part, waveform generation, we have adopted the peak detection method to recognize the barcode. A novel method has been introduced for waveform decoding, considering the EAN13 barcode type as the sample barcode type. After locating the peaks and valleys, the minimum bar width can be determined from the distances between consecutive peaks and valleys. The normalized distances can be calculated by dividing the distances between consecutive peaks and valleys by the minimum bar width. Since there are only few combinations that can exist for the widths of the strips, a constraint network could be used in arriving at the bar widths. Arriving at the final barcode value is just “lookup” a table given the bar widths.

  1. Best Computer Science and Engineering Final Year Project – CINTEC, Sri Lanka – 2006.
  2. Merit Award – Asia Pacific ICT Awards (APICTA), December 6th – 8th, 2003, IMPACT Hall 9, Muangthong Thani, Thailand. SmartCamBCR won this award among participants from 12 countries, under tertiary institutes category.
  3. Gold Medal – National Best Quality Software Awards, Sri Lanka – 2003 – Project was nominated to represent Sri lanka and University of Moratuwa to participate in the APICTA competition held in Thailand.
  4. Recognition Award – ICT Agency, Sri Lanka – 2003.
  1. Ruwan Janapriya, Lasantha Kularatne, Kosala Pannipitiya, Anuruddha Gamakumara and Chathura de Silva.
    A Low Cost Barcode Reader using a Web-cam.
    Engineering Research Unit (ERU) Symposium, Sri Lanka, 2003
  2. Ruwan Janapriya, Lasantha Kularatne, Kosala Pannipitiya, Anuruddha Gamakumara, Chathura de Silva and Nalin Wickramarachchi
    An Intelligent Algorithm for Utilizing a Low Cost Camera as an Inexpensive Barcode Reader.
    Sri Lanka Association of Artificial Intelligence, Annual Sessions, 2003