PHP code example of mgrechanik / image-points-searcher
1. Go to this page and download the library: Download mgrechanik/image-points-searcher library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mgrechanik / image-points-searcher example snippets
$imageResult = new \mgrechanik\imagepointssearcher\ImageResult($searcher);
// We can set colors
$imageResult->setLabelsColor(1, 14, 230);
$imageResult->setLinesColor(255, 33, 73);
$imageResult->setMarginsColor(255, 106, 0);
// Draw default labels
$imageResult->drawLabels();
// Draw labels with the text we want
$imageResult->drawLabels(function($key, $point) { return "{$point['x']},{$point['y']}";});
// Draw borders of the points we found
$imageResult->drawMargins();
// Draw the path between points
$imageResult->drawPath([2,9,20,28,41,48,44]);
// Save the result as the image. See Demo.
$imageResult->save('./images/result.jpg');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.