zxing.unity

Encapsulates an alignment pattern, which are the smaller square patterns found in all but the simplest QR Codes.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
Encapsulates a point of interest in an image containing a barcode. Typically, this would be the location of a finder pattern or the corner of the barcode, for example. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Initializes a new instance of the class. Initializes a new instance of the class. The x. The y. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Returns a that represents this instance. A that represents this instance. Orders an array of three ResultPoints in an order [A,B,C] such that AB < AC and BC < AC and the angle between BC and BA is less than 180 degrees. distance between two points Returns the z component of the cross product between vectors BC and BA. Gets the X. Gets the Y.

Determines if this alignment pattern "about equals" an alignment pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.

Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. The i. The j. New size of the module. PDF417 compaction mode Represents a Column in the Detection Result Guenther Grau The maximum distance to search in the codeword array in both the positive and negative directions Initializes a new instance of the class. The Bounding Box around the column (in the BitMatrix) Converts the Image's Row to the index in the Codewords array The Codeword Index. Image row. Converts the Codeword array index into a Row in the Image (BitMatrix) The Image Row. Codeword index. Gets the codeword for a given row The codeword. Image row. Gets the codeword closest to the specified row in the image Image row. Sets the codeword for an image row Image row. Codeword. Returns a that represents the current . A that represents the current . The Bounding Box around the column (in the BitMatrix) The box. The Codewords the Box encodes for, offset by the Box minY. Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. The codewords. Metadata about a PDF417 Barcode Guenther Grau

Implements decoding of the UPC-E format.

Thisis a great reference for UPC-E information.

Sean Owen

Encapsulates functionality and implementation that is common to UPC and EAN families of one-dimensional barcodes.

dswitkin@google.com (Daniel Switkin) Sean Owen alasdair@google.com (Alasdair Mackintosh)
Encapsulates functionality and implementation that is common to all families of one-dimensional barcodes. dswitkin@google.com (Daniel Switkin) Sean Owen Implementations of this interface can decode an image of a barcode in some format into the String it encodes. For example, can decode a QR code. The decoder may optionally receive hints from the caller which may help it decode more quickly or accurately. See , which attempts to determine what barcode format is present within the image as well, and then decodes it accordingly. Sean Owen dswitkin@google.com (Daniel Switkin) Locates and decodes a barcode in some format within an image. image of barcode to decode String which the barcode encodes Locates and decodes a barcode in some format within an image. This method also accepts hints, each possibly associated to some data, which may help the implementation decode. image of barcode to decode passed as a from to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcode encodes Resets any internal state the implementation has after a decode, to prepare it for reuse. Locates and decodes a barcode in some format within an image. image of barcode to decode String which the barcode encodes Locates and decodes a barcode in some format within an image. This method also accepts hints, each possibly associated to some data, which may help the implementation decode. Note that we don't try rotation without the try harder flag, even if rotation was supported. image of barcode to decode passed as a from to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcode encodes Resets any internal state the implementation has after a decode, to prepare it for reuse. We're going to examine rows from the middle outward, searching alternately above and below the middle, and farther out each time. rowStep is the number of rows between each successive attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then middle + rowStep, then middle - (2 * rowStep), etc. rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily decided that moving up and down by about 1/16 of the image is pretty good; we try more of the image if "trying harder". The image to decode Any hints that were requested The contents of the decoded barcode Records the size of successive runs of white and black pixels in a row, starting at a given point. The values are recorded in the given array, and the number of runs recorded is equal to the size of the array. If the row starts on a white pixel at the given start point, then the first count recorded is the run of white pixels starting from that point; likewise it is the count of a run of black pixels if the row begin on a black pixels at that point. row to count from offset into row to start at array into which to record counts Records the size of successive runs of white and black pixels in a row, starting at a given point. The values are recorded in the given array, and the number of runs recorded is equal to the size of the array. If the row starts on a white pixel at the given start point, then the first count recorded is the run of white pixels starting from that point; likewise it is the count of a run of black pixels if the row begin on a black pixels at that point. row to count from offset into row to start at array into which to record counts Records the pattern in reverse. The row. The start. The counters. Determines how closely a set of observed counts of runs of black/white values matches a given target pattern. This is reported as the ratio of the total variance from the expected pattern proportions across all pattern elements, to the length of the pattern. observed counters expected pattern The most any counter can differ before we give up ratio of total variance between counters and pattern compared to total pattern size, where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means the total variance between counters and patterns equals the pattern length, higher values mean even more variance Attempts to decode a one-dimensional barcode format given a single row of an image. row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode Start/end guard pattern. Pattern marking the middle of a UPC/EAN pattern, separating the two halves. "Odd", or "L" patterns used to encode UPC/EAN digits. As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. Initializes a new instance of the class.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found

Like decodeRow(int, BitArray, java.util.Map), but allows caller to inform method about where the UPC/EAN start pattern is found. This allows this to be computed once and reused across many implementations.

see checkStandardUPCEANChecksum(String) Computes the UPC/EAN checksum on a string of digits, and reports whether the checksum is correct or not. string of digits to check true iff string of digits passes the UPC/EAN checksum algorithm Decodes the end. The row. The end start. row of black/white values to search position to start search if true, indicates that the pattern specifies white/black/white/... pixel counts, otherwise, it is interpreted as black/white/black/... pattern of counts of number of black and white pixels that are being searched for as a pattern array of counters, as long as pattern, to re-use start/end horizontal offset of guard pattern, as an array of two ints Attempts to decode a single UPC/EAN-encoded digit. row of black/white values to decode the counts of runs of observed black/white/black/... values horizontal offset to start decoding from the set of patterns to use to decode -- sometimes different encodings for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should be used horizontal offset of first pixel beyond the decoded digit Subclasses override this to decode the portion of a barcode between the start and end guard patterns. row of black/white values to search start/end offset of start guard pattern to append decoded chars to horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully Get the format of this decoder. The 1D format. The pattern that marks the middle, and end, of a UPC-E pattern. There is no "second half" to a UPC-E barcode. See L_AND_G_PATTERNS these values similarly represent patterns of even-odd parity encodings of digits that imply both the number system (0 or 1) used, and the check digit. Initializes a new instance of the class. Decodes the middle. The row. The start range. The result. Decodes the end. The row. The end start. see checkStandardUPCEANChecksum(String) Determines the num sys and check digit. The result string. The lg pattern found. Expands a UPC-E value back into its full, equivalent UPC-A code value. UPC-E code as string of digits equivalent UPC-A code as string of digits Get the format of this decoder. The 1D format.

Encapsulates functionality and implementation that is common to UPC and EAN families of one-dimensional barcodes.

aripollak@gmail.com (Ari Pollak) dsbnatut@gmail.com (Kazuki Nishiura)

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

dsbnatut@gmail.com (Kazuki Nishiura)
The base class for all objects which encode/generate a barcode image. dswitkin@google.com (Daniel Switkin) www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Encode a barcode using the default settings. The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels Additional parameters to supply to the encoder The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) Encode a barcode using the default settings. The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) Encode the contents following specified format. {@code width} and {@code height} are required size. This method may return bigger size {@code BitMatrix} when specified size is too small. The user can set both {@code width} and {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} or {@code height}, {@code IllegalArgumentException} is thrown. a byte array of horizontal pixels (0 = white, 1 = black) Appends the given pattern to the target array starting at pos. starting color - false for white, true for black the number of elements added to target. Encode the contents to bool array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included. a {@code bool[]} of horizontal pixels (false = white, true = black) Calculates the checksum digit modulo10. The contents. Gets the default margin. Gets the default margin. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Gets the information. Parses the information. Creates the decoder. The information. Interface for a smart class to decode the barcode inside a bitmap object gives the type of the input data Decodes the specified barcode bitmap which is given by a generic byte array. The barcode bitmap. The width. The height. The format. the result data or null Tries to decode a barcode within an image which is given by a luminance source. That method gives a chance to prepare a luminance source completely before calling the time consuming decoding method. On the other hand there is a chance to create a luminance source which is independent from external resources (like Bitmap objects) and the decoding call can be made in a background thread. The luminance source. Decodes the specified barcode bitmap. The barcode bitmap. the result data or null event is executed when a result point was found event is executed when a result was found via decode Gets or sets a flag which cause a deeper look into the bitmap true if [try harder]; otherwise, false. Image is a pure monochrome image of a barcode. true if monochrome image of a barcode; otherwise, false. Specifies what character encoding to use when decoding, where applicable (type String) The character set. Image is known to be of one of a few possible formats. Maps to a {@link java.util.List} of {@link BarcodeFormat}s. The possible formats. Specifies some options which influence the decoding process Handle "end of data" situations the encoder context the buffer with the remaining encoded characters Enumeration for encodation types Parses a "geo:" URI result, which specifies a location on the surface of the Earth as well as an optional altitude above the surface. See http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source

Abstract class representing the result of decoding a barcode, as more than a String -- as some type of structured data. This might be a subclass which represents a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw decoded string into the most appropriate type of structured representation.

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less on exception-based mechanisms during parsing.

Sean Owen
Attempts to parse the raw {@link Result}'s contents as a particular type of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating the result of parsing. The result. Enumerates barcode formats known to this package. Sean Owen Aztec 2D barcode format. CODABAR 1D format. Code 39 1D format. Code 93 1D format. Code 128 1D format. Data Matrix 2D barcode format. EAN-8 1D format. EAN-13 1D format. ITF (Interleaved Two of Five) 1D format. MaxiCode 2D barcode format. PDF417 format. QR Code 2D barcode format. RSS 14 RSS EXPANDED UPC-A 1D format. UPC-E 1D format. UPC/EAN extension format. Not a stand-alone format. MSI Plessey UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED without MSI (to many false-positives) Calculates the luminance values based upon the Color32 structure The base class for luminance sources which supports cropping and rotating based upon the luminance values. The purpose of this class hierarchy is to abstract different bitmap implementations across platforms into a standard interface for requesting greyscale luminance values. The interface only provides immutable methods; therefore crop and rotation create copies. This is to ensure that one Reader does not modify the original luminance source and leave it in an unknown state for other Readers in the chain. dswitkin@google.com (Daniel Switkin) www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have to bitwise and with 0xff for each value. It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getMatrix() may never be called. The row to fetch, 0 <= y < Height. An optional preallocated array. If null or too small, it will be ignored. Always use the returned object, and ignore the .length of the array. An array containing the luminance data. Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if CropSupported is true. The left coordinate, 0 <= left < Width. The top coordinate, 0 <= top <= Height. The width of the rectangle to crop. The height of the rectangle to crop. A cropped version of this object. Returns a new object with rotated image data by 90 degrees counterclockwise. Only callable if {@link #isRotateSupported()} is true. A rotated version of this object. Returns a new object with rotated image data by 45 degrees counterclockwise. Only callable if {@link #isRotateSupported()} is true. A rotated version of this object. Fetches luminance data for the underlying bitmap. Values should be fetched using: int luminance = array[y * width + x] & 0xff; A row-major 2D array of luminance values. Do not use result.length as it may be larger than width * height bytes on some platforms. Do not modify the contents of the result. The width of the bitmap. The height of the bitmap. Whether this subclass supports cropping. Whether this subclass supports counter-clockwise rotation. Whether this subclass supports invertion. Initializes a new instance of the class. The width. The height. Initializes a new instance of the class. The luminance array. The width. The height. Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getMatrix() may never be called. The row to fetch, 0 <= y < Height. An optional preallocated array. If null or too small, it will be ignored. Always use the returned object, and ignore the .length of the array. An array containing the luminance data. Returns a new object with rotated image data by 90 degrees counterclockwise. Only callable if {@link #isRotateSupported()} is true. A rotated version of this object. TODO: not implemented yet A rotated version of this object. Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if CropSupported is true. The left coordinate, 0 <= left < Width. The top coordinate, 0 <= top <= Height. The width of the rectangle to crop. The height of the rectangle to crop. A cropped version of this object. Inverts the luminance values (newValue = 255 - oldValue) Should create a new luminance source with the right class type. The method is used in methods crop and rotate. The new luminances. The width. The height. Whether this subclass supports counter-clockwise rotation. Whether this subclass supports cropping. Whether this subclass supports invertion. Initializes a new instance of the class. The width. The height. Initializes a new instance of the class. The color32s. The width. The height. Sets the pixels. The color32s. Should create a new luminance source with the right class type. The method is used in methods crop and rotate. The new luminances. The width. The height.

Encapsulates logic that can detect a QR Code in an image, even if the QR Code is rotated or skewed, or partially obscured.

Sean Owen
Initializes a new instance of the class. The image.

Detects a QR Code in an image, simply.

encapsulating results of detecting a QR Code

Detects a QR Code in an image, simply.

optional hints to detector encapsulating results of detecting a QR Code
Processes the finder pattern info. The info.

Computes the dimension (number of modules on a size) of the QR Code based on the position of the finder patterns and estimated module size.

Computes an average estimated module size based on estimated derived from the positions of the three finder patterns.

Estimates module size based on two finder patterns -- it uses {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the width of each, measuring along the axis between their centers.

See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of a finder pattern by looking for a black-white-black run from the center in the direction of another point (another finder pattern center), and in the opposite direction too.

This method traces a line from a point in the image, in the direction towards another point. It begins in a black region, and keeps going until it finds white, then black, then white again. It reports the distance from the start to this point.

This is used when figuring out how wide a finder pattern is, when the finder pattern may be skewed or rotated.

Attempts to locate an alignment pattern in a limited region of the image, which is guessed to contain it. This method uses {@link AlignmentPattern}.

estimated module size so far x coordinate of center of area probably containing alignment pattern y coordinate of above number of pixels in all directions to search from the center if found, or null otherwise
Gets the image. Gets the result point callback. See ISO 18004:2006 Annex D Sean Owen See ISO 18004:2006 Annex D. Element i represents the raw version bits that specify version i + 7 Gets the EC blocks for level. The ec level.

Deduces version information purely from QR Code dimensions.

dimension in modules for a QR Code of that dimension or null
Gets the version for number. The version number. See ISO 18004:2006 Annex E Returns a that represents this instance. A that represents this instance. See ISO 18004:2006 6.5.1 Table 9 Gets the version number. Gets the alignment pattern centers. Gets the total codewords. Gets the dimension for version.

Encapsulates a set of error-correction blocks in one symbol version. Most versions will use blocks of differing sizes within one version, so, this encapsulates the parameters for each set of blocks. It also holds the number of error-correction codewords per block since it will be the same across all blocks within one version.

Gets the EC blocks. Gets the EC codewords per block. Gets the num blocks. Gets the total EC codewords.

Encapsualtes the parameters for one error-correction block in one symbol version. This includes the number of data codewords, and the number of times a block with these parameters is used consecutively in the QR code version's format.

Gets the count. Gets the data codewords. Top-level class for the logic part of the PDF417 implementation. The start pattern (17 bits) The stop pattern (18 bits) The codeword table from the Annex A of ISO/IEC 15438:2001(E). Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). the number of source codewords prior to the additional of the Symbol Length Descriptor and any pad codewords the number of error correction codewords the number of columns in the symbol in the data region (excluding start, stop and row indicator codewords) the number of rows in the symbol (r) Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). the number of source codewords prior to the additional of the Symbol Length Descriptor and any pad codewords the number of error correction codewords the number of columns in the symbol in the data region (excluding start, stop and row indicator codewords) the number of rows in the symbol the number of pad codewords Generates the barcode logic. the message to encode Determine optimal nr of columns and rows for the specified number of codewords. number of code words number of error correction code words dimension object containing cols as width and rows as height Sets max/min row/col values Sets compaction to values stored in enum Sets compact to be true or false Sets output encoding. Sets the disable eci. A Barcode Value for the PDF417 barcode. The scanner will iterate through the bitmatrix, and given the different methods or iterations will increment a given barcode value's confidence. When done, this will return the values of highest confidence. Guenther Grau Incremenets the Confidence for a given value. (Adds an occurance of a value) Value. Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. an array of int, containing the values with the highest occurrence, or null, if no value was set. Returns the confience value for a given barcode value Barcode value. @see UPCEANExtension5Support This object renders a ITF code as a . erik.barbara@gmail.com (Erik Barbara) Encode the contents following specified format. {@code width} and {@code height} are required size. This method may return bigger size {@code BitMatrix} when specified size is too small. The user can set both {@code width} and {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} or {@code height}, {@code IllegalArgumentException} is thrown. Encode the contents to bool array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included. a {@code bool[]} of horizontal pixels (false = white, true = black)

