Menu

## FinderPattern extends ResultPoint
in package

FinderPattern.php : 23

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.

##### Tags

author

  Sean Owen

### Table of Contents

$estimatedModuleSize : float
$x : float
$y : float
$count : int
__construct() : mixed
aboutEquals() : bool
  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.
combineEstimate() : self
  Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new FinderPattern containing a weighted average based on count.
distance() : float
getCount() : int
getDistance() : float
getEstimatedModuleSize() : float
getSquaredDistance() : float
  Get square of distance between a and b.
getX() : float
getY() : float
squaredDistance() : float

### Properties

#### $estimatedModuleSize

ResultPoint.php : 26
`protected float $estimatedModuleSize`

#### $x

ResultPoint.php : 24
`protected float $x`

#### $y

ResultPoint.php : 25
`protected float $y`

#### $count

FinderPattern.php : 25
`private int $count`

### Methods

#### __construct()

FinderPattern.php : 30
`public __construct(float $posX, float $posY, float $estimatedModuleSize[, int $count = null ]) : mixed`

##### Parameters

$posX : float
$posY : float
$estimatedModuleSize : float
$count : int = null

##### Return values

mixed —

#### aboutEquals()

ResultPoint.php : 62

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.

`public aboutEquals(float $moduleSize, float $i, float $j) : bool`

##### Parameters

$moduleSize : float
$i : float
$j : float

##### Return values

bool —

#### combineEstimate()

FinderPattern.php : 64

Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new FinderPattern containing a weighted average based on count.

`public combineEstimate(float $i, float $j, float $newModuleSize) : self`

##### Parameters

$i : float
$j : float
$newModuleSize : float

##### Return values

self —

#### distance()

FinderPattern.php : 88
`public static distance(float $aX, float $aY, float $bX, float $bY) : float`

##### Parameters

$aX : float
$aY : float
$bX : float
$bY : float

##### Return values

float —

#### getCount()

FinderPattern.php : 39
`public getCount() : int`

##### Return values

int —

#### getDistance()

FinderPattern.php : 48
`public getDistance(FinderPattern $b) : float`

##### Parameters

$b : FinderPattern

  second pattern

##### Return values

float —

distance between two points

#### getEstimatedModuleSize()

ResultPoint.php : 54
`public getEstimatedModuleSize() : float`

##### Return values

float —

#### getSquaredDistance()

FinderPattern.php : 55

Get square of distance between a and b.

`public getSquaredDistance(FinderPattern $b) : float`

##### Parameters

$b : FinderPattern

##### Return values

float —

#### getX()

ResultPoint.php : 40
`public getX() : float`

##### Return values

float —

#### getY()

ResultPoint.php : 47
`public getY() : float`

##### Return values

float —

#### squaredDistance()

FinderPattern.php : 78
`private static squaredDistance(float $aX, float $aY, float $bX, float $bY) : float`

##### Parameters

$aX : float
$aY : float
$bX : float
$bY : float

##### Return values

float —

## Search results