BorderDetection
extends Neighborhood
in package
implements
FilterInterface
BorderDetection based on Laplace-Operator. Three different variants are offered:.
.
First Second Third
0, 1, 0 1, 1, 1, -1, 2, -1,
1, -4, 1 and 1, -8, 1, and 2, -4, 2,
0, 1, 0 1, 1, 1 -1, 2, -1
Consider to apply this filter on a grayscaled image.
Table of Contents
Interfaces
- FilterInterface
- Interface for imagine filters.
Constants
- VARIANT_ONE = 0
- First variant of the detection matrix.
- VARIANT_THREE = 2
- Third variant of the detection matrix.
- VARIANT_TWO = 1
- Second variant of the detection matrix.
Properties
Methods
- __construct() : mixed
- Initialize this filter.
- apply() : ImageInterface
- Applies scheduled transformation to an ImageInterface instance.
Constants
VARIANT_ONE
First variant of the detection matrix.
public
int
VARIANT_ONE
= 0
VARIANT_THREE
Third variant of the detection matrix.
public
int
VARIANT_THREE
= 2
VARIANT_TWO
Second variant of the detection matrix.
public
int
VARIANT_TWO
= 1
Properties
$matrix
protected
Matrix
$matrix
Methods
__construct()
Initialize this filter.
public
__construct([int $variant = self::VARIANT_ONE ]) : mixed
Parameters
- $variant : int = self::VARIANT_ONE
-
One of the BorderDetection::VARIANT_... constants.
Tags
apply()
Applies scheduled transformation to an ImageInterface instance.
public
apply(ImageInterface $image) : ImageInterface
Parameters
- $image : ImageInterface
Tags
Return values
ImageInterface —returns the processed ImageInterface instance