Implements decoding of the ITF format, or Interleaved Two of Five.

This Reader will scan ITF barcodes of certain lengths only. At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of required checksum function.

The checksum is optional and is not applied by this Reader. The consumer of the decoded value will have to apply a checksum if required.

http://en.wikipedia.org/wiki/Interleaved_2_of_5 is a great reference for Interleaved 2 of 5 information.

kevin.osullivan@sita.aero, SITA Lab.
Valid ITF lengths. Anything longer than the largest value is also allowed. Start/end guard pattern. Note: The end pattern is reversed because the row is reversed before searching for the END_PATTERN Patterns of Wide / Narrow lines to indicate each digit Attempts to decode a one-dimensional barcode format given a single row of an image. row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode row of black/white values to search offset of start pattern The payload end. to append decoded chars to false, if decoding could not complete successfully Identify where the start of the middle / payload section starts. row of black/white values to search Array, containing index of start of 'start block' and end of 'start block' The start & end patterns must be pre/post fixed by a quiet zone. This zone must be at least 10 times the width of a narrow line. Scan back until we either get to the start of the barcode or match the necessary number of quiet zone pixels. Note: Its assumed the row is reversed when using this method to find quiet zone after the end pattern. ref: http://www.barcode-1.net/i25code.html bit array representing the scanned barcode. index into row of the start or end pattern. false, if the quiet zone cannot be found Skip all whitespace until we get to the first black line. row of black/white values to search index of the first black line or -1 if no black lines are found in the row. Identify where the end of the middle / payload section ends. row of black/white values to search Array, containing index of start of 'end block' and end of 'end block' or null, if nothing found row of black/white values to search position to start search pattern of counts of number of black and white pixels that are being searched for as a pattern start/end horizontal offset of guard pattern, as an array of two ints Attempts to decode a sequence of ITF black/white lines into single digit. the counts of runs of observed black/white/black/... values The decoded digit false, if digit cannot be decoded This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat requested and encodes the barcode with the supplied contents. dswitkin@google.com (Daniel Switkin) www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Gets the collection of supported writers. MultiFormatReader is a convenience class and the main entry point into the library for most uses. By default it attempts to decode all barcode formats that the library supports. Optionally, you can provide a hints object to request different behavior, for example only decoding QR codes. Sean Owen dswitkin@google.com (Daniel Switkin) www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. Use setHints() followed by decodeWithState() for continuous scan applications. The pixel data to decode The contents of the image ReaderException Any errors which occurred Decode an image using the hints provided. Does not honor existing state. The pixel data to decode The hints to use, clearing the previous state. The contents of the image ReaderException Any errors which occurred Decode an image using the state set up by calling setHints() previously. Continuous scan clients will get a large speed increase by using this instead of decode(). The pixel data to decode The contents of the image ReaderException Any errors which occurred This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls to decodeWithState(image) can reuse the same set of readers without reallocating memory. This is important for performance in continuous scan clients. The set of hints to use for subsequent calls to decode(image) Symbol info table for DataMatrix. Overrides the symbol info set used by this class. Used for testing purposes. @param override the symbol info set to use

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes in one Data Matrix Code. This class decodes the bits back into text.

See ISO 16022:2006, 5.2.1 - 5.2.9.2

bbrown@google.com (Brian Brown) Sean Owen
See ISO 16022:2006, Annex C Table C.1 The C40 Basic Character Set (*'s used for placeholders for the shift values) See ISO 16022:2006, Annex C Table C.2 The Text Basic Character Set (*'s used for placeholders for the shift values) See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 See ISO 16022:2006, 5.2.7 See ISO 16022:2006, 5.2.8 and Annex C Table C.3 See ISO 16022:2006, 5.2.9 and Annex B, B.2 See ISO 16022:2006, Annex B, B.2

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into multiple blocks, each of which is a unit of data and error-correction codewords. Each is represented by an instance of this class.

bbrown@google.com (Brian Brown)

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This method will separate the data into original blocks.

bytes as read directly from the Data Matrix Code version of the Data Matrix Code DataBlocks containing original bytes, "de-interleaved" from representation in the Data Matrix Code
Defines an container for encoder options Initializes a new instance of the class. Gets the data container for all options Specifies the height of the barcode image Specifies the width of the barcode image Don't put the content string into the output image. Specifies margin, in pixels, to use when generating the barcode. The meaning can vary by format; for example it controls margin before and after the barcode horizontally for most 1D formats.

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the number of bits read is not often a multiple of 8.

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array it passed in, in which case all bets are off.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
bytes from which this will read bits. Bits will be read from the first byte first. Bits are read within a byte from most-significant to least-significant bit. number of bits to read int representing the bits read. The bits will appear as the least-significant bits of the int if numBits isn't in [1,32] or more than is available number of bits that can be read successfully index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. Sean Owen

Abstract class representing the result of decoding a barcode, as more than a String -- as some type of structured data. This might be a subclass which represents a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw decoded string into the most appropriate type of structured representation.

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less on exception-based mechanisms during parsing.

Sean Owen
Determines whether [is start all day]. if start time was specified as a whole day Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). The string to parse if not a date formatted string Gets the start. May return null if the event has no duration. Gets a value indicating whether this instance is end all day. true if end time was specified as a whole day satorux@google.com (Satoru Takabayashi) - creator dswitkin@google.com (Daniel Switkin) - ported from C++ Initializes a new instance of the class. Returns a that represents this instance. A that represents this instance. Check if "mask_pattern" is valid. The mask pattern. true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. Gets or sets the mode. The mode. Gets or sets the EC level. The EC level. Gets or sets the version. The version. Gets or sets the mask pattern. The mask pattern. Gets or sets the matrix. The matrix. JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned 0, 1 and 2 I'm going to use less memory and go with bytes. dswitkin@google.com (Daniel Switkin) Initializes a new instance of the class. The width. The height. Sets the specified x. The x. The y. The value. Sets the specified x. The x. The y. if set to true [value]. Clears the specified value. The value. Returns a that represents this instance. A that represents this instance. Gets the height. Gets the width. Gets or sets the with the specified x. an internal representation as bytes, in row-major order. array[y][x] represents point (x,y)

Encapsulates a block of data within a QR Code. QR Codes may split their data into multiple blocks, each of which is a unit of data and error-correction codewords. Each is represented by an instance of this class.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source

When QR Codes use multiple data blocks, they are actually interleaved. That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This method will separate the data into original blocks.

bytes as read directly from the QR Code version of the QR Code error-correction level of the QR Code {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the QR Code
Jacob Haynes Creates a Barcode row of the width The width. Sets a specific location in the bar The location in the bar Black if true, white if false; A boolean which is true if the bar black false if it is white How many spots wide the bar is. This function scales the row How much you want the image to be scaled, must be greater than or equal to 1. the scaled row Sets a specific location in the bar The location in the bar Black if true, white if false; Sean Owen coefficient of x^degree term in this polynomial The degree. coefficient of x^degree term in this polynomial evaluation of this polynomial at a given point A. evaluation of this polynomial at a given point Adds another Modulus Other. Subtract another Modulus Other. Multiply by another Modulus Other. Returns a Negative version of this instance Multiply by a Scalar. Scalar. Multiplies by a Monomial The by monomial. Degree. Coefficient. Divide by another modulus Other. Returns a that represents the current . A that represents the current . Gets the coefficients. The coefficients. degree of this polynomial Gets a value indicating whether this instance is zero. true if this polynomial is the monomial "0" Guenther Grau Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. The detection result columns. Adjusts the indicator column row numbers. Detection result column. return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers The row numbers. Adjusts the row numbers by row. The row numbers by row. Adjusts the row numbers from both Row Indicators zero Adjusts the row numbers from Right Row Indicator. The unadjusted row count. Adjusts the row numbers from Left Row Indicator. Unadjusted row Count. Adjusts the row number if valid. The invalid rows Row indicator row number. Invalid row counts. Codeword. Adjusts the row numbers. Barcode column. Codewords row. Codewords. Adjusts the row number. true, if row number was adjusted, false otherwise. Codeword. Other codeword. Returns a that represents the current . A that represents the current . @see UPCEANExtension2Support Parses the extension string. raw content of extension formatted interpretation of raw content as a {@link Map} mapping one {@link ResultMetadataType} to appropriate value, or {@code null} if not known Initializes a new instance of the class. The value. The start end. The start. The end. The row number. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Gets the value. Gets the start end. Gets the result points. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)

Decodes Code 93 barcodes.

Sean Owen
These represent the encodings of characters, as patterns of wide and narrow bars. The 9 least-significant bits of each int correspond to the pattern of wide and narrow. Initializes a new instance of the class.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode
This object renders a CODE128 code as a . erik.barbara@gmail.com (Erik Barbara)

Decodes Code 128 barcodes.

Sean Owen
The class holds the available options for the QrCodeWriter if true, don't switch to codeset C for numbers The Version object encapsulates attributes about a particular size Data Matrix Code. bbrown@google.com (Brian Brown)

Deduces version information from Data Matrix dimensions.

Number of rows in modules Number of columns in modules Version for a Data Matrix Code of those dimensions if dimensions do correspond to a valid Data Matrix size
See ISO 16022:2006 5.5.1 Table 7

Encapsulates a set of error-correction blocks in one symbol version. Most versions will use blocks of differing sizes within one version, so, this encapsulates the parameters for each set of blocks. It also holds the number of error-correction codewords per block since it will be the same across all blocks within one version.

Encapsualtes the parameters for one error-correction block in one symbol version. This includes the number of data codewords, and the number of times a block with these parameters is used consecutively in the Data Matrix code version's format.

Encapsulates the result of decoding a matrix of bits. This typically applies to 2D barcode formats. For now it contains the raw bytes obtained, as well as a String interpretation of those bytes, if applicable. Sean Owen Miscellanseous data value for the various decoders The other. Implements KDDI AU's address book format. See http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. (Thanks to Yuzo for translating!) Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Luminance source class which support different formats of images. Initializes a new instance of the class. The width. The height. Initializes a new instance of the class. It supports a byte array with 3 bytes per pixel (RGB24). The RGB raw bytes. The width. The height. Initializes a new instance of the class. It supports a byte array with 1 byte per pixel (Gray8). That means the whole array consists of the luminance values (grayscale). The luminance array. The width. The height. if set to true [is8 bit]. Initializes a new instance of the class. It supports a byte array with 3 bytes per pixel (RGB24). The RGB raw bytes. The width. The height. The bitmap format. Should create a new luminance source with the right class type. The method is used in methods crop and rotate. The new luminances. The width. The height. enumeration of supported bitmap format which the RGBLuminanceSource can process format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value grayscale array, the byte array is a luminance array with 1 byte per pixel 3 bytes per pixel with the channels red, green and blue 4 bytes per pixel with the channels red, green and blue 4 bytes per pixel with the channels alpha, red, green and blue 3 bytes per pixel with the channels blue, green and red 4 bytes per pixel with the channels blue, green and red 4 bytes per pixel with the channels blue, green, red and alpha 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue 4 bytes per pixel with the channels red, green, blue and alpha Represents some type of metadata about the result of the decoding that the decoder wishes to communicate back to the caller. Sean Owen Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. Denotes the likely approximate orientation of the barcode in the image. This value is given as degrees rotated clockwise from the normal, upright orientation. For example a 1D barcode which was found by reading top-to-bottom would be said to have orientation "90". This key maps to an {@link Integer} whose value is in the range [0,360).

2D barcode formats typically encode text, but allow for a sort of 'byte mode' which is sometimes used to encode binary data. While {@link Result} makes available the complete raw bytes in the barcode for these formats, it does not offer the bytes from the byte segments alone.

This maps to a {@link java.util.List} of byte arrays corresponding to the raw bytes in the byte segments in the barcode, in order.

Error correction level used, if applicable. The value type depends on the format, but is typically a String. For some periodicals, indicates the issue number as an {@link Integer}. For some products, indicates the suggested retail price in the barcode as a formatted {@link String}. For some products, the possible country of manufacture as a {@link String} denoting the ISO country code. Some map to multiple possible countries, like "US/CA". For some products, the extension text If the code format supports structured append and the current scanned code is part of one then the sequence number is given with it. If the code format supports structured append and the current scanned code is part of one then the parity is given with it. PDF417-specific metadata Aztec-specific metadata

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder patterns but are smaller and appear at regular intervals throughout the image.

At the moment this only looks for the bottom-right alignment pattern.

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, pasted and stripped down here for maximum performance but does unfortunately duplicate some code.

This class is thread-safe but not reentrant. Each thread must allocate its own object.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source

Creates a finder that will look in a portion of the whole image.

image to search left column from which to start searching top row from which to start searching width of region to search height of region to search estimated module size so far

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since it's pretty performance-critical and so is written to be fast foremost.

{@link AlignmentPattern} if found
Given a count of black/white/black pixels just seen and an end position, figures the location of the center of this black/white/black run. count of black/white/black pixels just read true iff the proportions of the counts is close enough to the 1/1/1 ratios used by alignment patterns to be considered a match

After a horizontal scan finds a potential alignment pattern, this method "cross-checks" by scanning down vertically through the center of the possible alignment pattern to see if the same proportion is detected.

row where an alignment pattern was detected center of the section that appears to cross an alignment pattern maximum reasonable number of modules that should be observed in any reading state, based on the results of the horizontal scan The original state count total. vertical center of alignment pattern, or null if not found

This is called when a horizontal scan finds a possible alignment pattern. It will cross check with a vertical scan, and if successful, will see if this pattern had been found on a previous horizontal scan. If so, we consider it confirmed and conclude we have found the alignment pattern.

reading state module counts from horizontal scan row where alignment pattern may be found end of possible alignment pattern in row {@link AlignmentPattern} if we have found the same pattern twice, or null if not

