2.8.7 filter2

Menu Information

Analysis: Mathematics: Custom Filter (Activate a Matrix)

Brief Information

Apply custom filter to a matrix

Command Line Usage

1. filter2 im:=MSource flt:=MFilter;

2. filter2 im:=MSource flt:=MFilter pad:=map

3. filter2 im:=MSource flt:=MFilter norm:=0

4. filter2 im:=MSource flt:=MFilter om:=MOutput

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Matrix im

Input

MatrixObject

<active>

The input Matrix object.

Filter Matrix flt

Input

MatrixObject

<unassigned>

The filter matrix object.

Padding Option pad

Input

int

zero

Pad cells outside the borders by:
Option list

  • zero:ZeroPadding
    Pad with zeroes
  • map:MapPadding
    Map the corresponding inside cell values to outside.
  • repeat:RepeatPadding
    Repeat edge values
Normalize norm

Input

int

1

Whether or not to normalize replacement value with weight of filter. 0 = NO; 1 = Yes.

Output Matrix om

Output

MatrixObject

<new>

The output matrix object.

See the syntax here.


Examples

  1. Select File: New from the Origin menu to bring up the New dialog. With the file type list, select Matrix .
  2. Click OK to create a new matrix.
  3. Enter data in matrix cells.
  4. Select Analysis: Mathematics:Custom Filter from the Origin menu to open the filter2 dialog.
  5. Select source data range into Input Matrix and filter data range into Filter Matrix.
  6. select ZeroPadding from the Padding Option drop-down list.
  7. Click OK to perform the matrix filter.

More Information

Please refer to this page in the User Guide for more information:

  • Description
  • Algorithm

Related X-Functions

medianflt2, specialflt2