HumHub Documentation (unofficial)

Neighborhood
in package
implements FilterInterface

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

Tags
example

a, b, c
Matrix =  d, e, f
g, h, i

and color{i, j} the color of the pixel at position (i, j). It calculates the color of pixel (x, y) like that:

color (x, y) =   a * color(x - 1, y - 1) + b * color(x, y - 1) + c * color(x + 1, y - 1)
+ d * color(x - 1, y)     + e * color(x, y)     + f * color(x + 1, y)
+ g * color(x - 1, y + 1) + h * color(x, y + 1) + i * color(x + 1, y + 1)

Table of Contents

Interfaces

FilterInterface
Interface for imagine filters.

Properties

$matrix  : Matrix

Methods

__construct()  : mixed
Initialize the instance.
apply()  : ImageInterface
Applies scheduled transformation to an ImageInterface instance.

Properties

Methods


        
On this page

Search results