![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Apply Law's texture 2d filter on an image. More...
Apply Law's texture 2d filter on an image.
Law's texture filter generates texture features to quantify the perceived 2D textures of an image.
Law's texture 2D filter involves the following steps:
filter the neighborhood by applying convolutions with the 15 5x5 Law's masks; Law's masks are built from 4 1D kernels:




First letters of the names of these 1D kernels respectively stand for:
The 15 5x5 Law's masks are obtained by multiplying the 4 1D kernels with their 5 transpose kernels (the 16th, L5L5, is not computed, because it's only a smoothing mask and it does not contain any real texture information). For instance, one of the 15 masks, E5L5, is computed as follows:

The 15 5x5 Law's masks are named as follows: 
All these masks are zero-sum masks.
Compute the 9 final energy maps, in order:









Each pair is replaced with the average of the 2 images.
Resulting energy maps are concatenated in the output sequence image in the order specified above. Most of the time, only a subset of the 9 energy maps are interesting. The user has the possibility to specify this subset by appropriately initializing a ipsdk::imaproc::attr::LawTextureKernel2dTypes data-item and passing it as argument of lawTexture2dImg function. Then only the maps of this subset will be calculated by the algorithm and returned to the user.
Here is an example of a Law's 2D Texture Filter computation applied on a 8 bits grey level image with the default parameters:
Attribute description for algorithm :
| Name | ToolTip | Default Initializer |
|---|---|---|
| ipsdk::imaproc::attr::InSingleImg | [Input] single image | X |
| ipsdk::imaproc::attr::InOptLawTextureKernel2dTypes | [Input Optional] Types of 2d kernels for Law's texture computation | X |
| ipsdk::imaproc::attr::InOptLawTexPreProcParams | [Input Optional] Parameters for Law's texture filter input image pre-process phasis | X |
| ipsdk::imaproc::attr::InOptLawTexPostProcParams | [Input Optional] Parameters for Law's texture filter input image post-process phasis | X |
| ipsdk::imaproc::attr::OutRealImg | [Output] image for processing operation (data contained in image buffer are reals) | customOutput (_pOutRealImg, outputLawTexture2d(_pInSingleImg,_pInOptLawTextureKernel2dTypes)) |
| ipsdk::imaproc::attr::OutWk1RealImg | [Output] Temporary working image for algorithm | ipsdk::imaproc::duplicateInOut (_pOutWk1RealImg, _pInSingleImg, ipsdk::image::eImageBufferType::eIBT_Real32) |
| ipsdk::imaproc::attr::OutOptWk1RealImg | [Output Optional] Temporary working image for algorithm (data contained in image buffer are reals) | X |
| ipsdk::imaproc::attr::OutOptWk2RealImg | [Output Optional] Temporary working image for algorithm (data contained in image buffer are reals) | X |
Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInSingleImg,_pOutWk1RealImg) &&
(ipsdk::processor::ifIsSet (_pOutOptWk1RealImg,
ipsdk::imaproc::matchSize (_pInSingleImg,_pOutOptWk1RealImg))) &&
(ipsdk::processor::ifIsSet (_pOutOptWk2RealImg,
ipsdk::imaproc::matchSize (_pInSingleImg,_pOutOptWk2RealImg)))
| IPSDKIPLSTATS_API image::ImagePtr ipsdk::imaproc::stats::lawTexture2dImg | ( | const image::ImageConstPtr & | pInImg | ) |
wrapper function for Apply Law's texture 2d filter on an image
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLSTATS_API image::ImagePtr ipsdk::imaproc::stats::lawTexture2dImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipsdk::imaproc::attr::LawTextureKernel2dTypesConstPtr & | pInKernelTypes, | ||
| const ipsdk::imaproc::attr::LawTexPreProcParamsConstPtr & | pInPreProcParams, | ||
| const ipsdk::imaproc::attr::LawTexPostProcParamsConstPtr & | pInPostProcParams | ||
| ) |
wrapper function for Apply Law's texture 2d filter on an image
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLSTATS_API void ipsdk::imaproc::stats::lawTexture2dImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipsdk::imaproc::attr::LawTextureKernel2dTypesConstPtr & | pInKernelTypes, | ||
| const ipsdk::imaproc::attr::LawTexPreProcParamsConstPtr & | pInPreProcParams, | ||
| const ipsdk::imaproc::attr::LawTexPostProcParamsConstPtr & | pInPostProcParams, | ||
| const image::ImagePtr & | pOutRealImg, | ||
| const image::ImagePtr & | pOutWkImg | ||
| ) |
wrapper function for Apply Law's texture 2d filter on an image
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
1.8.14