Encapsulates a QR Code's format information, including the data mask used and error correction level.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
See ISO 18004:2006, Annex C, Table C.1 Offset i holds the number of 1 bits in the binary representation of i Decodes the format information. format info indicator, with mask still applied The masked format info2. information about the format it specifies, or null if doesn't seem to match any known pattern Initializes a new instance of the class. The value. The checksum portion. Returns a that represents this instance. A that represents this instance. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Gets the value. Gets the checksum portion. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Thrown when a barcode was not found in the image. It might have been partially detected but could not be confirmed. Sean Owen The general exception class throw when something goes wrong during decoding of a barcode. This includes, but is not limited to, failing checksums / error correction algorithms, being unable to locate finder timing patterns, and so on. Sean Owen Initializes a new instance of the class. Gets the instance.

The main class which implements MaxiCode decoding -- as opposed to locating and extracting the MaxiCode from an image.

Manuel Kasten

Represents a polynomial whose coefficients are elements of a GF. Instances of this class are immutable.

Much credit is due to William Rucklidge since portions of this code are an indirect port of his C++ Reed-Solomon implementation.

Sean Owen
Initializes a new instance of the class. the {@link GenericGF} instance representing the field to use to perform computations coefficients as ints representing elements of GF(size), arranged from most significant (highest-power term) coefficient to least significant if argument is null or empty, or if leading coefficient is 0 and this is not a constant polynomial (that is, it is not the monomial "0") coefficient of x^degree term in this polynomial The degree. coefficient of x^degree term in this polynomial evaluation of this polynomial at a given point A. evaluation of this polynomial at a given point degree of this polynomial Gets a value indicating whether this is zero. true iff this polynomial is the monomial "0" Detects a result that is likely a vehicle identification number. @author Sean Owen A smart class to encode some content to a barcode image A base class for specific barcode writers with specific formats of barcode images. The type of the output. Interface for a smart class to encode some content into a barcode Encodes the specified contents. The contents. Creates a visual representation of the contents The contents. Returns a rendered instance of the barcode which is given by a BitMatrix. The matrix. Encodes the specified contents and returns a BitMatrix array. That array has to be rendered manually or with a IBarcodeRenderer. The contents. Encodes the specified contents and returns a rendered instance of the barcode. For rendering the instance of the property Renderer is used and has to be set before calling that method. The contents. Returns a rendered instance of the barcode which is given by a BitMatrix. For rendering the instance of the property Renderer is used and has to be set before calling that method. The matrix. Gets or sets the barcode format. The value is only suitable if the MultiFormatWriter is used. Gets or sets the options container for the encoding and renderer process. Gets or sets the writer which encodes the content to a BitMatrix. If no value is set the MultiFormatWriter is used. Gets or sets the renderer which should be used to render the encoded BitMatrix. Interface for a smart class to encode some content into a barcode Encodes the specified contents. The contents. Creates a visual representation of the contents Returns a rendered instance of the barcode which is given by a BitMatrix. Initializes a new instance of the class. A smart class to encode some content to a svg barcode image Initializes a new instance of the class. A smart class to decode the barcode inside a bitmap object A smart class to decode the barcode inside a bitmap object Interface for a smart class to decode multiple barcodes inside a bitmap object Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. The barcode bitmap. The width. The height. The format. the result data or null Tries to decode barcodes within an image which is given by a luminance source. That method gives a chance to prepare a luminance source completely before calling the time consuming decoding method. On the other hand there is a chance to create a luminance source which is independent from external resources (like Bitmap objects) and the decoding call can be made in a background thread. The luminance source. Decodes the specified barcode bitmap. The barcode bitmap. the result data or null event is executed when a result point was found event is executed when a result was found via decode Gets or sets a flag which cause a deeper look into the bitmap true if [try harder]; otherwise, false. Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; use {@link Boolean#TRUE}. true if monochrome image of a barcode; otherwise, false. Specifies what character encoding to use when decoding, where applicable (type String) The character set. Image is known to be of one of a few possible formats. Maps to a {@link java.util.List} of {@link BarcodeFormat}s. The possible formats. Specifies some options which influence the decoding process Initializes a new instance of the class. Initializes a new instance of the class. Sets the reader which should be used to find and decode the barcode. If null then MultiFormatReader is used Sets the function to create a luminance source object for a bitmap. If null, an exception is thrown when Decode is called Sets the function to create a binarizer object for a luminance source. If null then HybridBinarizer is used Initializes a new instance of the class. Sets the reader which should be used to find and decode the barcode. If null then MultiFormatReader is used Sets the function to create a luminance source object for a bitmap. If null, an exception is thrown when Decode is called Sets the function to create a binarizer object for a luminance source. If null then HybridBinarizer is used Sets the function to create a luminance source object for a rgb array. If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. Decodes the specified barcode bitmap. raw bytes of the image in RGB order the result data or null Tries to decode a barcode within an image which is given by a luminance source. That method gives a chance to prepare a luminance source completely before calling the time consuming decoding method. On the other hand there is a chance to create a luminance source which is independent from external resources (like Bitmap objects) and the decoding call can be made in a background thread. The luminance source. Decodes the specified barcode bitmap. raw bytes of the image in RGB order the result data or null Tries to decode barcodes within an image which is given by a luminance source. That method gives a chance to prepare a luminance source completely before calling the time consuming decoding method. On the other hand there is a chance to create a luminance source which is independent from external resources (like Bitmap objects) and the decoding call can be made in a background thread. The luminance source. Decodes the specified barcode bitmap. The image as byte[] array. The width. The height. The format. the result data or null Decodes the specified barcode bitmap. The image as byte[] array. The width. The height. The format. the result data or null Gets or sets the options. The options. Gets the reader which should be used to find and decode the barcode. The reader. Gets or sets a method which is called if an important point is found The result point callback. event is executed if a result was found via decode Gets or sets a flag which cause a deeper look into the bitmap true if [try harder]; otherwise, false. Image is a pure monochrome image of a barcode. true if monochrome image of a barcode; otherwise, false. Specifies what character encoding to use when decoding, where applicable (type String) The character set. Image is known to be of one of a few possible formats. Maps to a {@link java.util.List} of {@link BarcodeFormat}s. The possible formats. Gets or sets a value indicating whether the image should be automatically rotated. Rotation is supported for 90, 180 and 270 degrees true if image should be rotated; otherwise, false. Gets or sets a value indicating whether the image should be automatically inverted if no result is found in the original image. ATTENTION: Please be carefully because it slows down the decoding process if it is used true if image should be inverted; otherwise, false. Optional: Gets or sets the function to create a luminance source object for a bitmap. If null a platform specific default LuminanceSource is used The function to create a luminance source object. Optional: Gets or sets the function to create a binarizer object for a luminance source. If null then HybridBinarizer is used The function to create a binarizer object. Interface for a smart class to decode the barcode inside a bitmap object Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. The image as RGB24 array. The width. The height. The format. the result data or null Tries to decode a barcode within an image which is given by a luminance source. That method gives a chance to prepare a luminance source completely before calling the time consuming decoding method. On the other hand there is a chance to create a luminance source which is independent from external resources (like Bitmap objects) and the decoding call can be made in a background thread. The luminance source. Decodes the specified barcode bitmap. The image as Color32 array. the result data or null event is executed when a result point was found event is executed when a result was found via decode Gets or sets a flag which cause a deeper look into the bitmap true if [try harder]; otherwise, false. Image is a pure monochrome image of a barcode. true if monochrome image of a barcode; otherwise, false. Specifies what character encoding to use when decoding, where applicable (type String) The character set. Image is known to be of one of a few possible formats. Maps to a {@link java.util.List} of {@link BarcodeFormat}s. The possible formats. Specifies some options which influence the decoding process Interface for a smart class to decode multiple barcodes inside a bitmap object Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. The image as RGB24 array. The width. The height. The format. the result data or null Tries to decode barcodes within an image which is given by a luminance source. That method gives a chance to prepare a luminance source completely before calling the time consuming decoding method. On the other hand there is a chance to create a luminance source which is independent from external resources (like Bitmap objects) and the decoding call can be made in a background thread. The luminance source. Decodes the specified barcode bitmap. The image as Color32 array. the result data or null event is executed when a result point was found event is executed when a result was found via decode Gets or sets a flag which cause a deeper look into the bitmap true if [try harder]; otherwise, false. Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; use {@link Boolean#TRUE}. true if monochrome image of a barcode; otherwise, false. Specifies what character encoding to use when decoding, where applicable (type String) The character set. Image is known to be of one of a few possible formats. Maps to a {@link java.util.List} of {@link BarcodeFormat}s. The possible formats. Specifies some options which influence the decoding process Initializes a new instance of the class. Initializes a new instance of the class. Sets the reader which should be used to find and decode the barcode. If null then MultiFormatReader is used Sets the function to create a luminance source object for a bitmap. If null, an exception is thrown when Decode is called Sets the function to create a binarizer object for a luminance source. If null then HybridBinarizer is used Initializes a new instance of the class. Sets the reader which should be used to find and decode the barcode. If null then MultiFormatReader is used Sets the function to create a luminance source object for a bitmap. If null, an exception is thrown when Decode is called Sets the function to create a binarizer object for a luminance source. If null then HybridBinarizer is used State represents all information about a sequence necessary to generate the current output. Note that a state is immutable. Create a new state representing this state with a latch to a (not necessary different) mode, and then a code. Create a new state representing this state, with a temporary shift to a different mode to output a single value. Create a new state representing this state, but an additional character output in Binary Shift mode. Create the state identical to this one, but we are no longer in Binary Shift mode. Returns true if "this" state is better (or equal) to be in than "that" state under all possible circumstances. Aztec result meta data. Gets a value indicating whether this Aztec code is compact. true if compact; otherwise, false. Gets the nb datablocks. Gets the nb layers.

QR Codes can encode text as bits in one of several modes, and can use multiple modes in one QR Code. This class decodes the bits back into text.

See ISO 18004:2006, 6.4.3 - 6.4.7

Sean Owen
See ISO 18004:2006, 6.4.4 Table 5 See specification GBT 18284-2000 The bits. The result. The count. SITA Lab (kevin.osullivan@sita.aero) Guenther Grau Maximum Codewords (Data + Error). Gets the bit count sum. The bit count sum. Module bit count. Translate the symbol into a codeword the codeword corresponding to the symbol. the symbol from the barcode.. Use a binary search to find the index of the codeword corresponding to this symbol. the index into the codeword table. the symbol from the barcode. The sorted table of all possible symbols. Extracted from the PDF417 specification. The index of a symbol in this table corresponds to the index into the codeword table. This table contains to codewords for all symbols. The class holds the available options for the Specifies whether to use compact mode for PDF417 (type ). Specifies what compaction mode to use for PDF417 (type ). Specifies the minimum and maximum number of rows and columns for PDF417 (type ). Specifies what degree of error correction to use Specifies what character encoding to use where applicable (type {@link String}) Explicitly disables ECI segment when generating PDF417 Code That is against the specification but some readers have problems if the charset is switched from CP437 (default) to UTF-8 with the necessary ECI segment. If you set the property to true you can use different encodings and the ECI segment is omitted. DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in annex S. Padding character mode latch to C40 encodation mode mode latch to Base 256 encodation mode FNC1 Codeword Structured Append Codeword Reader Programming Upper Shift 05 Macro 06 Macro mode latch to ANSI X.12 encodation mode mode latch to Text encodation mode mode latch to EDIFACT encodation mode ECI character (Extended Channel Interpretation) Unlatch from C40 encodation Unlatch from X12 encodation 05 Macro header 06 Macro header Macro trailer Performs message encoding of a DataMatrix message using the algorithm described in annex P of ISO/IEC 16022:2000(E). the message the encoded message (the char values range from 0 to 255) Performs message encoding of a DataMatrix message using the algorithm described in annex P of ISO/IEC 16022:2000(E). the message requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. the minimum symbol size constraint or null for no constraint the maximum symbol size constraint or null for no constraint the encoded message (the char values range from 0 to 255) Determines the number of consecutive characters that are encodable using numeric compaction. the message the start position within the message the requested character count Sean Owen PDF 417 Detector Result class. Skipped private backing stores. Guenther Grau Initializes a new instance of the class. Bits. Points. Records EAN prefix to GS1 Member Organization, where the member organization correlates strongly with a country. This is an imperfect means of identifying a country of origin by EAN-13 barcode value. See http://en.wikipedia.org/wiki/List_of_GS1_country_codes. Sean Owen

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. After one barcode is found, the areas left, above, right and below the barcode's {@link com.google.zxing.ResultPoint}s are scanned, recursively.

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent detecting any one of them.

That is, instead of passing a {@link Reader} a caller might pass new ByQuadrantReader(reader).

Sean Owen
Implementation of this interface attempt to read several barcodes from one image. Sean Owen Decodes the multiple. The image. Decodes the multiple. The image. The hints. Initializes a new instance of the class. The @delegate. Decodes the multiple. The image. Decodes the multiple. The image. The hints. Locates and decodes a barcode in some format within an image. image of barcode to decode String which the barcode encodes Locates and decodes a barcode in some format within an image. This method also accepts hints, each possibly associated to some data, which may help the implementation decode. image of barcode to decode passed as a from to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcode encodes Resets any internal state the implementation has after a decode, to prepare it for reuse. These are a set of hints that you may pass to Writers to specify their behavior. dswitkin@google.com (Daniel Switkin) Specifies the width of the barcode image type: Specifies the height of the barcode image type: Don't put the content string into the output image. type: Specifies what degree of error correction to use, for example in QR Codes. Type depends on the encoder. For example for QR codes it's type For Aztec it is of type , representing the minimal percentage of error correction words. Note: an Aztec symbol should have a minimum of 25% EC words. For PDF417 it is of type or (between 0 and 8), Specifies what character encoding to use where applicable. type: Specifies margin, in pixels, to use when generating the barcode. The meaning can vary by format; for example it controls margin before and after the barcode horizontally for most 1D formats. type: Specifies whether to use compact mode for PDF417. type: Specifies what compaction mode to use for PDF417. type: Specifies the minimum and maximum number of rows and columns for PDF417. type: Don't append ECI segment. That is against the specification of QR Code but some readers have problems if the charset is switched from ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. If you set the property to true you can use UTF-8 encoding and the ECI segment is omitted. type: Specifies the matrix shape for Data Matrix (type ) Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. if true, don't switch to codeset C for numbers Specifies the default encodation for Data Matrix (type ) Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. standard value: Encodation.ASCII Specifies the required number of layers for an Aztec code: a negative number (-1, -2, -3, -4) specifies a compact Aztec code 0 indicates to use the minimum number of layers (the default) a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. dswitkin@google.com (Daniel Switkin) Guillaume Le Biller Added to zxing lib. Encode the given symbol info to a bit matrix. The DataMatrix placement. The symbol info to encode. The bit matrix generated. Convert the ByteMatrix to BitMatrix. The input matrix. The output matrix. This implementation can detect and decode Data Matrix codes in an image. bbrown@google.com (Brian Brown) Locates and decodes a Data Matrix code in an image. a String representing the content encoded by the Data Matrix code if a Data Matrix code cannot be decoded This method detects a code in a "pure" image -- that is, pure monochrome image which contains only an unrotated, unskewed, image of a code, with some white border around it. This is a specialized method that works exceptionally fast in this special case. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Implementations of this class can, given locations of finder patterns for a QR code in an image, sample the right points in the image to reconstruct the QR code, accounting for perspective distortion. It is abstracted since it is relatively expensive and should be allowed to take advantage of platform-specific optimized implementations, like Sun's Java Advanced Imaging library, but which may not be available in other environments such as J2ME, and vice versa. The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} with an instance of a class which implements this interface. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Sets the implementation of {@link GridSampler} used by the library. One global instance is stored, which may sound problematic. But, the implementation provided ought to be appropriate for the entire platform, and all uses of this library in the whole lifetime of the JVM. For instance, an Android activity can swap in an implementation that takes advantage of native platform libraries. The platform-specific object to install.

Samples an image for a square matrix of bits of the given dimension. This is used to extract the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode may be rotated or perspective-distorted, the caller supplies four points in the source image that define known points in the barcode, so that the image may be sampled appropriately.

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in the image that define some significant points in the image to be sample. For example, these may be the location of finder pattern in a QR Code.

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination {@link BitMatrix}, from the top left, where the known points in the image given by the "from" parameters map to.

These 16 parameters define the transformation needed to sample the image.

image to sample width/height of {@link BitMatrix} to sample from image {@link BitMatrix} representing a grid of points sampled from the image within a region defined by the "from" parameters ReaderException if image can't be sampled, for example, if the transformation defined by the given points is invalid or results in sampling outside the image boundaries

Checks a set of points that have been transformed to sample points on an image against the image's dimensions to see if the point are even within the image.

This method will actually "nudge" the endpoints back onto the image if they are found to be barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder patterns in an image where the QR Code runs all the way to the image border.

For efficiency, the method will check points from either end of the line until one is found to be within the image. Because the set of points are assumed to be linear, this is valid.

image into which the points should map actual points in x1,y1,...,xn,yn form
the current implementation of {@link GridSampler}

Parses an "sms:" URI result, which specifies a number to SMS and optional "via" number. See the IETF draft on this.

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI for purposes of forwarding to the platform.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
Antonio Manuel Benjumea Conde, Servinform, S.A. Agustín Delgado, Servinform, S.A. Implements the "MATMSG" email message entry format. Supported keys: TO, SUB, BODY Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source

See DoCoMo's documentation about the result types represented by subclasses of this class.

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less on exception-based mechanisms during parsing.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
This implements only the most basic checking for an email address's validity -- that it contains an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of validity. We want to generally be lenient here since this class is only intended to encapsulate what's in a barcode, not "judge" it. The class holds the available options for the Representing the minimal percentage of error correction words. Note: an Aztec symbol should have a minimum of 25% EC words. Specifies the required number of layers for an Aztec code: a negative number (-1, -2, -3, -4) specifies a compact Aztec code 0 indicates to use the minimum number of layers (the default) a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code This object renders a QR Code as a BitMatrix 2D array of greyscale values. dswitkin@google.com (Daniel Switkin) Encode a barcode using the default settings. The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels Additional parameters to supply to the encoder The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) This implementation can detect and decode QR Codes in an image. Sean Owen Gets the decoder. Locates and decodes a QR code in an image. a String representing the content encoded by the QR code Locates and decodes a barcode in some format within an image. This method also accepts hints, each possibly associated to some data, which may help the implementation decode. image of barcode to decode passed as a from to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcode encodes Resets any internal state the implementation has after a decode, to prepare it for reuse. This method detects a code in a "pure" image -- that is, pure monochrome image which contains only an unrotated, unskewed, image of a code, with some white border around it. This is a specialized method that works exceptionally fast in this special case. Satoru Takabayashi Daniel Switkin Sean Owen Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and give penalty to them. Example: 00000 or 11111. The matrix. Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. The matrix. Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give penalties twice (i.e. 40 * 2). The matrix. Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. The matrix. Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask pattern conditions. The mask pattern. The x. The y. Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both vertical and horizontal orders respectively. The matrix. if set to true [is horizontal]. Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the decoding caller. Callers are expected to process this. Initializes a new instance of the class. if set to true [mirrored]. Apply the result points' order correction due to mirroring. Array of points to apply mirror correction to. true if the QR Code was mirrored. Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. @author qwandor@google.com (Andrew Walbran) Initializes a new instance of the class. The min cols. The max cols. The min rows. The max rows. Gets the min cols. Gets the max cols. Gets the min rows. Gets the max rows.

