
In one of the coding courses we had to do a project concerning image
manipulation. I had to develop a program which should be able to detect
a barcode in an image. This sounds trivial at first, but in reality it's
quite complicated.
A description of the used algorithms: At first the edges have to be found,
the image has to be converted into a binary image. Then the program applies
the Hough Transform to get information about the lines and their angle
in the picture. Using that information it searches the position where
the barcode is most likely located. During that process parallel lines
which don't belong to the barcode have to be filtered out. Once there,
the exact dimensions of the barcode have to be found by following the
individual barcode lines and calculating the biggest surrounding rectangle.
The program was coded in Java as a plugin for ImageJ and worked quite
well, it discovered the barcode in most of the pictures.
|