Download the PHP package alkauni/planogrid without Composer

On this page you can find all versions of the php package alkauni/planogrid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package planogrid

Planogrid (alkauni/planogrid)

PHP Version

๐ŸŒ Languages: Bahasa Indonesia


Planogrid is a high-performance, framework-agnostic standalone PHP package designed for 2D Planogram Spatial Grid Sorting (Row x Column) and Output Image Generation (Bounding Box & Label Annotations) powered by AI detection results (such as AWS Rekognition Custom Labels or Vision AI).

Built purely with PHP 8.1+, it has zero framework dependencies and implements the Strategy Pattern with 6 spatial sorting algorithms to solve real-world shelf layout challenges (perspective tilt, varying product heights, chained vertical drift, physical shelf gap detection, etc.).


๐Ÿ“Œ Key Features


๐Ÿ’ป Minimum Requirements


๐Ÿš€ Installation

Install the package via Composer:


๐Ÿ“– Usage Guide

1. Spatial Grid Sorting (process)


2. Full Verification & Image Annotation (verify)


๐Ÿ“Š Comparison of 6 Spatial Sorting Strategies

Strategy Class Name Core Algorithm Detailed Guide Recommended Use Case
Strategy 0 SequentialDeltaStrategy Sequential delta diffRangeValue >= minHeight ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia Fast & simple default
Strategy 1 BaselineAnchorStrategy Anchor initial top position + height multiplier ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia Long rows to prevent cumulative drift
Strategy 2 CenterYOverlapStrategy Center-Y vertical overlap range ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia Mixing tall bottles & short boxes on same shelf
Strategy 3 SpatialClusterStrategy 1D Center-Y density clustering ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia Tilted photos / camera perspective skew
Strategy 4 VerticalIoUStrategy 1D Vertical Intersection over Union (IoU >= 0.40) ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia Objective Computer Vision standard metric
Strategy 5 ShelfProjectionStrategy 1D vertical density histogram gap projection ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia Segmenting products by physical shelf dividers

๐ŸŽจ Image Annotator Customization

Customize bounding box colors, font size, custom TTF fonts, and labels via ImageAnnotationConfig:


๐Ÿ“š Complete API Reference

1. PlanogramProcessor (Main Facade)

The primary entrypoint class to control spatial grid sorting, template matching, and image annotations.

Method Signature Description Return Type
setRowStrategy(RowSortingStrategyInterface $strategy) Configures active row sorting strategy (Strategy 0 to 5). static
setThresholdScore(float $score) Sets compliance score passing percentage threshold (default 100.0). static
setImageConfig(ImageAnnotationConfig $config) Configures visual bounding box drawing & font options. static
process(array $customLabels, float $imageWidth = 1.0, float $imageHeight = 1.0) Executes 2D spatial grid sorting and returns sorted matrix. PlanogramGridResult
verify(mixed $imageBinary, array $customLabels, ?PlanogramTemplate $expectedTemplate = null, float $imageWidth = 1.0, float $imageHeight = 1.0) Executes complete verification workflow: sorting, template matching, and image annotation. PlanogramEvaluation
annotate(mixed $imageBinary, array $customLabels, array $matchStatuses = [], float $imageWidth = 1.0, float $imageHeight = 1.0) Annotates image binary with bounding boxes & brand tags without template matching. string (PNG binary)

2. PlanogramGridResult (Spatial Matrix Result DTO)

Method Signature Description Return Type
getResultGeometry() Returns 2D matrix of sorted pixel coordinates [row][col] (name, top, left, height, width). array
getResult() Returns 2D brand label matrix [row][Brand 1, Brand 2, ...]. array
toArray() Returns combined result_geometry and result arrays. array
toJson(int $options = JSON_PRETTY_PRINT) Converts matrix result to formatted JSON string. string

3. PlanogramEvaluation (Evaluation Result DTO)

Method Signature Description Return Type
isCorrect() Checks if planogram verification passed (true if score >= threshold). bool
getComplianceScore() Returns planogram compliance score percentage (0.0% to 100.0%). float
getStatus() Returns verification status string ("correct" or "incorrect"). string
getMatchedCount() Returns count of items successfully matched with target template. int
getDetectedMatrix() Returns detected matrix structure. array
getAnnotatedImage() Returns annotated PNG image binary stream. ?string
toArray() Converts evaluation result and mismatch list to array. array

4. ImageAnnotationConfig (Image Drawing Config DTO)


โšก Laravel Integration (Optional)

The package automatically registers its ServiceProvider via package auto-discovery in Laravel projects.

Publishing Optional Config File:

To customize default settings centrally across your Laravel application, publish the config file:

This creates a new configuration file at config/planogrid.php.

Usage in Laravel Controller:


๐Ÿงช Running Tests

Execute unit and integration tests via PHPUnit:


๐Ÿ“œ License

This package is open-sourced software licensed under the MIT License.


All versions of planogrid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
intervention/image Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alkauni/planogrid contains the following files

Loading the files please wait ...