2.6.6.7 imgSharpen

Menu Information

Sharpen

Brief Information

Increase or decrease image sharpness

Command Line Usage

1. imgSharpen s:=20;

2. imgSharpen s:=-20 img:=mat(1) oimg:=mat(2);

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
Sharpness s

Input

int

0

Specifies the amount of sharpness change. Valid values range from -1000 to +1000. A negative value will cause the sharpness to be decreased, while a positive value will result in a increase of sharpness.

Input Matrix img

Input

Image

<active>

Specifies the source image to be manipulated. The default input is the active image.

Output Image oimg

Output

Image

<input>

Specifies the output image. By default, the output image is the same as the input image.

See the syntax here.

Description

The imgSharpen function increases or decreases the sharpness of the image in the input image.

Examples

In this example, we use the imgSharpen function to increase the sharpness of the input image:

  1. When the image is active, select Image: Spatial Filters: Sharpen to open the dialog of the X-Function.
  2. In the dialog, change the settings as the screenshot below and click OK to close the dialog.
    ImgSharpen help English files image002.jpg
    A new image is created. We can see that the leaf veins in the output image are easier to be identified than in the input image.
ImgSharpen help English files image004.jpg
ImgSharpen help English files image006.jpg
The original image
The output image


Algorithm

The computation uses L_SharpenBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_SharpenBitmap topic.

References

LEADTOOLS Main API Help file, Version 14

Related X-Functions

imgUnsharpmask, imgUserfilter