User Filter
Apply user-defined filter to image
This feature is for OriginPro only.
1. imgUserfilter fltm:=[Mbook4]Msheet1!Mat(1);
2. imgUserfilter fltm:=[Mbook4]Msheet1!Mat(1) offset:=2 dv :=10 type:=max;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input Matrix | img |
Input Image |
|
Specifies the source image to be manipulated. The default input is the active image. |
Output Image | oimg |
Output Image |
|
Specifies the output image. By default, the output image is the same as the input image. See the syntax here. |
Filter Matrix | fltm |
Input MatrixObject |
|
Specifies the matrix that represents the mask used for filtering. |
Offset | offset |
Input int |
|
Specifies a value used to offset the final result of the output. |
Divisor | dv |
Input int |
|
Specifies a value used to divide the final result of the output. |
Operation Type | type |
Input int |
|
Specifies the type of operation used to get the filtering output. Option list
|
Although OriginPro offers many manipulable tools to process images, user-defined spatial filters can process an image flexibly, allowing you to apply various effects on images.
The imgUserfilter function filters the input image using a user-defined mask. With this function, customer can create a user-defined spatial filter and apply it to the image. The selected filter is passed as a parameter to this function. The filter has a rectangular form (matrix) where the values are user-defined. It allows the creation of simple customized filters, where each value found in matrix is multiplied by the corresponding pixel, and then the specified operation is performed on the results.
In this example, we use the imgUserfilter function to apply a user-defined filter to the input image:
The computation uses L_UserFilterBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_UserFilterBitmap topic.
LEADTOOLS Main API Help file, Version 14