24.07.2013 Views

READING BARCODES USING DIGITAL CAMERAS ... - KULIS

READING BARCODES USING DIGITAL CAMERAS ... - KULIS

READING BARCODES USING DIGITAL CAMERAS ... - KULIS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 5: An image with white background color.<br />

Figure 6: An image with red background color.<br />

The obtained white lines on the resulted image after Canny edge detection and<br />

thresholding will then be separated into several parts. This partitioning is accomplished by<br />

finding neighbor pixels in the image. All neighbor white pixels must stay together, and all<br />

pixels that are not-neighbors must be separated. All of the resulted neighbor pixels will be<br />

stored in the form of neighbor tables as an array. This operation is summarized in algorithm 3<br />

given below.<br />

For all pixels:<br />

1. Select the pixel to be processed.<br />

2. If the pixel is black go to 1. Else go to the next step.<br />

3. If any neighbor table exists, go to step 4. Else construct a new neighbor table entry.<br />

4. For all neighbor tables<br />

a) Search all pixel coordinates in the table to detect any neighbor relationship with<br />

a selected pixel.<br />

b) If any relationship is found, put this pixel in this table and return to step 1.<br />

c) If any relationship is not found, construct a new table and put this pixel in it. Go<br />

to step 1.<br />

Algorithm 3: Constructing neighbor tables.<br />

These tables include all the barcode line places and unnecessary noise. For eliminating<br />

unnecessary noise from the barcode information we have to determine the differences<br />

between them. To do that, at first we must determine the table entries that only includes<br />

barcode line places. The size of tables which include barcode lines must be equal or very<br />

close to each other; because all barcode line heights are equal in an image.<br />

840

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!