UPC scanning

Well, I’ve finished with the easy bit. I’ve written code to grab a frame from the webcam and do a bit of postprocessing. The postprocessing looks like a good step towards making barcode recognition easier. I’m only working on this at nights so far, so I figure coping with the poor lighting I have in my study bodes well for the future.

Here’s a webcam grab:
Here’s the same grab, converted to greyscale:
Here’s the same grab, with the output range normalized (and the colour histogram biased by about 20 to get rid of the low frequency colours at the extrema):
Note: these images are cropped from larger images, so if you look at the histogram you probably won’t see the same thing I’m seeing.

Now for the hard part: writing the code to recognise the barcode.

Leave a Reply