Encapsulates logic that can detect a PDF417 Code in an image, even if the PDF417 Code is rotated or skewed, or partially obscured.

SITA Lab (kevin.osullivan@sita.aero) dswitkin@google.com (Daniel Switkin) Guenther Grau
if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. if we set the value too high, then we might detect the start pattern from a neighbor barcode. A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. B S B S B S B S Bar/Space pattern 11111111 0 1 0 1 0 1 000. 1111111 0 1 000 1 0 1 00 1

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

Image. Hints. If set to true multiple. encapsulating results of detecting a PDF417 code
Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. bit matrix to detect barcodes in. List of ResultPoint arrays containing the coordinates of found barcodes Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. Matrix. Start row. Start column. an array containing the vertices: vertices[0] x, y top left barcode vertices[1] x, y bottom left barcode vertices[2] x, y top right barcode vertices[3] x, y bottom right barcode vertices[4] x, y top left codeword area vertices[5] x, y bottom left codeword area vertices[6] x, y top right codeword area vertices[7] x, y bottom right codeword area Copies the temp data to the final result Result. Temp result. Destination indexes. Finds the rows with the given pattern. The rows with pattern. Matrix. Height. Width. Start row. Start column. Pattern. Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? start/end horizontal offset of guard pattern, as an array of two ints. matrix row of black/white values to search column x position to start search. row y position to start search. width the number of pixels to search on this row. If set to true search the white patterns first. pattern of counts of number of black and white pixels that are being searched for as a pattern. counters array of counters, as long as pattern, to re-use . Determines how closely a set of observed counts of runs of black/white. values matches a given target pattern. This is reported as the ratio of the total variance from the expected pattern proportions across all pattern elements, to the length of the pattern. ratio of total variance between counters and pattern compared to total pattern size, where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means the total variance between counters and patterns equals the pattern length, higher values mean even more variance observed counters. expected pattern. The most any counter can differ before we give up. Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. Initializes a new instance of the class. Gets the decode finder counters. Gets the data character counters. Gets the odd rounding errors. Gets the even rounding errors. Gets the odd counts. Gets the even counts. Parses the finder value. The counters. The finder patterns. The value. Counts the specified array. The array. Increments the specified array. The array. The errors. Decrements the specified array. The array. The errors. Determines whether [is finder pattern] [the specified counters]. The counters. true if [is finder pattern] [the specified counters]; otherwise, false. Initializes a new instance of the class.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found
Resets this instance. Decodes MSI barcodes. These represent the encodings of characters, as patterns of wide and narrow bars. The 9 least-significant bits of each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. Creates a reader that assumes all encoded data is data, and does not treat the final character as a check digit. Creates a reader that can be configured to check the last character as a check digit, if true, treat the last data character as a check digit, not data, and verify that the checksum passes.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode
This object renders an EAN13 code as a . aripollak@gmail.com (Ari Pollak) Encode the contents following specified format. {@code width} and {@code height} are required size. This method may return bigger size {@code BitMatrix} when specified size is too small. The user can set both {@code width} and {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} or {@code height}, {@code IllegalArgumentException} is thrown. Encode the contents to byte array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included. a {@code boolean[]} of horizontal pixels (false = white, true = black)

Implements decoding of the EAN-13 format.

dswitkin@google.com (Daniel Switkin) Sean Owen alasdair@google.com (Alasdair Mackintosh)
Initializes a new instance of the class. Subclasses override this to decode the portion of a barcode between the start and end guard patterns. row of black/white values to search start/end offset of start guard pattern to append decoded chars to horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded digits in a barcode, determines the implicitly encoded first digit and adds it to the result string. string to insert decoded first digit into int whose bits indicates the pattern of odd/even L/G patterns used to encode digits -1 if first digit cannot be determined Get the format of this decoder. The 1D format. Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular symbols.

Implements Reed-Solomon decoding, as the name implies.

The algorithm will not be explained here, but the following references were helpful in creating this implementation:

Much credit is due to William Rucklidge since portions of this code are an indirect port of his C++ Reed-Solomon implementation.

Sean Owen William Rucklidge sanfordsquires

Decodes given set of received codewords, which include both data and error-correction codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, in the input.

data and error-correction codewords number of error-correction codewords available false: decoding fails
The class contains all information about the Aztec code which was found

Encapsulates the result of detecting a barcode in an image. This includes the raw matrix of black/white pixels corresponding to the barcode, and possibly points of interest in the image, like the location of finder patterns or corners of the barcode in the image.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
Initializes a new instance of the class. The bits. The points. if set to true [compact]. The nb datablocks. The nb layers. Gets a value indicating whether this Aztec code is compact. true if compact; otherwise, false. Gets the nb datablocks. Gets the nb layers. satorux@google.com (Satoru Takabayashi) - creator dswitkin@google.com (Daniel Switkin) - ported from C++ Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen internally by chooseMode(). On success, store the result in "qrCode". We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very strong error correction for this purpose. Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() with which clients can specify the encoding mode. For now, we don't need the functionality. The content. The ec level. Encodes the specified content. The content. The ec level. The hints. Gets the alphanumeric code. The code. the code point of the table used in alphanumeric mode or -1 if there is no corresponding code in the table. Chooses the mode. The content. Choose the best mode by examining the content. Note that 'encoding' is used as a hint; if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. The content. The encoding. Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). The num data bytes. The bits. Get number of data bytes and number of error correction bytes for block id "blockID". Store the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of JISX0510:2004 (p.30) The num total bytes. The num data bytes. The num RS blocks. The block ID. The num data bytes in block. The num EC bytes in block. Interleave "bits" with corresponding error correction bytes. On success, store the result in "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. The bits. The num total bytes. The num data bytes. The num RS blocks. Append mode info. On success, store the result in "bits". The mode. The bits. Append length info. On success, store the result in "bits". The num letters. The version. The mode. The bits. Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". The content. The mode. The bits. The encoding.

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, including areas used for finder patterns, timing patterns, etc. These areas should be unused after the point they are unmasked anyway.

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position and j is row position. In fact, as the text says, i is row position and j is column position.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
See ISO 18004:2006 6.8.1

Implementations of this method reverse the data masking process applied to a QR Code and make its bits ready to read.

representation of QR Code bits dimension of QR Code, represented by bits, being unmasked
a value between 0 and 7 indicating one of the eight possible data mask patterns a QR Code may use {@link DataMask} encapsulating the data mask pattern 000: mask bits for which (x + y) mod 2 == 0 001: mask bits for which x mod 2 == 0 010: mask bits for which y mod 3 == 0 011: mask bits for which (x + y) mod 3 == 0 100: mask bits for which (x/2 + y/3) mod 2 == 0 101: mask bits for which xy mod 2 + xy mod 3 == 0 110: mask bits for which (xy mod 2 + xy mod 3) mod 2 == 0 111: mask bits for which ((x+y)mod 2 + xy mod 3) mod 2 == 0

PDF417 error correction implementation.

This example is quite useful in understanding the algorithm.

Sean Owen
Initializes a new instance of the class. Decodes the specified received. The received. The num EC codewords. The erasures. The error locations count. Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 The euclidean algorithm. Finds the error locations as a direct application of Chien's search The error locations. Error locator. Finds the error magnitudes by directly applying Forney's Formula The error magnitudes. Error evaluator. Error locator. Error locations. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) This object renders a MSI code as a . Encode the contents following specified format. {@code width} and {@code height} are required size. This method may return bigger size {@code BitMatrix} when specified size is too small. The user can set both {@code width} and {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} or {@code height}, {@code IllegalArgumentException} is thrown. Encode the contents to byte array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included. a {@code boolean[]} of horizontal pixels (false = white, true = black) This class renders CodaBar as []. dsbnatut@gmail.com (Kazuki Nishiura)

Decodes Codabar barcodes.

Bas Vijfwinkel
These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. Records the size of all runs of white and black pixels, starting with white. This is just like recordPattern, except it records all the counters, and uses our builtin "counters" member for storage. row to count from

MaxiCodes can encode text or structured information as bits in one of several modes, with multiple character sets in one code. This class decodes the bits back into text.

