HALCON Reference Manual 10.0.2
Name
texture_lawstexture_lawstexture_lawsTextureLawsTextureLaws — Filter an image using a Laws texture filter.
texture_lawstexture_lawstexture_lawsTextureLawsTextureLaws applies a texture transformations
(according to Laws) to an image. This is done by convolving the
input image with a special filter mask. The filters are:
9 different 3x3 matrices obtainable from the following three vectors:
l = [ 1 2 1 ],
e = [ -1 0 1 ],
s = [ -1 2 -1 ]
25 different 5x5 matrices obtainable from the following five vectors:
l = [ 1 4 6 4 1 ],
e = [ -1 -2 0 2 1 ],
s = [ -1 0 2 0 -1 ],
r = [ 1 -4 6 -4 1 ],
w = [ -1 2 0 -2 1 ]
36 different 7x7 matrices obtainable from the following six vectors:
l = [ 1 6 15 20 15 6 1 ],
e = [ -1 -4 -5 0 5 4 1 ],
s = [ -1 -2 1 4 1 -2 -1 ],
r = [ -1 -2 -1 4 -1 -2 1 ],
w = [ -1 0 3 0 -3 0 1 ],
o = [ -1 6 -15 20 -15 6 -1 ]
For most of the filters the resulting gray values must be modified
by a ShiftShiftShiftShiftshift. This makes the different textures in the
output image more comparable to each other, provided suitable
filters are used.
The name of the filter is composed of the letters of the two vectors
used, where the first letter denotes convolution in the column
direction while the second letter denotes convolution in the row
direction.
texture_lawstexture_lawstexture_lawsTextureLawsTextureLaws can be executed on OpenCL devices.
- Supports OpenCL compute devices.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
- Automatically parallelized on channel level.
- Automatically parallelized on domain level.
Images to which the texture transformation is
to be applied.
Desired filters (name or number).
Default value:
'el'
"el"
"el"
"el"
"el"
Suggested values: 'll'"ll""ll""ll""ll", 'le'"le""le""le""le", 'ls'"ls""ls""ls""ls", 'lr'"lr""lr""lr""lr", 'lw'"lw""lw""lw""lw", 'lo'"lo""lo""lo""lo", 'el'"el""el""el""el", 'ee'"ee""ee""ee""ee", 'es'"es""es""es""es", 'er'"er""er""er""er", 'ew'"ew""ew""ew""ew", 'eo'"eo""eo""eo""eo", 'sl'"sl""sl""sl""sl", 'se'"se""se""se""se", 'ss'"ss""ss""ss""ss", 'sr'"sr""sr""sr""sr", 'sw'"sw""sw""sw""sw", 'so'"so""so""so""so", 'rl'"rl""rl""rl""rl", 're'"re""re""re""re", 'rs'"rs""rs""rs""rs", 'rr'"rr""rr""rr""rr", 'rw'"rw""rw""rw""rw", 'ro'"ro""ro""ro""ro", 'wl'"wl""wl""wl""wl", 'we'"we""we""we""we", 'ws'"ws""ws""ws""ws", 'wr'"wr""wr""wr""wr", 'ww'"ww""ww""ww""ww", 'wo'"wo""wo""wo""wo", 'ol'"ol""ol""ol""ol", 'oe'"oe""oe""oe""oe", 'os'"os""os""os""os", 'or'"or""or""or""or", 'ow'"ow""ow""ow""ow", 'oo'"oo""oo""oo""oo"
Shift to reduce the gray value dynamics.
Default value: 2
List of values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Size of the filter kernel.
Default value: 5
List of values: 3, 5, 7
* Two-dimensional pixel classification
read_image(Image,'combine')
open_window(0,0,-1,-1,'root','visible','',WindowHandle)
disp_image(Image,WindowHandle)
texture_laws(Image,Texture1,'es',2,5)
texture_laws(Image,Texture2,'le',2,5)
mean_image(Texture1,H1,51,51)
mean_image(Texture2,H2,51,51)
fwrite_string(FileId,'mark desired image section')
fnew_line(FileId)
set_color(WindowHandle,'green')
draw_region(Region,WindowHandle)
reduce_domain(H1,Region,Foreground1)
reduce_domain(H2,Region,Foreground2)
histo_2dim(Region,Foreground1,Foreground2,Histo)
threshold(Histo,Characteristic_area,1,1000000)
set_color(WindowHandle,'blue')
disp_region(Characteristic_area,WindowHandle)
class_2dim_sup(H1,H2,Characteristic_area,Seg)
set_color(WindowHandle,'red')
disp_region(Seg,WindowHandle)
/* Two-dimensional pixel classification */
read_image(&Image,"combine");
open_window(0,0,-1,-1,"root","visible","",&WindowHandle);
disp_image(Image,WindowHandle);
texture_laws(Image,&Texture1,"es",2,5);
texture_laws(Image,&Texture2,"le",2,5);
mean_image(Texture1,&H1,51,51);
mean_image(Texture2,&H2,51,51);
fwrite_string(FileId,"mark desired image section");
fnew_line(FileId);
set_color(WindowHandle,"green");
draw_region(&Region,WindowHandle);
reduce_domain(H1,Region,&Foreground1);
reduce_domain(H2,Region&,Foreground2);
histo_2dim(Region,Foreground1,Foreground2,&Histo);
threshold(Histo,&Characteristic_area,1.0,1000000.0);
set_color(WindowHandle,"blue");
disp_region(Characteristic_area,WindowHandle);
class_2dim_sup(H1,H2,Characteristic_area,&Seg);
set_color(WindowHandle,"red");
disp_region(Seg,WindowHandle);
* Two-dimensional pixel classification
read_image(Image,'combine')
open_window(0,0,-1,-1,'root','visible','',WindowHandle)
disp_image(Image,WindowHandle)
texture_laws(Image,Texture1,'es',2,5)
texture_laws(Image,Texture2,'le',2,5)
mean_image(Texture1,H1,51,51)
mean_image(Texture2,H2,51,51)
fwrite_string(FileId,'mark desired image section')
fnew_line(FileId)
set_color(WindowHandle,'green')
draw_region(Region,WindowHandle)
reduce_domain(H1,Region,Foreground1)
reduce_domain(H2,Region,Foreground2)
histo_2dim(Region,Foreground1,Foreground2,Histo)
threshold(Histo,Characteristic_area,1,1000000)
set_color(WindowHandle,'blue')
disp_region(Characteristic_area,WindowHandle)
class_2dim_sup(H1,H2,Characteristic_area,Seg)
set_color(WindowHandle,'red')
disp_region(Seg,WindowHandle)
* Two-dimensional pixel classification
read_image(Image,'combine')
open_window(0,0,-1,-1,'root','visible','',WindowHandle)
disp_image(Image,WindowHandle)
texture_laws(Image,Texture1,'es',2,5)
texture_laws(Image,Texture2,'le',2,5)
mean_image(Texture1,H1,51,51)
mean_image(Texture2,H2,51,51)
fwrite_string(FileId,'mark desired image section')
fnew_line(FileId)
set_color(WindowHandle,'green')
draw_region(Region,WindowHandle)
reduce_domain(H1,Region,Foreground1)
reduce_domain(H2,Region,Foreground2)
histo_2dim(Region,Foreground1,Foreground2,Histo)
threshold(Histo,Characteristic_area,1,1000000)
set_color(WindowHandle,'blue')
disp_region(Characteristic_area,WindowHandle)
class_2dim_sup(H1,H2,Characteristic_area,Seg)
set_color(WindowHandle,'red')
disp_region(Seg,WindowHandle)
* Two-dimensional pixel classification
read_image(Image,'combine')
open_window(0,0,-1,-1,'root','visible','',WindowHandle)
disp_image(Image,WindowHandle)
texture_laws(Image,Texture1,'es',2,5)
texture_laws(Image,Texture2,'le',2,5)
mean_image(Texture1,H1,51,51)
mean_image(Texture2,H2,51,51)
fwrite_string(FileId,'mark desired image section')
fnew_line(FileId)
set_color(WindowHandle,'green')
draw_region(Region,WindowHandle)
reduce_domain(H1,Region,Foreground1)
reduce_domain(H2,Region,Foreground2)
histo_2dim(Region,Foreground1,Foreground2,Histo)
threshold(Histo,Characteristic_area,1,1000000)
set_color(WindowHandle,'blue')
disp_region(Characteristic_area,WindowHandle)
class_2dim_sup(H1,H2,Characteristic_area,Seg)
set_color(WindowHandle,'red')
disp_region(Seg,WindowHandle)
texture_lawstexture_lawstexture_lawsTextureLawsTextureLaws returns 2 (H_MSG_TRUE) if all parameters are correct.
If the input is empty the behaviour can be set via
set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If
necessary, an exception is raised.
mean_imagemean_imagemean_imageMeanImageMeanImage,
binomial_filterbinomial_filterbinomial_filterBinomialFilterBinomialFilter,
gauss_imagegauss_imagegauss_imageGaussImageGaussImage,
median_imagemedian_imagemedian_imageMedianImageMedianImage,
histo_2dimhisto_2dimhisto_2dimHisto2dimHisto2dim,
learn_ndim_normlearn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNorm,
learn_ndim_boxlearn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBox,
thresholdthresholdthresholdThresholdThreshold
convol_imageconvol_imageconvol_imageConvolImageConvolImage
class_2dim_supclass_2dim_supclass_2dim_supClass2dimSupClass2dimSup,
class_ndim_normclass_ndim_normclass_ndim_normClassNdimNormClassNdimNorm
Laws, K.I. “Textured image segmentation”;
Ph.D. dissertation, Dept. of Engineering,
Univ. Southern California, 1980
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |