LawsFilter
Filters image with one of the classic LAWS filter.
Syntax
C++
C#
Python
def LawsFilter( inImage: Image, outTextureImage: Image, outTextureEnergyImage: Image, /, *, inRoi: Region | None = None, inVerticalFilter: LawsFilterType = LawsFilterType.Level, inHorizontalFilter: LawsFilterType = LawsFilterType.Edge, inFilterSize: LawsFilterSize = LawsFilterSize._3x3, inMacroBlockSize: int = 15, inNormalizeLocalContrast: bool = False ) -> None
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input mono image. | ||
![]() |
inRoi | Region | None | None | Region of Interest. | |
![]() |
inVerticalFilter | LawsFilterType | LawsFilterType.Level | Vertical part of filter. | |
![]() |
inHorizontalFilter | LawsFilterType | LawsFilterType.Edge | Horizontal part of filter. | |
![]() |
inFilterSize | LawsFilterSize | LawsFilterSize._3x3 | Filter window size. | |
![]() |
inMacroBlockSize | int | 3 - ![]() |
15 | Macroblock is used to gather generated texture energy. |
![]() |
inNormalizeLocalContrast | bool | False | Whether to normalize image before processing. | |
![]() |
outTextureImage | Image | Filtered image. | ||
![]() |
outTextureEnergyImage | Image | Texture energy (AVG). |



