/**
* This class manages the recognition of a barcode, using several scanlines.
* It runs the recognition along several scanlines and combines the results of
* the different runs.
* <p>
* Central to the combination of the results of the different scanlines is a three dim. array,
* referenced as "possible_numbers", containing information about the occurence of a certain
* digit at a specific position in the EAN13 code.
* <p>
* The first dimension has 13 entries and represents the position in the EAN13 code.
* The second dimension has 10 entries and works like a stack for the digits recognized
* at that position in the EAN13 code. <br>
* The third dimension has two elements: <br> 0 = specifies the digit itself (0..9),
* <br> 1 = the amount of this digit's occurence
* at that position in the EAN13 code (0..#scanlines)
* <p><p>
* Here is an example. Assume, we have 19 scanlines, and along these scanline the following
* information is recognized: (This has been a pretty blurry barcode image... :-)
* <p>
* Scanline 0 result: ????????????<br>
* Scanline 1 result: ????????????<br>
* Scanline 2 result: ????????????<br>
* Scanline 3 result: ????????????<br>
* Scanline 4 result: ????????????<br>
* Scanline 5 result: ????????????<br>
* Scanline 6 result: 3?6???3?????<br>
* Scanline 7 result: ????????????<br>
* Scanline 8 result: ?????4??????<br>
* Scanline 9 result: ????????????<br>
* Scanline 10 result: ????????????<br>
* Scanline 11 result: 612?97017840<br>
* Scanline 12 result: ???7????8???<br>
* Scanline 13 result: 6122970178?0<br>
* Scanline 14 result: ????????????<br>
* Scanline 15 result: ????????????<br>
* Scanline 16 result: ????????????<br>
* Scanline 17 result: ????????????<br>
* Scanline 18 result: ????????????<br>
* Scanline 19 result: ????????????<br>
* <p><p>
* The possible_numbers-array will contain the following information.
* (Index of third dim. = 0 => Here we see information about the recognized digits.)
* The array has already been sorted using the sortDigits() method. This means
* that the digits that have been detected most at a certain position are on top.
* <p>
* detected digits: possible_numbers[][][0]
* <p>
* 0 : 6 1 2 7 9 7 0 1 7 8 4 0 <br>
* 1 : 3 x 6 2 x 4 3 x 8 x x x <br>
* 2 : x x x x x x x x x x x x <br>
* 3 : x x x x x x x x x x x x <br>
* 4 : x x x x x x x x x x x x <br>
* 5 : x x x x x x x x x x x x <br>
* 6 : x x x x x x x x x x x x <br>
* 7 : x x x x x x x x x x x x <br>
* 8 : x x x x x x x x x x x x <br>
* 9 : x x x x x x x x x x x x <br>
* <p>
* Index of third dim. = 1 => Here we see information about the occurence of the
* digits.
* <p>
* # of their occurence: possible_numbers[][][1]
* <p>
* 0 : 2 2 2 1 2 2 2 2 2 2 1 2 <br>
* 1 : 1 0 1 1 0 1 1 0 1 0 0 0 <br>
* 2 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* 3 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* 4 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* 5 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* 6 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* 7 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* 8 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* 9 : 0 0 0 0 0 0 0 0 0 0 0 0 <br>
* <p>
* Below is a run of the detectValidBarcode() method that tries to detect a valid
* barcode. If no code can be recognized directly, we are trying all possible
* combinations of the recognized digits starting with the "most likely" combination.
* This is intended as a last try. The need to try different combinations of the recognized digits
* should occur very seldom, or at least with only very few alternatives for
* specific digits. As a prositive effect, we get the chance to recognize a barcode that
* couldn't be recognized before, as a negative consequence, we can get a EAN13 number
* that is correct, according to the checksum, but that doesn't match the
* barcode on the image.
* <p>
* Trying to find a valid code: (detectValidBarcode()-method)
* <p>
* CHECK: 6 1 2 7 9 7 0 1 7 8 4 0 ckecksum_digit:5 <br>
* CHECK: 6 1 2 7 9 7 0 1 8 8 4 0 ckecksum_digit:2 <br>
* CHECK: 6 1 2 7 9 7 3 1 7 8 4 0 ckecksum_digit:6 <br>
* CHECK: 6 1 2 7 9 7 3 1 8 8 4 0 ckecksum_digit:3 <br>
* CHECK: 6 1 2 7 9 4 0 1 7 8 4 0 ckecksum_digit:8 <br>
* CHECK: 6 1 2 7 9 4 0 1 8 8 4 0 ckecksum_digit:5 <br>
* CHECK: 6 1 2 7 9 4 3 1 7 8 4 0 ckecksum_digit:9 <br>
* CHECK: 6 1 2 7 9 4 3 1 8 8 4 0 ckecksum_digit:6 <br>
* CHECK: 6 1 2 2 9 7 0 1 7 8 4 0 ckecksum_digit:0 <br>
* <p>
* RESULT: 612297017840
* <p>
*
* @author Robert Adelmann
* @version 1.0
*/