qmegas / sobel-operator
PHP implementation of Sobel operator (Sobel filter)
1.0.0
2017-02-28 07:54 UTC
Requires
- php: >=7.0
This package is not auto-updated.
Last update: 2024-09-29 02:46:16 UTC
README
This is Sobel operator (or Sobel filter) implementation on PHP. It used in image processing and computer vision, particularly within edge detection algorithms. Read full article in Wikipedia
Installation
composer require qmegas/sobel-operator
Requirements
PHP >= 7.0
Usage Examples
<?php $sobel = new \Qmegas\SobelOperator(); $image = imagecreatefromjpeg('1.jpg'); header('Content-type: image/png'); imagepng($sobel->applyFilter($image));
Options
<?php $sobel = new \Qmegas\SobelOperator(); $image = imagecreatefromjpeg('1.jpg'); header('Content-type: image/png'); imagepng($sobel->applyFilter($image, [ 'flat' => true, 'threshold' => 30, ]));