mike32767 Manuel Kasten
Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its argument to the nearest int, where x.5 rounds up to x+1. The d. BigInteger-related exception class. BigIntegerException constructor. The exception message The inner exception .NET 2.0 class for handling of very large integers, up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. 2^16 numeration base for internal computations, in order to benefit the most from the 32 bit (or 64 bit) integer processor registers. Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's overflow. Ratio for the convertion of a BigInteger's size to a binary digits size. Integer constants The array of digits of the number. The actual number of digits of the number. The number sign. Default constructor, intializing the BigInteger with zero. Constructor creating a new BigInteger as a conversion of a regular base-10 long. The base-10 long to be converted Constructor creating a new BigInteger as a copy of an existing BigInteger. The BigInteger to be copied Constructor creating a BigInteger instance out of a base-10 formatted string. The base-10 formatted string. Invalid numeric string exception Constructor creating a positive BigInteger by extracting it's digits from a given byte array. The byte array The byte array's content exceeds the maximum size of a BigInteger exception Constructor deserializing a BigInteger. BigInteger serializing method, which should not be called manually. Serialization information object Streaming context object Public access Determines whether the specified BigInteger is equal to the current BigInteger. The BigInteger to compare with the current BigInteger True if the specified BigInteger is equal to the current BigInteger, false otherwise Determines whether the specified System.Object is equal to the current BigInteger. The System.Object to compare with the current BigInteger True if the specified System.Object is equal to the current BigInteger, false otherwise Serves as a hash function for the BigInteger type. A hash code for the current BigInteger String representation of the current BigInteger, converted to its base-10 representation. The string representation of the current BigInteger Parses the number given by a string the number as a string Compares this instance to a specified BigInteger. The BigInteger to compare this instance with -1 if the current instance is smaller than the given BigInteger, 0 if the two are equal, 1 otherwise Compares this instance to a specified object. The object to compare this instance with -1 if the current instance is smaller than the given object, 0 if the two are equal, 1 otherwise obj is not a BigInteger exception Returns a BigInteger's size in binary digits. The BigInteger whose size in binary digits is to be determined The BigInteger's size in binary digits BigInteger inverse with respect to addition. The BigInteger whose opposite is to be computed The BigInteger inverse with respect to addition Greater test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a > b, false otherwise Greater or equal test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a >= b, false otherwise Smaller test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a < b, false otherwise Smaller or equal test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a <= b, false otherwise Computes the absolute value of a BigInteger. The BigInteger whose absolute value is to be computed The absolute value of the given BigInteger Addition operation of two BigIntegers. The 1st BigInteger The 2nd BigInteger The BigInteger result of the addition Subtraction operation of two BigIntegers. The 1st BigInteger The 2nd BigInteger The BigInteger result of the subtraction Multiplication operation of two BigIntegers. The 1st BigInteger The 2nd BigInteger The BigInteger result of the multiplication Division operation of two BigIntegers a and b, b != 0. The 1st BigInteger The 2nd BigInteger The BigInteger result of the division Cannot divide by zero exception Modulo operation of two BigIntegers a and b, b != 0. The 1st BigInteger The 2nd BigInteger The BigInteger result of the modulo Cannot divide by zero exception Returns the power of a BigInteger base to a non-negative exponent by using the fast exponentiation algorithm (right to left binary exponentiation). The BigInteger base The non-negative exponent The power of the BigInteger base to the non-negative exponent Cannot raise a BigInteger to a negative power exception. Integer square root of the given BigInteger using Newton's numeric method. The BigInteger whose integer square root is to be computed The integer square root of the given BigInteger Cannot compute the integer square root of a negative number exception Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. The 1st BigInteger The 2nd BigInteger The greatest common divisor of the two given BigIntegers Cannot compute the Gcd of negative BigIntegers exception Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, while also providing u and v, where: a*u + b*v = gcd(a,b). The 1st BigInteger The 2nd BigInteger Output BigInteger parameter, where a*u + b*v = gcd(a,b) Output BigInteger parameter, where a*u + b*v = gcd(a,b) The greatest common divisor of the two given BigIntegers Cannot compute the Gcd of negative BigIntegers exception Computes the modular inverse of a given BigInteger. The non-zero BigInteger whose inverse is to be computed The BigInteger modulus, which must be greater than or equal to 2 The BigInteger equal to a^(-1) mod n Invalid number or modulus exception Returns the power of a BigInteger to a non-negative exponent modulo n, by using the fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. The BigInteger base The non-negative exponent The modulus, which must be greater than or equal to 2 The power of the BigInteger to the non-negative exponent Invalid exponent or modulus exception Implicit conversion operator from long to BigInteger. The long to be converted to a BigInteger The BigInteger converted from the given long Equality test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a == b, false otherwise Inequality test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a != b, false otherwise Greater test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a > b, false otherwise Smaller test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a < b, false otherwise Greater or equal test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a >= b, false otherwise Smaller or equal test between two BigIntegers. The 1st BigInteger The 2nd BigInteger True if a <= b, false otherwise BigInteger inverse with respect to addition. The BigInteger whose opposite is to be computed The BigInteger inverse with respect to addition Addition operation of two BigIntegers. The 1st BigInteger The 2nd BigInteger The BigInteger result of the addition Subtraction operation of two BigIntegers. The 1st BigInteger The 2nd BigInteger The BigInteger result of the subtraction Multiplication operation of two BigIntegers. The 1st BigInteger The 2nd BigInteger The BigInteger result of the multiplication Division operation of two BigIntegers a and b, b != 0. The 1st BigInteger The 2nd BigInteger The BigInteger result of the division Cannot divide by zero exception Modulo operation of two BigIntegers a and b, b != 0. The 1st BigInteger The 2nd BigInteger The BigInteger result of the modulo Cannot divide by zero exception Incremetation by one operation of a BigInteger. The BigInteger to be incremented by one The BigInteger result of incrementing by one Decremetation by one operation of a BigInteger. The BigInteger to be decremented by one The BigInteger result of decrementing by one Adds two BigNumbers a and b, where a >= b, a, b non-negative. Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. Multiplies two BigIntegers. Divides a BigInteger by a one-digit int. Divides a BigInteger by another BigInteger. DivideByBigNumber auxiliary method. DivideByBigNumber auxilary method. DivideByBigNumber auxilary method. Sean Owen

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: {@code smsto:number(:body)}.

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI for purposes of forwarding to the platform.

Sean Owen
Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Implements the "BIZCARD" address book entry format, though this has been largely reverse-engineered from examples observed in the wild -- still looking for a definitive reference. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Sean Owen In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint is often provided, called furigana, which spells the name phonetically. The pronunciation of the getNames() field, often in hiragana or katakana. optional descriptions of the type of each phone number. It could be like "HOME", but, there is no guaranteed or standard format. optional descriptions of the type of each e-mail. It could be like "WORK", but, there is no guaranteed or standard format. optional descriptions of the type of each e-mail. It could be like "WORK", but, there is no guaranteed or standard format. birthday formatted as yyyyMMdd (e.g. 19780917) a location as a latitude/longitude pair This produces nearly optimal encodings of text into the first-level of encoding used by Aztec code. It uses a dynamic algorithm. For each prefix of the string, it determines a set of encodings that could lead to this prefix. We repeatedly add a character and generate a new set of optimal encodings until we have read through the entire input. @author Frank Yellin @author Rustam Abdullaev Convert the text represented by this High Level Encoder into a BitArray. satorux@google.com (Satoru Takabayashi) - creator Set all cells to 2. 2 means that the cell is empty (not set yet). JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding with the ByteMatrix initialized all to zero. The matrix. Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On success, store the result in "matrix" and return true. The data bits. The ec level. The version. The mask pattern. The matrix. Embed basic patterns. On success, modify the matrix and return true. The basic patterns are: - Position detection patterns - Timing patterns - Dark dot at the left bottom corner - Position adjustment patterns, if need be The version. The matrix. Embed type information. On success, modify the matrix. The ec level. The mask pattern. The matrix. Embed version information if need be. On success, modify the matrix and return true. See 8.10 of JISX0510:2004 (p.47) for how to embed version information. The version. The matrix. Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. For debugging purposes, it skips masking process if "getMaskPattern" is -1. See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. The data bits. The mask pattern. The matrix. Return the position of the most significant bit set (to one) in the "value". The most significant bit is position 32. If there is no bit set, return 0. Examples: - findMSBSet(0) => 0 - findMSBSet(1) => 1 - findMSBSet(255) => 8 The value_ renamed. Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH code is used for encoding type information and version information. Example: Calculation of version information of 7. f(x) is created from 7. - 7 = 000111 in 6 bits - f(x) = x^2 + x^2 + x^1 g(x) is given by the standard (p. 67) - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 Multiply f(x) by x^(18 - 6) - f'(x) = f(x) * x^(18 - 6) - f'(x) = x^14 + x^13 + x^12 Calculate the remainder of f'(x) / g(x) x^2 __________________________________________________ g(x) )x^14 + x^13 + x^12 x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 -------------------------------------------------- x^11 + x^10 + x^7 + x^4 + x^2 The remainder is x^11 + x^10 + x^7 + x^4 + x^2 Encode it in binary: 110010010100 The return value is 0xc94 (1100 1001 0100) Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit operations. We don't care if cofficients are positive or negative. The value. The poly. Make bit vector of type information. On success, store the result in "bits" and return true. Encode error correction level and mask pattern. See 8.9 of JISX0510:2004 (p.45) for details. The ec level. The mask pattern. The bits. Make bit vector of version information. On success, store the result in "bits" and return true. See 8.10 of JISX0510:2004 (p.45) for details. The version. The bits. Check if "value" is empty. The value. true if the specified value is empty; otherwise, false. Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) The matrix. Note that we cannot unify the function with embedPositionDetectionPattern() despite they are almost identical, since we cannot write a function that takes 2D arrays in different sizes in C/C++. We should live with the fact. The x start. The y start. The matrix. Embed position detection patterns and surrounding vertical/horizontal separators. The matrix. Embed position adjustment patterns if need be. The version. The matrix.

Encapsulates information about finder patterns in an image, including the location of the three finder patterns, and their estimated module size.

Sean Owen
Initializes a new instance of the class. The pattern centers. Gets the bottom left. Gets the top left. Gets the top right. dswitkin@google.com (Daniel Switkin) Sean Owen Initializes a new instance of the class. The hints.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found
Resets any internal state the implementation has after a decode, to prepare it for reuse. The class holds the available options for the DatamatrixWriter Specifies the matrix shape for Data Matrix Specifies a minimum barcode size Specifies a maximum barcode size Specifies the default encodation Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. standard value: Encodation.ASCII This Binarizer implementation uses the old ZXing global histogram approach. It is suitable for low-end mobile devices which don't have enough CPU or memory to use a local thresholding algorithm. However, because it picks a global black point, it cannot handle difficult shadows and gradients. Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. dswitkin@google.com (Daniel Switkin) Sean Owen This class hierarchy provides a set of methods to convert luminance data to 1 bit data. It allows the algorithm to vary polymorphically, for example allowing a very expensive thresholding technique for servers and a fast one for mobile. It also permits the implementation to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. dswitkin@google.com (Daniel Switkin) Initializes a new instance of the class. The source. Converts one row of luminance data to 1 bit data. May actually do the conversion, or return cached data. Callers should assume this method is expensive and call it as seldom as possible. This method is intended for decoding 1D barcodes and may choose to apply sharpening. For callers which only examine one row of pixels at a time, the same BitArray should be reused and passed in with each call for performance. However it is legal to keep more than one row at a time if needed. The row to fetch, 0 <= y < bitmap height. An optional preallocated array. If null or too small, it will be ignored. If used, the Binarizer will call BitArray.clear(). Always use the returned object. The array of bits for this row (true means black). Creates a new object with the same type as this Binarizer implementation, but with pristine state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache of 1 bit data. See Effective Java for why we can't use Java's clone() method. The LuminanceSource this Binarizer will operate on. A new concrete Binarizer implementation object. Gets the luminance source object. Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or may not apply sharpening. Therefore, a row from this matrix may not be identical to one fetched using getBlackRow(), so don't mix and match between them. The 2D array of bits for the image (true means black). Gets the width of the luminance source object. Gets the height of the luminance source object. Initializes a new instance of the class. The source. Applies simple sharpening to the row data to improve performance of the 1D Readers. Creates a new object with the same type as this Binarizer implementation, but with pristine state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache of 1 bit data. See Effective Java for why we can't use Java's clone() method. The LuminanceSource this Binarizer will operate on. A new concrete Binarizer implementation object. Does not sharpen the data, as this call is intended to only be used by 2D Readers. Detects a candidate barcode-like rectangular region within an image. It starts around the center of the image, increases the size of the candidate region until it finds a white rectangular region. By keeping track of the last black points it encountered, it determines the corners of the barcode. David Olivier Creates a WhiteRectangleDetector instance The image. null, if image is too small, otherwise a WhiteRectangleDetector instance Creates a WhiteRectangleDetector instance The image. Size of the init. The x. The y. null, if image is too small, otherwise a WhiteRectangleDetector instance Initializes a new instance of the class. The image. if image is too small Initializes a new instance of the class. The image. Size of the init. The x. The y. Detects a candidate barcode-like rectangular region within an image. It starts around the center of the image, increases the size of the candidate region until it finds a white rectangular region. [] describing the corners of the rectangular region. The first and last points are opposed on the diagonal, as are the second and third. The first point will be the topmost point and the last, the bottommost. The second point will be leftmost and the third, the rightmost recenters the points of a constant distance towards the center bottom most point left most point right most point top most point [] describing the corners of the rectangular region. The first and last points are opposed on the diagonal, as are the second and third. The first point will be the topmost point and the last, the bottommost. The second point will be leftmost and the third, the rightmost Determines whether a segment contains a black point min value of the scanned coordinate max value of the scanned coordinate value of fixed coordinate set to true if scan must be horizontal, false if vertical true if a black point has been found, else false.

Represents a 2D matrix of bits. In function arguments below, and throughout the common module, x is the column position, and y is the row position. The ordering is always x, y. The origin is at the top-left.

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins with a new int. This is done intentionally so that we can copy out a row into a BitArray very efficiently.

The ordering of bits is row-major. Within each int, the least significant bits are used first, meaning they represent lower x values. This is compatible with BitArray's implementation.

Sean Owen dswitkin@google.com (Daniel Switkin)

Flips the given bit.

The horizontal component (i.e. which column) The vertical component (i.e. which row)
Clears all bits (sets to false).

Sets a square region of the bit matrix to true.

