Nino Müller
Automatic detection of barcode stickers in pictures
The Paul Scherrer Institute (PSI) is an advanced research facility in Switzerland, with a huge amount of hardware devices. The employees use an inventory software to manage and search the hardware parts. All those hardware parts are inscribed with a white label, which contains the Name of the device in ASCII (human-readable) and in a barcode. As the task of adding all those devices to the inventory system is quite cumbersome, the demand for an easier, semi-automatic solution was created. The main goal was to create an application that would identify the positions of the barcodes on a digital image, then extract those barcodes and read them. After that there should be a user interface where the employee just had to click on "Agree" or maybe make some minor changes to the device.Goal of this project
The goal for this project was only to create a proof-of-principle for the first two steps of the automation. Which means, identifying the location of the barcodes and extract them. In the end there should be an easy to use library written in C#. Of course I also had to write some sort of test-GUI for testing.Description
First of all I had to prepare the images so that I could use the algorithms on it. First I created a greyscale filter to transform the image. After that I implemented a sobel operator, which can be used for edge detection. The image is now black and white, where white areas are edges. As the quality of the barcode labels usually was pretty bad (mainly because they were white on a greyish - silver background) I had to use a coarsening filter which bloated the white areas a bit. The next step was to scan the whole image for white pixels. As soon as the algorithm found a pixel it started to follow the white shape to determine the rectangle of the form. As the labels used at the PSI were always the same size, I could calculate the aspect ratio of the rectangle to determine if I have found a label.
If you want some additional information to this project, please do not hesitate to contact me.