Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image Enhancement » SharpenImage

SharpenImage


Header: AVL.h
Namespace: avl
Module: FoundationLite

Enhances contrast of an image so that it appears sharper.

Applications: Use this filter only to improve human perception, not to preprocess an image for analysis.

Syntax

C++
C#
 
void avl::SharpenImage
(
	const avl::Image& inImage,
	float inContrastFactor,
	avl::KernelShape::Type inKernel,
	int inRadiusX,
	atl::Optional<int> inRadiusY,
	avl::Image& outImage
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input image
Input value inContrastFactor float 0.0 - 1.0f Value representing the strength of the contrast enhancement
Input value inKernel KernelShape::Type Kernel shape
Input value inRadiusX int 0 - 1 Nearly half of the kernel's width (2*R+1)
Input value inRadiusY Optional<int> 0 - NIL Nearly half of the kernel's height (2*R+1), or same as inRadiusX
Output value outImage 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.

This operation is optimized for SSE41 technology for pixels of type: UINT8.

This operation is optimized for AVX2 technology for pixels of type: UINT8.

This operation is optimized for NEON technology for pixels of type: UINT8.

This operation supports automatic parallelization for multicore and multiprocessor systems.