Matrix

Top  Previous  Next

 

 

 

Overview

 

This node works by combining neighboring pixels together in a user defined way. How these pixels are combined is determined by what values you put in the "kernel." This kernel is made up of 9 numbers that you can specify, and are arranged in a circle. The number in the center of the circle represents the pixel in question, while the numbers around the edges represent neighboring pixels.

 

Following is an example of a very simple kernel:

 

 

0

0

0

0

1

0

0

0

0

 

 

For each pixel, the "1" in the middle means that 100% of the original pixel will be taken, while 0% of the neighboring pixels will be taken.  In other words, this kernel will leave the original image unchanged.

 

Following is a more interesting example:

 

 

0.11

0.11

0.11

0.11

0.12

0.11

0.11

0.11

0.11

 

 

This will cause the nearby values to bleed into each other, in other words, a blur. Each resulting pixel will be comprised of 12% of the corresponding source pixel, plus 11% of each of the source pixel's neighbors (totaling 100% so that original brightness is maintained).

 

A regular blur causes colors to bleed in all directions, while a motion blur causes colors to bleed in only one direction. This can be set up using a kernel such as the following:

 

 

0.00

0.00

0.00

0.33

0.34

0.33

0.00

0.00

0.00

 

 

In this case each resulting pixel will be composed of 34% of the corresponding source pixel, plus 33% the pixel to the left, plus 33% the pixel to the right.

 

Note that the matrix effects of most image processing packages arrange the kernel values in a rectangular fashion to facilitate specifying the specific nearby pixels to be weighted.  However, since Genetica textures are resolution-independent, striving to have kernel values line up with specific pixels is meaningless.  Therefore, instead of the traditional square kernel, the Matrix node's nine kernel values are arranged in a circle, allowing for more natural effects.

 

 

 

Inputs

 

The node's single input provides the image to be processed.

 

 

 

Properties

 

 

Property

Description

Kernel values

These nine values, arranged in a circular pattern, specify the relative weights of a pixel and its surrounding pixels.  For example, if the top value is set to 1, and the right value is to -1, then each pixel in the resulting image will equal the one above it minus the one to the right of it.

Balance Values button

Although not a property itself, this useful button will attempt to adjust the kernel values so that their sum equals 1.  Doing so helps prevent the resulting image from being lighter or darker than the original.

Radius

Since Genetica textures are resolution-independent, the concept of something being "one pixel away" is meaningless.  This value specifies how far away samples are taken from each other.

Angle

Changing this value will rotate the effective positions of the kernel values.  Adjustments to Angle are most noticeable when Radius is large or with asymmetrical kernel values.

Iterations

Interesting effects can be achieved by running an image through a matrix multiple times.  This can be done simply by increasing this value.

 

 

 


Page URL: http://www.spiralgraphics.biz/genetica/help/index.htm?matrix.htm