The horizontal position to begin at (inclusive) The vertical position to begin at (inclusive) The width of the region The height of the region
A fast method to retrieve one row of data from the matrix as a BitArray. The row to retrieve An optional caller-allocated BitArray, will be allocated if null or too small The resulting BitArray - this reference should always be used even when passing your own row Sets the row. row to set {@link BitArray} to copy from Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees This is useful in detecting the enclosing rectangle of a 'pure' barcode. {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white This is useful in detecting a corner of a 'pure' barcode. {x,y} coordinate of top-left-most 1 bit, or null if it is all white The width of the matrix The height of the matrix This method is for compatibility with older code. It's only logical to call if the matrix is square, so I'm throwing if that's not the case. row/column dimension of this matrix

Gets the requested bit, where true means black.

The horizontal component (i.e. which column) The vertical component (i.e. which row) value of given bit in matrix
The number's sign, where Positive also stands for the number zero. jbreiden@google.com (Jeff Breidenbach) Aztec 2D code representation Rustam Abdullaev Compact or full symbol indicator Size in pixels (width and height) Number of levels Number of data codewords The symbol image Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code is rotated or skewed, or partially obscured. David Olivier Initializes a new instance of the class. The image. Detects an Aztec Code in an image. Detects an Aztec Code in an image. if set to true [is mirror]. encapsulating results of detecting an Aztec Code Extracts the number of data layers and data blocks from the layer around the bull's eye bullEyeCornerPoints the array of bull's eye corners Corrects the parameter bits using Reed-Solomon algorithm paremeter bits compact true if this is a compact Aztec code Finds the corners of a bull-eye centered on the passed point This returns the centers of the diagonal points just outside the bull's eye Returns [topRight, bottomRight, bottomLeft, topLeft] Center point The corners of the bull-eye Finds a candidate center point of an Aztec code from an image the center point Gets the Aztec code corners from the bull's eye corners and the parameters. the array of bull's eye corners the array of aztec code corners Creates a BitMatrix by sampling the provided image. topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the diagonal just outside the bull's eye. The image. The top left. The bottom left. The bottom right. The top right. Samples a line start point (inclusive) end point (exclusive) number of bits the array of bits as an int (first bit is high-order bit of result) Determines whether [is white or black rectangle] [the specified p1]. The p1. The p2. The p3. The p4. true if the border of the rectangle passed in parameter is compound of white points only or black points only Gets the color of a segment The p1. The p2. 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else Gets the coordinate of the first point with a different color in the given direction The init. if set to true [color]. The dx. The dy. Expand the square represented by the corner points by pushing out equally in all directions the corners of the square, which has the bull's eye at its center the original length of the side of the square in the target bit matrix the new length of the size of the square in the target bit matrix the corners of the expanded square Interface for a class to convert a BitMatrix to an output image format Renders the specified matrix to its graphically representation The matrix. The format. The encoded content of the barcode which should be included in the image. That can be the numbers below a 1D barcode or something other. Renders the specified matrix to its graphically representation The matrix. The format. The encoded content of the barcode which should be included in the image. That can be the numbers below a 1D barcode or something other. The options.

This class contains the methods for decoding the PDF417 codewords.

SITA Lab (kevin.osullivan@sita.aero)
Table containing values for the exponent of 900. This is used in the numeric compaction decode algorithm. Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as well as selected control characters. The array of codewords (data + error) The current index into the codeword array. The decoded data is appended to the result. The next index into the codeword array. The Text Compaction mode includes all the printable ASCII characters (i.e. values from 32 to 126) and three ASCII control characters: HT or tab (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage return (ASCII value 13). The Text Compaction mode also includes various latch and shift characters which are used exclusively within the mode. The Text Compaction mode encodes up to 2 characters per codeword. The compaction rules for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode switches are defined in 5.4.2.3. The text compaction data. The byte compaction data if there was a mode shift. The size of the text compaction and byte compaction data. The decoded data is appended to the result. Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. This includes all ASCII characters value 0 to 127 inclusive and provides for international character set support. The byte compaction mode i.e. 901 or 924 The array of codewords (data + error) The current index into the codeword array. The decoded data is appended to the result. The next index into the codeword array. Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. The array of codewords (data + error) The current index into the codeword array. The decoded data is appended to the result. The next index into the codeword array. Convert a list of Numeric Compacted codewords from Base 900 to Base 10. EXAMPLE Encode the fifteen digit numeric string 000213298174000 Prefix the numeric string with a 1 and set the initial value of t = 1 000 213 298 174 000 Calculate codeword 0 d0 = 1 000 213 298 174 000 mod 900 = 200 t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 Calculate codeword 1 d1 = 1 111 348 109 082 mod 900 = 282 t = 1 111 348 109 082 div 900 = 1 234 831 232 Calculate codeword 2 d2 = 1 234 831 232 mod 900 = 632 t = 1 234 831 232 div 900 = 1 372 034 Calculate codeword 3 d3 = 1 372 034 mod 900 = 434 t = 1 372 034 div 900 = 1 524 Calculate codeword 4 d4 = 1 524 mod 900 = 624 t = 1 524 div 900 = 1 Calculate codeword 5 d5 = 1 mod 900 = 1 t = 1 div 900 = 0 Codeword sequence is: 1, 624, 434, 632, 282, 200 Decode the above codewords involves 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 Remove leading 1 => Result is 000213298174000 The array of codewords The number of codewords The decoded string representing the Numeric data. A Codeword in the PDF417 barcode Guenther Grau Default value for the RowNumber (-1 being an invalid real number) Initializes a new instance of the class. Start x. End x. Bucket. Value. Determines whether this instance is valid row number the specified rowNumber. true if this instance is valid row number the specified rowNumber; otherwise, false. Row number. Sets the row number as the row's indicator column. Returns a that represents the current . A that represents the current . Gets the width. The width. Gets a value indicating whether this instance has valid row number. true if this instance has valid row number; otherwise, false. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code is rotated or skewed, or partially obscured.

Sean Owen Hannes Erven
Initializes a new instance of the class. The image. Detects the multi. The hints. A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes white and vice versa, and each value becomes (255-value). Sean Owen Initializes a new instance of the class. The @delegate. Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have to bitwise and with 0xff for each value. It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getMatrix() may never be called. The row to fetch, 0 <= y < Height. An optional preallocated array. If null or too small, it will be ignored. Always use the returned object, and ignore the .length of the array. An array containing the luminance data. Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if CropSupported is true. The left coordinate, 0 <= left < Width. The top coordinate, 0 <= top <= Height. The width of the rectangle to crop. The height of the rectangle to crop. A cropped version of this object. Inverts this instance. original delegate {@link LuminanceSource} since invert undoes itself Returns a new object with rotated image data by 90 degrees counterclockwise. Only callable if {@link #isRotateSupported()} is true. A rotated version of this object. Returns a new object with rotated image data by 45 degrees counterclockwise. Only callable if {@link #isRotateSupported()} is true. A rotated version of this object. Fetches luminance data for the underlying bitmap. Values should be fetched using: int luminance = array[y * width + x] & 0xff; A row-major 2D array of luminance values. Do not use result.length as it may be larger than width * height bytes on some platforms. Do not modify the contents of the result. Whether this subclass supports cropping. Whether this subclass supports counter-clockwise rotation. Encapsulates a type of hint that a caller may pass to a barcode reader to help it more quickly or accurately decode it. It is up to implementations to decide what, if anything, to do with the information that is supplied. Sean Owen dswitkin@google.com (Daniel Switkin) Unspecified, application-specific hint. Maps to an unspecified . Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; use = true. Image is known to be of one of a few possible formats. Maps to a of s. Spend more time to try to find a barcode; optimize for accuracy, not speed. Doesn't matter what it maps to; use = true. Specifies what character encoding to use when decoding, where applicable (type String) Allowed lengths of encoded data -- reject anything else. Maps to an int[]. Assume Code 39 codes employ a check digit. Maps to . The caller needs to be notified via callback when a possible is found. Maps to a . Assume MSI codes employ a check digit. Maps to . if Code39 could be detected try to use extended mode for full ASCII character set Maps to . Don't fail if a Code39 is detected but can't be decoded in extended mode. Return the raw Code39 result instead. Maps to . 1D readers supporting rotation with TRY_HARDER enabled. But BarcodeReader class can do auto-rotating for 1D and 2D codes. Enabling that option prevents 1D readers doing double rotation. BarcodeReader enables that option automatically if "global" auto-rotation is enabled. Maps to . Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; use . If true, return the start and end digits in a Codabar barcode instead of stripping them. They are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them to not be. Doesn't matter what it maps to; use . Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. Maps to an of the allowed extension lengths, for example [2], [5], or [2, 5]. If it is optional to have an extension, do not set this hint. If this is set, and a UPC or EAN barcode is found but an extension is not, then no result will be returned at all. Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" 5.3 of ISO 18004. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source ECI value {@link ECI} representing ECI of given value, or null if it is legal but unsupported IllegalArgumentException if ECI value is invalid

A somewhat generic detector that looks for a barcode-like rectangular region within an image. It looks within a mostly white region of an image for a region of black and white, but mostly black. It returns the four corners of the region, as best it can determine.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source

Detects a rectangular region of black and white -- mostly black -- with a region of mostly white, in an image.

{@link ResultPoint}[] describing the corners of the rectangular region. The first and last points are opposed on the diagonal, as are the second and third. The first point will be the topmost point and the last, the bottommost. The second point will be leftmost and the third, the rightmost
Attempts to locate a corner of the barcode by scanning up, down, left or right from a center point which should be within the barcode. center's x component (horizontal) same as deltaY but change in x per step instead minimum value of x maximum value of x center's y component (vertical) change in y per step. If scanning up this is negative; down, positive; left or right, 0 minimum value of y to search through (meaningless when di == 0) maximum value of y maximum run of white pixels that can still be considered to be within the barcode a {@link com.google.zxing.ResultPoint} encapsulating the corner that was found Computes the start and end of a region of pixels, either horizontally or vertically, that could be part of a Data Matrix barcode. if scanning horizontally, this is the row (the fixed vertical location) where we are scanning. If scanning vertically it's the column, the fixed horizontal location largest run of white pixels that can still be considered part of the barcode region minimum pixel location, horizontally or vertically, to consider maximum pixel location, horizontally or vertically, to consider if true, we're scanning left-right, instead of up-down int[] with start and end of found range, or null if no such range is found (e.g. only white was found) A simple, fast array of bits, represented compactly by an array of ints internally. Sean Owen Flips bit i. bit to set Gets the next set. first bit to check index of first bit that is set, starting from the given index, or size if none are set at or beyond this given index see getNextSet(int) Sets a block of 32 bits, starting at bit i. first bit to set the new value of the next 32 bits. Note again that the least-significant bit corresponds to bit i, the next-least-significant to i+1, and so on. Sets a range of bits. start of range, inclusive. end of range, exclusive Clears all bits (sets to false). Efficient method to check if a range of bits is set, or not set. start of range, inclusive. end of range, exclusive if true, checks that bits in range are set, otherwise checks that they are not set true iff all bits are set or not set in range, according to value argument IllegalArgumentException if end is less than or equal to start Appends the bit. The bit. Appends the least-significant bits, from value, in order from most-significant to least-significant. For example, appending 6 bits from 0x000001E will append the bits 0, 1, 1, 1, 1, 0 in that order. The value. The num bits. Toes the bytes. first bit to start writing array to write into. Bytes are written most-significant byte first. This is the opposite of the internal representation, which is exposed by BitArray position in array to start writing how many bytes to write Reverses all bits in the array. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Returns a that represents this instance. A that represents this instance. Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. Ein neues Objekt, das eine Kopie dieser Instanz darstellt. underlying array of ints. The first element holds the first 32 bits, and the least significant bit is bit 0. dswitkin@google.com (Daniel Switkin) Parses strings of digits that represent a RSS Extended code. Antonio Manuel Benjumea Conde, Servinform, S.A. Agustín Delgado, Servinform, S.A. This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects accept a BinaryBitmap and attempt to decode it. dswitkin@google.com (Daniel Switkin) www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Converts one row of luminance data to 1 bit data. May actually do the conversion, or return cached data. Callers should assume this method is expensive and call it as seldom as possible. This method is intended for decoding 1D barcodes and may choose to apply sharpening. The row to fetch, 0 <= y < bitmap height. An optional preallocated array. If null or too small, it will be ignored. If used, the Binarizer will call BitArray.clear(). Always use the returned object. The array of bits for this row (true means black). Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if isCropSupported() is true. The left coordinate, 0 <= left < getWidth(). The top coordinate, 0 <= top <= getHeight(). The width of the rectangle to crop. The height of the rectangle to crop. A cropped version of this object. Returns a new object with rotated image data by 90 degrees counterclockwise. Only callable if {@link #isRotateSupported()} is true. A rotated version of this object. Returns a new object with rotated image data by 45 degrees counterclockwise. Only callable if {@link #isRotateSupported()} is true. A rotated version of this object. Returns a that represents this instance. A that represents this instance. The width of the bitmap. The height of the bitmap. Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or may not apply sharpening. Therefore, a row from this matrix may not be identical to one fetched using getBlackRow(), so don't mix and match between them. The 2D array of bits for the image (true means black). Whether this bitmap can be cropped. Whether this bitmap supports counter-clockwise rotation.

Encapsulates a finder pattern, which are the three square patterns found in the corners of QR Codes. It also encapsulates a count of similar finder patterns, as a convenience to the finder's bookkeeping.

Sean Owen

Determines if this finder pattern "about equals" a finder pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.

Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new {@code FinderPattern} containing a weighted average based on count. The i. The j. New size of the module. Gets the size of the estimated module. The size of the estimated module. A Bounding Box helper class Guenther Grau Initializes a new instance of the class. returns null if the corner points don't match up correctly The image. The top left. The bottom left. The top right. The bottom right. Creates the specified box. The box. Initializes a new instance of the class. Will throw an exception if the corner points don't match up correctly Image. Top left. Top right. Bottom left. Bottom right. Merge two Bounding Boxes, getting the left corners of left, and the right corners of right (Images should be the same) Left. Right. Adds the missing rows. The missing rows. Missing start rows. Missing end rows. If set to true is left. If we adjust the width, set a new right corner coordinate and recalculate Bottom right. This object renders a Plessey code as a . Encode the contents following specified format. {@code width} and {@code height} are required size. This method may return bigger size {@code BitMatrix} when specified size is too small. The user can set both {@code width} and {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} or {@code height}, {@code IllegalArgumentException} is thrown. Encode the contents to byte array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included. a {@code boolean[]} of horizontal pixels (false = white, true = black)

A reader that can read all available UPC/EAN formats. If a caller wants to try to read all such formats, it is most efficient to use this implementation rather than invoke individual readers.

Sean Owen
Initializes a new instance of the class. The hints.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found
Resets any internal state the implementation has after a decode, to prepare it for reuse. Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). Main constructor the codewords to place the number of columns the number of rows Places the 8 bits of a utah-shaped symbol character in ECC200. The row. The col. character position Partially implements the iCalendar format's "VEVENT" format for specifying a calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". This seems to be used sometimes, but I am not able to find documentation on its origin or official format? Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Represents the type of data encoded by a barcode -- from plain text, to a URI, to an e-mail address, etc. Sean Owen Sean Owen Generates Aztec 2D barcodes. Rustam Abdullaev Encodes the given binary content as an Aztec symbol input data string Aztec symbol matrix with metadata Encodes the given binary content as an Aztec symbol input data string minimal percentage of error check words (According to ISO/IEC 24778:2008, a minimum of 23% + 3 words is recommended) if non-zero, a user-specified value for the number of layers Aztec symbol matrix with metadata Renders a barcode into a Svg image Initializes a new instance of the class. Renders the specified matrix. The matrix. The format. The content. Renders the specified matrix. The matrix. The format. The content. The options. Gets or sets the foreground color. The foreground color. Gets or sets the background color. The background color. Represents a barcode as a Svg image Initializes a new instance of the class. Initializes a new instance of the class. The content. Gives the XML representation of the SVG image Gets or sets the content. The content. Holds all of the information for a barcode in a format where it can be easily accessable Jacob Haynes the height of the matrix (Rows) the width of the matrix (Cols) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) This object renders an EAN8 code as a . aripollak@gmail.com (Ari Pollak) Encode the contents following specified format. {@code width} and {@code height} are required size. This method may return bigger size {@code BitMatrix} when specified size is too small. The user can set both {@code width} and {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} or {@code height}, {@code IllegalArgumentException} is thrown. a byte array of horizontal pixels (false = white, true = black)

Implements decoding of the EAN-8 format.

Sean Owen
Initializes a new instance of the class. Decodes the middle. The row. The start range. The result. Get the format of this decoder. The 1D format. 1 pixel/module times 3 modules/center support up to version 10 for mobile clients

Creates a finder that will search the image for three finder patterns.

image to search
Initializes a new instance of the class. The image. The result point callback. Given a count of black/white/black/white/black pixels just seen and an end position, figures the location of the center of this run. count of black/white/black/white/black pixels just read true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios used by finder patterns to be considered a match After a vertical and horizontal scan finds a potential finder pattern, this method "cross-cross-cross-checks" by scanning down diagonally through the center of the possible finder pattern to see if the same proportion is detected. row where a finder pattern was detected center of the section that appears to cross a finder pattern maximum reasonable number of modules that should be observed in any reading state, based on the results of the horizontal scan The original state count total. true if proportions are withing expected limits

After a horizontal scan finds a potential finder pattern, this method "cross-checks" by scanning down vertically through the center of the possible finder pattern to see if the same proportion is detected.

row where a finder pattern was detected center of the section that appears to cross a finder pattern maximum reasonable number of modules that should be observed in any reading state, based on the results of the horizontal scan The original state count total. vertical center of finder pattern, or null if not found

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, except it reads horizontally instead of vertically. This is used to cross-cross check a vertical cross check and locate the real center of the alignment pattern.

This is called when a horizontal scan finds a possible alignment pattern. It will cross check with a vertical scan, and if successful, will, ah, cross-cross-check with another horizontal scan. This is needed primarily to locate the real horizontal center of the pattern in cases of extreme skew. And then we cross-cross-cross check with another diagonal scan.

If that succeeds the finder pattern location is added to a list that tracks the number of times each location has been nearly-matched as a finder pattern. Each additional find is more evidence that the location is in fact a finder pattern center
reading state module counts from horizontal scan row where finder pattern may be found end of possible finder pattern in row if set to true [pure barcode]. true if a finder pattern candidate was found this time
number of rows we could safely skip during scanning, based on the first two finder patterns that have been located. In some cases their position will allow us to infer that the third pattern must lie below a certain point farther down in the image. true iff we have found at least 3 finder patterns that have been detected at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the candidates is "pretty similar" the 3 best {@link FinderPattern}s from our list of candidates. The "best" are those that have been detected at least {@link #CENTER_QUORUM} times, and whose module size differs from the average among those patterns the least Gets the image. Gets the possible centers. Orders by furthest from average

Orders by {@link FinderPattern#getCount()}, descending.

More or less arbitrary cutoff point for determining if two finder patterns might belong to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their estimated modules sizes. More or less arbitrary cutoff point for determining if two finder patterns might belong to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their estimated modules sizes.

Creates a finder that will search the image for three finder patterns.

image to search
the 3 best s from our list of candidates. The "best" are those that have been detected at least CENTER_QUORUM times, and whose module size differs from the average among those patterns the least A comparator that orders FinderPatterns by their estimated module size. This implementation can detect and decode a MaxiCode in an image. Locates and decodes a MaxiCode in an image. a String representing the content encoded by the MaxiCode if a MaxiCode cannot be decoded Locates and decodes a MaxiCode within an image. This method also accepts hints, each possibly associated to some data, which may help the implementation decode. image of barcode to decode passed as a from to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcode encodes This method detects a code in a "pure" image -- that is, pure monochrome image which contains only an unrotated, unskewed, image of a code, with some white border around it. This is a specialized method that works exceptionally fast in this special case. bbrown@google.com (Brian Brown)

Creates the version object based on the dimension of the original bit matrix from the datamatrix code.

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

Original including alignment patterns encapsulating the Data Matrix Code's "version" if the dimensions of the mapping matrix are not valid Data Matrix dimensions.

Reads the bits in the representing the mapping matrix (No alignment patterns) in the correct order in order to reconstitute the codewords bytes contained within the Data Matrix Code.

bytes encoded within the Data Matrix Code if the exact number of bytes expected is not read

Reads a bit of the mapping matrix accounting for boundary wrapping.

Row to read in the mapping matrix Column to read in the mapping matrix Number of rows in the mapping matrix Number of columns in the mapping matrix value of the given bit in the mapping matrix

Reads the 8 bits of the standard Utah-shaped pattern.

See ISO 16022:2006, 5.8.1 Figure 6

Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern Number of rows in the mapping matrix Number of columns in the mapping matrix byte from the utah shape

Reads the 8 bits of the special corner condition 1.

See ISO 16022:2006, Figure F.3

Number of rows in the mapping matrix Number of columns in the mapping matrix byte from the Corner condition 1

Reads the 8 bits of the special corner condition 2.

See ISO 16022:2006, Figure F.4

Number of rows in the mapping matrix Number of columns in the mapping matrix byte from the Corner condition 2

Reads the 8 bits of the special corner condition 3.

See ISO 16022:2006, Figure F.5

Number of rows in the mapping matrix Number of columns in the mapping matrix byte from the Corner condition 3

Reads the 8 bits of the special corner condition 4.

See ISO 16022:2006, Figure F.6

Number of rows in the mapping matrix Number of columns in the mapping matrix byte from the Corner condition 4

Extracts the data region from a that contains alignment patterns.

Original with alignment patterns BitMatrix that has the alignment patterns removed
This class implements a local thresholding algorithm, which while slower than the GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for high frequency images of barcodes with black data on white backgrounds. For this application, it does a much better job than a global blackpoint with severe shadows and gradients. However it tends to produce artifacts on lower frequency images and is therefore not a good general purpose binarizer for uses outside ZXing. This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already inherently local, and only fails for horizontal gradients. We can revisit that problem later, but for now it was not a win to use local blocks for 1D. This Binarizer is the default for the unit tests and the recommended class for library users. dswitkin@google.com (Daniel Switkin) www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Calculates the final BitMatrix once for all requests. This could be called once from the constructor instead, but there are some advantages to doing it lazily, such as making profiling easier, and not doing heavy lifting when callers don't expect it. For each 8x8 block in the image, calculate the average black point using a 5x5 grid of the blocks around it. Also handles the corner cases (fractional blocks are computed based on the last 8 pixels in the row/column which are also used in the previous block). The luminances. Width of the sub. Height of the sub. The width. The height. The black points. The matrix. Applies a single threshold to an 8x8 block of pixels. The luminances. The xoffset. The yoffset. The threshold. The stride. The matrix. Calculates a single black point for each 8x8 block of pixels and saves it away. See the following thread for a discussion of this algorithm: http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 The luminances. Width of the sub. Height of the sub. The width. The height. Vikram Aggarwal Sean Owen Transforms a string that represents a URI into something more proper, by adding or canonicalizing the protocol. true if the URI contains suspicious patterns that may suggest it intends to mislead the user about its true nature. At the moment this looks for the presence of user/password syntax in the host/authority portion of a URI which may be used in attempts to make the URI's host appear to be other than it is. Example: http://yourbank.com@phisher.com This URI connects to phisher.com but may appear to connect to yourbank.com at first glance. Parses a "tel:" URI result, which specifies a phone number. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source A base class which covers the range of exceptions which may occur when encoding a barcode using the Writer framework. dswitkin@google.com (Daniel Switkin) Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exc. The class holds the available options for the QrCodeWriter Specifies what degree of error correction to use, for example in QR Codes. Type depends on the encoder. For example for QR codes it's type {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}. Specifies what character encoding to use where applicable (type {@link String}) Explicitly disables ECI segment when generating QR Code That is against the specification of QR Code but some readers have problems if the charset is switched from ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. If you set the property to true you can use UTF-8 encoding and the ECI segment is omitted.

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which data can be encoded to bits in the QR code standard.

Sean Owen
See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. Fors the bits. four bits encoding a QR Code data mode encoded by these bits if bits do not correspond to a known mode version in question number of bits used, in this QR Code symbol {@link Version}, to encode the count of characters that will follow encoded in this {@link Mode} Returns a that represents this instance. A that represents this instance. Gets the name. Gets the bits.

The main class which implements QR Code decoding -- as opposed to locating and extracting the QR Code from an image.

Sean Owen
Initializes a new instance of the class.

Convenience method that can decode a QR Code represented as a 2D array of booleans. "true" is taken to mean a black module.

booleans representing white/black QR Code modules The hints. text and bytes encoded within the QR Code

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

booleans representing white/black QR Code modules The hints. text and bytes encoded within the QR Code

Given data and error-correction codewords received, possibly corrupted by errors, attempts to correct the errors in-place using Reed-Solomon error correction.

data and error correction codewords number of codewords that are data bytes
PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in annex P. code for Text compaction code for Byte compaction code for Numeric compaction Text compaction submode Alpha Text compaction submode Lower Text compaction submode Mixed Text compaction submode Punctuation mode latch to Text Compaction mode mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) mode latch to Numeric Compaction mode mode shift to Byte Compaction mode mode latch to Byte Compaction mode (number of characters a multiple of 6) identifier for a user defined Extended Channel Interpretation (ECI) identifier for a general purpose ECO format identifier for an ECI of a character set of code page Raw code table for text compaction Mixed sub-mode Raw code table for text compaction: Punctuation sub-mode Performs high-level encoding of a PDF417 message using the algorithm described in annex P of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction is used. the message the encoded message (the char values range from 0 to 928) Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), chapter 4.4.2. the message the start position within the message the number of characters to encode receives the encoded codewords should normally be SUBMODE_ALPHA the text submode in which this method ends Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 codepage. the message converted to a byte array the start position within the message the number of bytes to encode the mode from which this method starts receives the encoded codewords Determines the number of consecutive characters that are encodable using numeric compaction. the message the start position within the message the requested character count Determines the number of consecutive characters that are encodable using text compaction. the message the start position within the message the requested character count Determines the number of consecutive characters that are encodable using binary compaction. the message the message converted to a byte array the start position within the message the requested character count Guenther Grau Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth and maxCodewordWidth. TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern columns. That way width can be deducted from the pattern column. This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider than it should be. This can happen if the scanner used a bad blackpoint. Image. Image top left. Image bottom left. Image top right. Image bottom right. Minimum codeword width. Max codeword width. Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. Left row indicator column. Right row indicator column. Adjusts the bounding box. The bounding box. Row indicator column. Gets the barcode metadata. The barcode metadata. Left row indicator column. Right row indicator column. Gets the row indicator column. The row indicator column. Image. Bounding box. Start point. If set to true left to right. Minimum codeword width. Max codeword width. Adjusts the codeword count. Detection result. Barcode matrix. Creates the decoder result. The decoder result. Detection result. This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The current error correction implementation doesn't deal with erasures very well, so it's better to provide a value for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, so decoding the normal barcodes is not affected by this. The decoder result from ambiguous values. Ec level. Codewords. contains the indexes of erasures. array with the indexes that have more than one most likely value. two dimensional array that contains the ambiguous values. The first dimension must be the same Length as the ambiguousIndexes array. Creates the barcode matrix. The barcode matrix. Detection result. Tests to see if the Barcode Column is Valid true, if barcode column is valid, false otherwise. Detection result. Barcode column. Gets the start column. The start column. Detection result. Barcode column. Image row. If set to true left to right. Detects the codeword. The codeword. Image. Minimum column. Max column. If set to true left to right. Start column. Image row. Minimum codeword width. Max codeword width. Gets the module bit count. The module bit count. Image. Minimum column. Max column. If set to true left to right. Start column. Image row. Gets the number of EC code words. The number of EC code words. Barcode EC level. Adjusts the codeword start column. The codeword start column. Image. Minimum column. Max column. If set to true left to right. Codeword start column. Image row. Checks the codeword for any skew. true, if codeword is within the skew, false otherwise. Codeword size. Minimum codeword width. Max codeword width. Decodes the codewords. The codewords. Codewords. Ec level. Erasures. Given data and error-correction codewords received, possibly corrupted by errors, attempts to correct the errors in-place. The errors. data and error correction codewords. positions of any known erasures. number of error correction codewords that are available in codewords. Verifies that all is well with the the codeword array. Codewords. Number EC codewords. Gets the bit count for codeword. The bit count for codeword. Codeword. Gets the codeword bucket number. The codeword bucket number. Codeword. Gets the codeword bucket number. The codeword bucket number. Module bit count. Returns a that represents the jagged array. A that represents the jagged array. Barcode matrix as a jagged array. Guenther Grau creatale GmbH (christoph.schulz@creatale.de) The ratios table Gets the decoded value. The decoded value. Module bit count. Samples the bit counts. The bit counts. Module bit count. Gets the decoded codeword value. The decoded codeword value. Module bit count. Gets the bit value. The bit value. Module bit count. Gets the closest decoded value. The closest decoded value. Module bit count. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) mike32767 Manuel Kasten to parse Handle "end of data" situations the encoder context the buffer with the remaining encoded characters A simple result type encapsulating a string that has no further interpretation. Sean Owen Parses strings of digits that represent a ISBN. jbreiden@google.com (Jeff Breidenbach) www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source See ISBN-13 For Dummies The result. Implements the "MECARD" address book entry format. Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG Unsupported keys: TEL-AV, NICKNAME Except for TEL, multiple values for keys are also not supported; the first one found takes precedence. Our understanding of the MECARD format is based on this document: http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Generates Aztec 2D barcodes. Encode a barcode using the default settings. The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels Additional parameters to supply to the encoder The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) This implementation can detect and decode Aztec codes in an image. David Olivier Locates and decodes a barcode in some format within an image. image of barcode to decode a String representing the content encoded by the Data Matrix code Locates and decodes a Data Matrix code in an image. image of barcode to decode passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcode encodes Resets any internal state the implementation has after a decode, to prepare it for reuse. Contains conversion support elements such as classes, interfaces and static methods. Copies an array of chars obtained from a String into a specified array of chars The String to get the chars from Position of the String to start getting the chars Position of the String to end getting the chars Array to return the chars Position of the destination array of chars to start storing the chars An array of chars Sets the capacity for the specified List The List which capacity will be set The new capacity value Converts a string-Collection to an array The strings. Joins all elements to one string. The separator. The values. Fills the specified array. (can't use extension method because of .Net 2.0 support) The array. The value. Fills the specified array. (can't use extension method because of .Net 2.0 support) The array. The start index. The end index. The value. Savely gets the value of a decoding hint if hints is null the default is returned The hints. Type of the hint. The @default. Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. Gets the RS svalue. The widths. Width of the max. if set to true [no narrow]. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Thrown when a barcode was successfully detected, but some aspect of the content did not conform to the barcode's format rules. This could have been due to a mis-detection. Sean Owen Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 of ISO 18004. Sean Owen character set ECI value {@link CharacterSetECI} representing ECI of given value, or null if it is legal but unsupported IllegalArgumentException if ECI value is invalid character set ECI encoding name {@link CharacterSetECI} representing ECI for character encoding, or null if it is legal but unsupported Parses strings of digits that represent a UPC code. dswitkin@google.com (Daniel Switkin) Sean Owen latitude in degrees longitude in degrees altitude in meters. If not specified, in the geo URI, returns 0.0 query string associated with geo URI or null if none exists a URI link to Google Maps which display the point on the Earth described by this instance, and sets the zoom level in a way that roughly reflects the altitude, if specified a barcode renderer which returns a Color32 array Renders the specified matrix. The matrix. The format. The content. Renders the specified matrix. The matrix. The format. The content. The options. Encapsulates the result of decoding a barcode within an image. Initializes a new instance of the class. The text. The raw bytes. The result points. The format. Initializes a new instance of the class. The text. The raw bytes. The result points. The format. The timestamp. Adds one metadata to the result The type. The value. Adds a list of metadata to the result The metadata. Adds the result points. The new points. Returns a that represents this instance. A that represents this instance. raw text encoded by the barcode, if applicable, otherwise null raw bytes encoded by the barcode, if applicable, otherwise null points related to the barcode in the image. These are typically points identifying finder patterns or the corners of the barcode. The exact meaning is specific to the type of barcode that was decoded. {@link BarcodeFormat} representing the format of the barcode that was decoded {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be null. This contains optional metadata about what was detected about the barcode, like orientation. Gets the timestamp.

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels defined by the QR code standard.

Sean Owen
L = ~7% correction M = ~15% correction Q = ~25% correction H = ~30% correction Ordinals this instance. Returns a that represents this instance. A that represents this instance. Fors the bits. int containing the two bits encoding a QR Code's error correction level representing the encoded error correction level Gets the bits. Gets the name. This object extends LuminanceSource around an array of YUV data returned from the camera driver, with the option to crop to a rectangle within the full data. This can be used to exclude superfluous pixels around the perimeter and speed up decoding. It works for any pixel format where the Y channel is planar and appears first, including YCbCr_420_SP and YCbCr_422_SP. @author dswitkin@google.com (Daniel Switkin) Initializes a new instance of the class. The yuv data. Width of the data. Height of the data. The left. The top. The width. The height. if set to true [reverse horiz]. Initializes a new instance of the class. The luminances. The width. The height. Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have to bitwise and with 0xff for each value. It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getMatrix() may never be called. The row to fetch, 0 <= y < Height. An optional preallocated array. If null or too small, it will be ignored. Always use the returned object, and ignore the .length of the array. An array containing the luminance data. Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if CropSupported is true. The left coordinate, 0 <= left < Width. The top coordinate, 0 <= top <= Height. The width of the rectangle to crop. The height of the rectangle to crop. A cropped version of this object. Renders the cropped greyscale bitmap. Whether this subclass supports cropping. width of image from {@link #renderThumbnail()} height of image from {@link #renderThumbnail()} Jacob Haynes qwandor@google.com (Andrew Walbran) default white space (margin) around the code The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels Additional parameters to supply to the encoder The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) Encode a barcode using the default settings. The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) Takes encoder, accounts for width/height, and retrieves bit matrix This takes an array holding the values of the PDF 417 a byte array of information with 0 is black, and 1 is white border around the barcode BitMatrix of the input Takes and rotates the it 90 degrees This implementation can detect and decode PDF417 codes in an image. SITA Lab (kevin.osullivan@sita.aero) Guenther Grau Locates and decodes a PDF417 code in an image. a String representing the content encoded by the PDF417 code if a PDF417 cannot be decoded Locates and decodes a barcode in some format within an image. This method also accepts hints, each possibly associated to some data, which may help the implementation decode. **Note** this will return the FIRST barcode discovered if there are many. image of barcode to decode passed as a from to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcode encodes Locates and decodes Multiple PDF417 codes in an image. an array of Strings representing the content encoded by the PDF417 codes Locates and decodes multiple barcodes in some format within an image. This method also accepts hints, each possibly associated to some data, which may help the implementation decode. image of barcode to decode passed as a from to arbitrary data. The meaning of the data depends upon the hint type. The implementation may or may not do anything with these hints. String which the barcodes encode Decode the specified image, with the hints and optionally multiple barcodes. Based on Owen's Comments in , this method has been modified to continue silently if a barcode was not decoded where it was detected instead of throwing a new exception object. Image. Hints. If set to true multiple. Gets the maximum width of the barcode The max width. P1. P2. Gets the minimum width of the barcode The minimum width. P1. P2. Gets the maximum width of the codeword. The max codeword width. P. Gets the minimum width of the codeword. The minimum codeword width. P. Resets any internal state the implementation has after a decode, to prepare it for reuse.

A field based on powers of a generator integer, modulo some modulus.

@see com.google.zxing.common.reedsolomon.GenericGF
Sean Owen
This object renders a UPC-A code as a . qwandor@google.com (Andrew Walbran) Encode a barcode using the default settings. The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) The contents to encode in the barcode The barcode format to generate The preferred width in pixels The preferred height in pixels Additional parameters to supply to the encoder The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) Transform a UPC-A code into the equivalent EAN-13 code, and add a check digit if it is not already present.

