2017 © Pedro Peláez
 

library sobel-operator

PHP implementation of Sobel operator (Sobel filter)

image

qmegas/sobel-operator

PHP implementation of Sobel operator (Sobel filter)

  • Tuesday, February 28, 2017
  • by qmegas
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 100 % Grown

The README.md

Sobel operator

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, (*1)

Installation

composer require qmegas/sobel-operator

Requirements

PHP >= 7.0, (*2)

Usage Examples

<?php

$sobel = new \Qmegas\SobelOperator();
$image = imagecreatefromjpeg('1.jpg');
header('Content-type: image/png');
imagepng($sobel->applyFilter($image));

, (*3)

Options

Parameter Description
flat Enables flat mode
threshold Set threshold manually. In case that parameter is not set, algorithm choose threshold automatically
return_threshold Return an array of two elements. First one is an image with Sobel filter applied, second element is value of applied threshold
<?php

$sobel = new \Qmegas\SobelOperator();
$image = imagecreatefromjpeg('1.jpg');
header('Content-type: image/png');
imagepng($sobel->applyFilter($image, [
    'flat' => true,
    'threshold' => 30,
]));

, (*4)

The Versions

28/02 2017

dev-master

9999999-dev

PHP implementation of Sobel operator (Sobel filter)

  Sources   Download

MIT

The Requires

  • php >=7.0

 

sobel filter sobel operator

28/02 2017

1.0.0

1.0.0.0

PHP implementation of Sobel operator (Sobel filter)

  Sources   Download

MIT

The Requires

  • php >=7.0

 

sobel filter sobel operator