Package boofcv.alg.fiducial.qrcode
Class QrCode
java.lang.Object
boofcv.alg.fiducial.qrcode.QrCode
- All Implemented Interfaces:
Cloneable
Information for a detected QR Code.
Position Patterns (PP) have their vertices CCW order. The polygons are oriented such that the following sides are paired: ppCorner[1,2] paired ppRight[3,0] and ppCorner[2,3] paired ppDown[0,1].
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInformation related to a specific alignment pattern.static classSpecifies the format for a data block.static enumError correction levelstatic enumSpecifies the step at which decoding failedstatic enumThe encoding mode.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionAlignment pattern informationbooleanTrue if the QR code was incorrectly encoded and the bits are transposed.Approximate bounding box for QR-Code.Which string encoding was used decoding aQrCode.Mode.BYTEmessage.byte[]Raw byte data after error correction has been applied to it.Level of error correctionSpecifies where the QR code parsing failedstatic final intMask that's applied to format information when encodingA homography transform from grid bit coordinates into image pixels.static final List<Point2D_I32>[]Location of data bits in the code qr for each version.Which masking pattern is appliedstatic final intMaximum possible version of a QR CodeIf applicable the message is decoded into a sequence of characters.QR encoding modeThe finder pattern that is composed of the 3 position patterns.byte[]The raw byte data encoded into the QR Code.doublelocally computed binary threshold at each position patterndoublelocally computed binary threshold at each position patterndoublelocal threshold from bottom-right corner of QR code.doublelocally computed binary threshold at each position patternintNumber of bit errors detected when apply error correction to the messageintwhich version of QR code was found.static final intThe QR code version after which and including version information is encoded into the QR codestatic final QrCode.VersionInfo[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intintvoidreset()Resets the QR-Code so that it's in its initial state.Sets 'this' so that it's equivalent to 'o'.static inttotalModules(int version)
-
Field Details
-
FORMAT_MASK
public static final int FORMAT_MASKMask that's applied to format information when encoding- See Also:
-
MAX_VERSION
public static final int MAX_VERSIONMaximum possible version of a QR Code- See Also:
-
VERSION_ENCODED_AT
public static final int VERSION_ENCODED_ATThe QR code version after which and including version information is encoded into the QR code- See Also:
-
VERSION_INFO
-
LOCATION_BITS
Location of data bits in the code qr for each version. Precomputed for speed. -
ppRight
The finder pattern that is composed of the 3 position patterns. Orientation of corners in each position pattern goes in clockwise direction (when viewed in an image, CCW mathematically) 0 = top left, 1 = top right, 2 = bottom right, 3 = bottom left. -
ppCorner
-
ppDown
-
threshRight
public double threshRightlocally computed binary threshold at each position pattern -
threshCorner
public double threshCornerlocally computed binary threshold at each position pattern -
threshDown
public double threshDownlocally computed binary threshold at each position pattern -
threshDownRight
public double threshDownRightlocal threshold from bottom-right corner of QR code. Computed from local neighborhood -
version
public int versionwhich version of QR code was found. 1 to 40 -
error
Level of error correction -
mask
Which masking pattern is applied -
alignment
Alignment pattern information -
mode
QR encoding mode -
byteEncoding
Which string encoding was used decoding aQrCode.Mode.BYTEmessage. If there is no BYTE encoding then this will be an empty string. If there are multiple independent BYTE segments then this will be the first one encountered. -
rawbits
public byte[] rawbitsThe raw byte data encoded into the QR Code. data + ecc -
corrected
public byte[] correctedRaw byte data after error correction has been applied to it. Only contains the data portion. -
message
If applicable the message is decoded into a sequence of characters. -
failureCause
Specifies where the QR code parsing failed -
bounds
Approximate bounding box for QR-Code. The bottom right corner is estimated by intersecting lines and should not be used in SFM applications. Order: top-left = 0. Top-right = 1, Bottom-Right = 2, Bottom-Left = 3. -
Hinv
A homography transform from grid bit coordinates into image pixels. -
totalBitErrors
public int totalBitErrorsNumber of bit errors detected when apply error correction to the message -
bitsTransposed
public boolean bitsTransposedTrue if the QR code was incorrectly encoded and the bits are transposed. If this is true then the position patterns are stored in a transposed order. Bounds will not be affected.
-
-
Constructor Details
-
QrCode
public QrCode()
-
-
Method Details
-
getNumberOfModules
public int getNumberOfModules() -
getNumberOfDataBytes
public int getNumberOfDataBytes() -
totalModules
public static int totalModules(int version) -
reset
public void reset()Resets the QR-Code so that it's in its initial state. -
clone
-
setTo
Sets 'this' so that it's equivalent to 'o'.- Parameters:
o- The target object
-