Implements decoding of the UPC-A format.

dswitkin@google.com (Daniel Switkin) Sean Owen

Like decodeRow(int, BitArray, java.util.Map), but allows caller to inform method about where the UPC/EAN start pattern is found. This allows this to be computed once and reused across many implementations.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found
Decodes the specified image. The image. The hints. Subclasses override this to decode the portion of a barcode between the start and end guard patterns. row of black/white values to search start/end offset of start guard pattern to append decoded chars to horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully Get the format of this decoder. The 1D format. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) This object renders a CODE39 code as a . erik.barbara@gmail.com (Erik Barbara) Encode the contents following specified format. {@code width} and {@code height} are required size. This method may return bigger size {@code BitMatrix} when specified size is too small. The user can set both {@code width} and {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} or {@code height}, {@code IllegalArgumentException} is thrown. Encode the contents to byte array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included. a {@code boolean[]} of horizontal pixels (false = white, true = black)

Decodes Code 39 barcodes. This does not support "Full ASCII Code 39" yet.

Sean Owen @see Code93Reader
These represent the encodings of characters, as patterns of wide and narrow bars. The 9 least-significant bits of each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. Creates a reader that assumes all encoded data is data, and does not treat the final character as a check digit. It will not decoded "extended Code 39" sequences. Creates a reader that can be configured to check the last character as a check digit. It will not decoded "extended Code 39" sequences. if true, treat the last data character as a check digit, not data, and verify that the checksum passes. Creates a reader that can be configured to check the last character as a check digit, or optionally attempt to decode "extended Code 39" sequences that are used to encode the full ASCII character set. if true, treat the last data character as a check digit, not data, and verify that the checksum passes. if true, will attempt to decode extended Code 39 sequences in the text.

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode
Simply encapsulates a width and height. Error Correction Code for ECC200. Lookup table which factors to use for which number of error correction codewords. See FACTORS. Precomputed polynomial factors for ECC 200. Creates the ECC200 error correction for an encoded message. The codewords. information about the symbol to be encoded the codewords with interleaved error correction.

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting the Data Matrix Code from an image.

