Back to Aurora Vision Library website

You are here: Start » Function Reference » Computer Vision » Texture Analysis » LawsFilter

LawsFilter


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Filters image with one of the classic LAWS filter.

Syntax

C++
C#
 
void avl::LawsFilter
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	const avl::LawsFilterType::Type inVerticalFilter,
	const avl::LawsFilterType::Type inHorizontalFilter,
	const avl::LawsFilterSize::Type inFilterSize,
	const int inMacroBlockSize,
	const bool inNormalizeLocalContrast,
	avl::Image& outTextureImage,
	avl::Image& outTextureEnergyImage
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input mono image.
Input value inRoi Optional<const Region&> NIL Region of Interest.
Input value inVerticalFilter const LawsFilterType::Type Level Vertical part of filter.
Input value inHorizontalFilter const LawsFilterType::Type Edge Horizontal part of filter.
Input value inFilterSize const LawsFilterSize::Type Filter window size.
Input value inMacroBlockSize const int 3 - 15 Macroblock is used to gather generated texture energy.
Input value inNormalizeLocalContrast const bool False Whether to normalize image before processing.
Output value outTextureImage Image& Filtered image.
Output value outTextureEnergyImage Image& Texture energy (AVG).

Requirements

For input inImage only pixel formats are supported: 1⨯uint8.

Read more about pixel formats in Image documentation.

Description

The operation applies texture filters to input image to obtain energy measures.
Laws filter types are: Level, Edge, Wave, Spot, Ripple, Oscillation and Undulation.

Examples

From left: sample image, applied Level and Wave filters, Spot and Edge, Spot and Ripple.

Errors

List of possible exceptions:

Error type Description
DomainError Laws filters can be applied to single channel images only.
DomainError Not supported inImage pixel format in LawsFilter. Supported formats: 1xUInt8.