READING BARCODES USING DIGITAL CAMERAS ... - KULIS
READING BARCODES USING DIGITAL CAMERAS ... - KULIS
READING BARCODES USING DIGITAL CAMERAS ... - KULIS
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Figure 8: The barcode field of the full image shown in Figure 5.<br />
Figure 9: The barcode field of the full image in Figure 6.<br />
After barcode fields are cut out from the image, a threshold is applied on these fields using<br />
the mean values of these fields. Then, the resulting image only contains the barcode lines<br />
which indicate the barcode codes. The barcode codes are obtained using these images using<br />
an algorithm that stores white and black lines together in arrays by determining positions of<br />
these lines described above. Then, every barcode code is obtained using these array sizes.<br />
Note that the reference sizes have to be considered to make codes meaningful. This<br />
operation is given in Algorithm 5 below.<br />
1. Construct a variable ‘refsize’ to indicate a reference size, and a variable ‘result’ for the result<br />
code.<br />
2. Select first array to be processed.<br />
3. This array should contain black pixels. The refsize variable is set to this array size.<br />
For all lines:<br />
4. Select next array if any unselected array exists else go to step 8.<br />
5. Divide this array size to refsize. The calculated floating value is stored as a variable<br />
‘codeValbyRef’. Round this value to the closest integer.<br />
6. If this array includes black pixels write logic ‘1’ for the corresponding amount of the<br />
codeValByRef value to the result value. Go to step 4.<br />
7. If this array includes white pixels write logic ‘0’ for the corresponding amount of the<br />
codeValByRef value to the result value. Go to step 4.<br />
8. The result value must be the 95 bits long barcode code.<br />
Algorithm 5: Determining the Barcode Code<br />
842