bbrown@google.com (Brian Brown)
Initializes a new instance of the class.

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. "true" is taken to mean a black module.

booleans representing white/black Data Matrix Code modules text and bytes encoded within the Data Matrix Code if the Data Matrix Code cannot be decoded if error correction fails

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken to mean a black module.

booleans representing white/black Data Matrix Code modules text and bytes encoded within the Data Matrix Code

Given data and error-correction codewords received, possibly corrupted by errors, attempts to correct the errors in-place using Reed-Solomon error correction.

data and error correction codewords number of codewords that are data bytes
Implements Reed-Solomon encoding, as the name implies. Sean Owen William Rucklidge

This class implements a perspective transform in two dimensions. Given four source and four destination points, it will compute the transformation implied between them. The code is based directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
Convenience method, not optimized for performance. Defines an container for encoder options Initializes a new instance of the class. Gets the data container for all options Gets or sets a flag which cause a deeper look into the bitmap true if [try harder]; otherwise, false. Image is a pure monochrome image of a barcode. true if monochrome image of a barcode; otherwise, false. Specifies what character encoding to use when decoding, where applicable (type String) The character set. Image is known to be of one of a few possible formats. Maps to a {@link java.util.List} of {@link BarcodeFormat}s. The possible formats. if Code39 could be detected try to use extended mode for full ASCII character set Don't fail if a Code39 is detected but can't be decoded in extended mode. Return the raw Code39 result instead. Maps to . If true, return the start and end digits in a Codabar barcode instead of stripping them. They are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them to not be. Doesn't matter what it maps to; use .

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: smtp[:subject[:body]]}.

See http://code.google.com/p/zxing/issues/detail?id=536

Sean Owen
Represents a result that encodes an e-mail address, either as a plain address like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source Initializes a new instance of the class. The width. The height. Initializes a new instance of the class. The RGB565 raw data. The width. The height. Should create a new luminance source with the right class type. The method is used in methods crop and rotate. The new luminances. The width. The height. Callback which is invoked when a possible result point (significant point in the barcode image such as a corner) is found. PDF 417 result meta data. Guenther Grau Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)

Attempts to decode a one-dimensional barcode format given a single row of an image.

row number from top of the row the black/white pixel data of the row decode hints containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found
Resets this instance. One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. Two rows are equal if they contain the same pairs in the same order. Did this row of the image have to be reversed (mirrored) to recognize the pairs? This implementation can detect and decode multiple QR Codes in an image. Decodes the multiple. The image. Decodes the multiple. The image. The hints. This class attempts to decode a barcode from an image, not by scanning the whole image, but by scanning subsets of the image. This is important when there may be multiple barcodes in an image, and detecting a barcode may find parts of multiple barcode and fail to decode (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center 'quadrant' to cover the case where a barcode is found in the center. Integer inefficiently represented internally using base-10 digits, in order to allow a visual representation as a base-10 string. Only for internal use. 10 numeration base for string representation, very inefficient for computations. Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' overflow. Integer constants The array of digits of the number. The actual number of digits of the number. The number sign. Default constructor, intializing the Base10BigInteger with zero. Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. The base-10 long to be converted Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. The Base10BigInteger to be copied Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. The Base10BigInteger to compare with the current Base10BigInteger True if the specified Base10BigInteger is equal to the current Base10BigInteger, false otherwise Determines whether the specified System.Object is equal to the current Base10BigInteger. The System.Object to compare with the current Base10BigInteger True if the specified System.Object is equal to the current Base10BigInteger, false otherwise Serves as a hash function for the Base10BigInteger type. A hash code for the current Base10BigInteger String representation of the current Base10BigInteger, converted to its base-10 representation. The string representation of the current Base10BigInteger Base10BigInteger inverse with respect to addition. The Base10BigInteger whose opposite is to be computed The Base10BigInteger inverse with respect to addition Greater test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a > b, false otherwise Greater or equal test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a >= b, false otherwise Smaller test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a < b, false otherwise Smaller or equal test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a <= b, false otherwise Computes the absolute value of a Base10BigInteger. The Base10BigInteger whose absolute value is to be computed The absolute value of the given BigInteger Addition operation of two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger The Base10BigInteger result of the addition Subtraction operation of two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger The Base10BigInteger result of the subtraction Multiplication operation of two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger The Base10BigInteger result of the multiplication Implicit conversion operator from long to Base10BigInteger. The long to be converted to a Base10BigInteger The Base10BigInteger converted from the given long Equality test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a == b, false otherwise Inequality test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a != b, false otherwise Greater test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a > b, false otherwise Smaller test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a < b, false otherwise Greater or equal test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a >= b, false otherwise Smaller or equal test between two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger True if a <= b, false otherwise Base10BigInteger inverse with respect to addition. The Base10BigInteger whose opposite is to be computed The Base10BigInteger inverse with respect to addition Addition operation of two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger The Base10BigInteger result of the addition Subtraction operation of two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger The Base10BigInteger result of the subtraction Multiplication operation of two Base10BigIntegers. The 1st Base10BigInteger The 2nd Base10BigInteger The Base10BigInteger result of the multiplication Incremetation by one operation of a Base10BigInteger. The Base10BigInteger to be incremented by one The Base10BigInteger result of incrementing by one Decremetation by one operation of a Base10BigInteger. The Base10BigInteger to be decremented by one The Base10BigInteger result of decrementing by one Adds two BigNumbers a and b, where a >= b, a, b non-negative. Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. Multiplies two Base10BigIntegers. Sets the number sign.

Parses a WIFI configuration string. Strings will be of the form:

{@code WIFI:T:[network type];S:[network SSID];P:[network password];H:[hidden?];;}

The fields can appear in any order. Only "S:" is required.

Vikram Aggarwal Sean Owen
Tries to parse results that are a URI of some kind. Sean Owen www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source The main class which implements Aztec Code decoding -- as opposed to locating and extracting the Aztec Code from an image. David Olivier Decodes the specified detector result. The detector result. Gets the string encoded in the aztec code bits The corrected bits. the decoded string gets the table corresponding to the char passed The t. Gets the character (or string) corresponding to the passed code in the given table the table used the code of the character Performs RS error correction on an array of bits. The rawbits. the corrected array Gets the array of bits from an Aztec Code matrix The matrix. the array of bits Reads a code of given length and at given index in an array of bits The rawbits. The start index. The length. Sean Owen {@link BitMatrix} to parse ReaderException if dimension is not >= 21 and 1 mod 4

Reads format information from one of its two locations within the QR Code.

{@link FormatInformation} encapsulating the QR Code's format info ReaderException if both format information locations cannot be parsed as the valid encoding of format information

Reads version information from one of its two locations within the QR Code.

{@link Version} encapsulating the QR Code's version ReaderException if both version information locations cannot be parsed as the valid encoding of version information

Reads the bits in the {@link BitMatrix} representing the finder pattern in the correct order in order to reconstruct the codewords bytes contained within the QR Code.

bytes encoded within the QR Code ReaderException if the exact number of bytes expected is not read
Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. Prepare the parser for a mirrored operation. This flag has effect only on the {@link #readFormatInformation()} and the {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the {@link #mirror()} method should be called. @param mirror Whether to read version and format information mirrored. Mirror the bit matrix in order to attempt a second reading. PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in chapter 4.10. Tables of coefficients for calculating error correction words (see annex F, ISO/IEC 15438:2001(E)) Determines the number of error correction codewords for a specified error correction level. the error correction level (0-8) the number of codewords generated for error correction Returns the recommended minimum error correction level as described in annex E of ISO/IEC 15438:2001(E). the number of data codewords the recommended minimum error correction level Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). the data codewords the error correction level (0-8) the String representing the error correction codewords defines the level of the error correction / count of error correction codewords Represents a Column in the Detection Result Guenther Grau Initializes a new instance of the class. Box. If set to true is left. Sets the Row Numbers as Inidicator Columns TODO implement properly TODO maybe we should add missing codewords to store the correct row number to make finding row numbers for other columns easier use row height count to make detection of invalid row numbers more reliable The indicator column row numbers. Metadata. Gets the row heights. The row heights. Adjusts the in omplete indicator column row numbers. Metadata. Gets the barcode metadata. The barcode metadata. Prune the codewords which do not match the metadata TODO Maybe we should keep the incorrect codewords for the start and end positions? Codewords. Metadata. Returns a that represents the current . A that represents the current . Gets or sets a value indicating whether this instance is the left indicator true if this instance is left; otherwise, false. Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code is rotated or skewed, or partially obscured.

Sean Owen
Initializes a new instance of the class. The image.

Detects a Data Matrix Code in an image.

encapsulating results of detecting a Data Matrix Code or null
Calculates the position of the white top right module using the output of the rectangle detector for a rectangular matrix Calculates the position of the white top right module using the output of the rectangle detector for a square matrix Increments the Integer associated with a key by one. Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. Simply encapsulates two points and a number of transitions between them. Orders ResultPointsAndTransitions by number of transitions, ascending. Common string-related functions. Sean Owen Alex Dupre Guesses the encoding. bytes encoding a string, whose encoding should be guessed decode hints if applicable name of guessed encoding; at the moment will only guess one of: {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform default encoding if none of these can possibly be correct

This class contains utility methods for performing mathematical operations over the Galois Fields. Operations use a given primitive polynomial in calculations.

Throughout this package, elements of the GF are represented as an {@code int} for convenience and speed (but at the cost of memory).

Sean Owen
Create a representation of GF(size) using the given primitive polynomial. irreducible polynomial whose coefficients are represented by * the bits of an int, where the least-significant bit represents the constant * coefficient the size of the field the factor b in the generator polynomial can be 0- or 1-based * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). * In most cases it should be 1, but for QR code it is 0. Builds the monomial. The degree. The coefficient. the monomial representing coefficient * x^degree Implements both addition and subtraction -- they are the same in GF(size). sum/difference of a and b Exps the specified a. 2 to the power of a in GF(size) Logs the specified a. A. base 2 log of a in GF(size) Inverses the specified a. multiplicative inverse of a Multiplies the specified a with b. A. The b. product of a and b in GF(size) Returns a that represents this instance. A that represents this instance. Gets the size. Gets the generator base. Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like "Reverend John Q. Public III". @param names name values to format, in place