CImage:FiltSharpen


The FiltSharpen method increases the crispness, or local contrast, of the image.

Syntax

bResult = CImage:FiltSharpen( nOrder, CRect=nil )

bullet.gif    nOrder is the strength of the crispening process, in the range 0 to 10.

bullet.gif    CRect is the rectangle defining the area to process. If omitted, it defaults to nil and the entire image is processed.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This method increases the local contrast of the image by suppressing the diffuse component of the image. This has the effect of sharpening the image, making it "crisper" in appearance. The related FiltUnsharpMask method gives slightly less noise increase at the expense of slower performance compared with the present filter.

Example

Suppose an image is displayed in a CImageView named V. The following script applies a sharpening filter of order 3 (moderately strong) to the [100:300, 400:800] pixel region:

I = V:GetImage()

-- attach the current displayed image

R = new_rect(100,300,400,800)

-- setup the rectangle to process

I:FiltSharpen(3,R)

-- apply the filter

V:Update()

-- update the display after the scale

R:delete()

-- done with the CRect

Related Topics

CImage class, FiltUnsharpMask


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.