Back to Adaptive 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
inImage const Image& Input mono image.
inRoi Optional<const Region&> NIL Region of Interest.
inVerticalFilter const LawsFilterType::Type Level Vertical part of filter.
inHorizontalFilter const LawsFilterType::Type Edge Horizontal part of filter.
inFilterSize const LawsFilterSize::Type Filter window size.
inMacroBlockSize const int 3 - 15 Macroblock is used to gather generated texture energy.
inNormalizeLocalContrast const bool False Whether to normalize image before processing.
outTextureImage Image& Filtered image.
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.