承接 reptily/php-image-diff 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

reptily/php-image-diff

最新稳定版本:1.0.0

Composer 安装命令:

composer require reptily/php-image-diff

包简介

Compares the image

README 文档

README

composer require reptily/php-image-diff

Example

  1. A simple example for determining the difference between two images.

First image

Second image

<?php

require __DIR__ . '/vendor/autoload.php';

$image = new ImageDiff\Compares("1.png", "2.png");
try {
    $image->Diff();
    $image->getDiffImage("diff.png");
} catch (Exception $e) {
    var_dump($e);
}

Result image compares

  1. An example for cameras saw surveillance. Comparison sector definition.

First image

Second image

<?php

require __DIR__ . '/vendor/autoload.php';

$image = new ImageDiff\Compares("1m.png", "2m.png");
$area = (new ImageDiff\Model\Area())
    ->setPositionX(350)
    ->setPositionY(50)
    ->setSizeWidth(190)
    ->setSizeHeight(160)
;
try {
    $image->Diff(5.0, $area);
    $result = $image->Result();
    echo "Count all pixels: " . $result->getCountAllPixels() . "\n";
    echo "Count error pixels: " . $result->getCountErrorPixels() . "\n";
    echo "Error percentage: " . $result->getErrorPercentage() . "%\n";
    $image->getDiffImage("diff.png");
} catch (Exception $e) {
    var_dump($e);
}

Print result:

Count all pixels: 219375
Count error pixels: 6455
Error percentage: 2.9424501424501%

Result image compares

统计信息

  • 总下载量: 653
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固