You are here: Start » AVL.NET » AVL.SharpenImage(AvlNet.Image, float, AvlNet.SmoothImageMeanKernel, int, int?, AvlNet.Image)

AVL.SharpenImage(AvlNet.Image, float, AvlNet.SmoothImageMeanKernel, int, int?, AvlNet.Image)

Enhances contrast of an image so that it appears sharper.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void SharpenImage(
	AvlNet.Image inImage,
	float inContrastFactor,
	AvlNet.SmoothImageMeanKernel inKernel,
	int inRadiusX,
	int? inRadiusY,
	out AvlNet.Image outImage
)

Parameters

inImage
Type: AvlNet.Image
Input image
inContrastFactor
Type: System.Single
Value representing the strength of the contrast enhancement
inKernel
Type: AvlNet.SmoothImageMeanKernel
Kernel shape
inRadiusX
Type: System.Int32
Nearly half of the kernel's width (2*R+1)
inRadiusY
Type: System.Nullable<System.Int32>
Nearly half of the kernel's height (2*R+1), or same as inRadiusX, or null.
outImage
Type: AvlNet.Image
Output image

Description

This filter increases the contrast of the image by multiplying by inContrastFactor the difference between a pixel value and its corresponding pixel value in the smoothed input image:

\[ \begin{aligned} outImage[i,j] &= inImage[i,j] + inContrastFactor \times (inImage[i,j] - smoothedImage[i,j]) \\ \end{aligned} \]

Examples

SharpenImage run on example image with inContrastFactor = 2.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

Hardware acceleration settings may be manipulated with Settings class.

Errors

Error type Description
DomainError Not supported kernel on input in SharpenImage.

See also