Feature: Labelprint für Kistenetiketten hinzugefügt

This commit is contained in:
2025-10-27 12:14:44 +01:00
parent 43bc416554
commit 14bae6c9ef
1068 changed files with 229014 additions and 1807 deletions
+17 -6
View File
@@ -25,6 +25,8 @@ use const NAN;
final class Detector{
private BitMatrix $matrix;
/** @var \chillerlan\QRCode\Detector\FinderPattern[] */
private array $finderPatterns = [];
/**
* Detector constructor.
@@ -33,11 +35,20 @@ final class Detector{
$this->matrix = (new Binarizer($source))->getBlackMatrix();
}
/**
* @return \chillerlan\QRCode\Detector\FinderPattern[]
*/
public function getFinderPatterns():array{
return $this->finderPatterns;
}
/**
* Detects a QR Code in an image.
*/
public function detect():BitMatrix{
[$bottomLeft, $topLeft, $topRight] = (new FinderPatternFinder($this->matrix))->find();
$this->finderPatterns = (new FinderPatternFinder($this->matrix))->find();
[$bottomLeft, $topLeft, $topRight] = $this->finderPatterns;
$moduleSize = $this->calculateModuleSize($topLeft, $topRight, $bottomLeft);
$dimension = $this->computeDimension($topLeft, $topRight, $bottomLeft, $moduleSize);
@@ -305,11 +316,11 @@ final class Detector{
*
*/
private function createTransform(
FinderPattern $nw,
FinderPattern $ne,
FinderPattern $sw,
int $size,
AlignmentPattern $ap = null
FinderPattern $nw,
FinderPattern $ne,
FinderPattern $sw,
int $size,
?AlignmentPattern $ap = null
):PerspectiveTransform{
$dimMinusThree = ($size - 3.5);