TAlignmentPatternFinder Class
Definition
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.
type TAlignmentPatternFinder = class(TObject)
- Inheritance
-
TObjectTAlignmentPatternFinder
Constructors
| Create(TBitMatrix, Integer, Integer, Integer, Integer, Single, TResultPointCallback) |
Creates a finder that will look in a portion of the whole image. |
| Destroy |
Methods
| centerFromEnd(TArray<Integer>, Integer) |
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. |
| crossCheckVertical(Integer, Integer, Integer, Integer) |
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. |
| find |
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. |
| foundPatternCross(TArray<Integer>) | |
| handlePossibleCenter(TArray<Integer>, Integer, Integer) |
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. |