class Neighborhood implements FilterInterface

The Neighborhood filter takes a matrix and calculates the color current pixel based on its neighborhood.

Properties

protected Matrix $matrix

Methods

__construct(Matrix $matrix)

Initialize the instance.

apply(ImageInterface $image)

Applies scheduled transformation to an ImageInterface instance.

Details

at line 49
__construct(Matrix $matrix)

Initialize the instance.

Parameters

Matrix $matrix

at line 59
ImageInterface apply(ImageInterface $image)

Applies scheduled transformation to an ImageInterface instance.

Parameters

ImageInterface $image

Return Value

ImageInterface returns the processed ImageInterface instance

See also

FilterInterface::apply