The plastimatch filter command is a convenient method for performing
common filters on images. This documentation is intended to explain
in more detail the mathematics and implementation of these filters.
Gabor
The Gabor filter is a complex filter, and has real and imaginary
components.
Plastimatch implements only a
uniform and symmetric form of the Gabor kernel,
which is described as:
System Message: WARNING/2 (S \cdot \mathrm{exp} \left( -\frac{|{\bf x}|^2}{\sigma^2} \right)
\cdot \mathrm{exp} \left( j \, \pi \omega {\bf k}^T {\bf x} \right)
)
latex exited with error
[stderr]
kpathsea: Running mktexfmt latex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /usr/share/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /root/.texlive2024/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /usr/share/texmf-var/web2c
mktexfmt [INFO]: --- remaking latex with pdftex
mktexfmt: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' ...
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (INITEX)
restricted \write18 enabled.
(/usr/share/texmf-dist/web2c/cp227.tcx)
entering extended mode
(/usr/share/texmf-dist/tex/latex/tex-ini-files/latex.ini
(/usr/share/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex)
(/usr/share/texmf-dist/tex/latex/base/latex.ltx
(/usr/share/texmf-dist/tex/latex/base/texsys.cfg)
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, parameters,
LaTeX2e <2023-11-01> patch level 1
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.ltx
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex)) hacks,
document commands, control, par, spacing, files, font encodings, lengths,
====================================
Local config file fonttext.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fonttext.cfg
(/usr/share/texmf-dist/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlenc.def)
(/usr/share/texmf-dist/tex/latex/base/omsenc.def)
(/usr/share/texmf-dist/tex/latex/base/ot1enc.def)
(/usr/share/texmf-dist/tex/latex/base/t1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/t1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmss.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmtt.fd)))
====================================
Local config file fontmath.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fontmath.cfg
(/usr/share/texmf-dist/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlcmm.fd)
(/usr/share/texmf-dist/tex/latex/base/omscmsy.fd)
(/usr/share/texmf-dist/tex/latex/base/omxcmex.fd)
(/usr/share/texmf-dist/tex/latex/base/ucmr.fd)))
====================================
Local config file preload.cfg used
=====================================
(/usr/share/texmf-dist/tex/latex/base/preload.cfg
(/usr/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref,
environments, center, verbatim, math definitions, boxes, title, sectioning,
contents, floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(/usr/share/texmf-dist/tex/generic/babel/hyphen.cfg
(/usr/share/texmf-dist/tex/generic/hyphen/hyphen.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/dumyhyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
! I can't find file `dehypht-x-2024-02-28.tex'.
<to be read again>
\relax
l.192 \repeat
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
<to be read again>
\relax
l.192 \repeat
No pages of output.
Transcript written on latex.log.
mktexfmt [INFO]: log file copied to: /usr/share/texmf-var/web2c/pdftex/latex.log
mktexfmt [ERROR]: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini >&2 </dev/null' return status: 1
mktexfmt [ERROR]: returning error due to option --strict
mktexfmt [INFO]: disabled formats: 3
mktexfmt [INFO]: not selected formats: 53
mktexfmt [INFO]: failed to build: 1 (pdftex/latex)
mktexfmt [INFO]: total formats: 57
mktexfmt [INFO]: exiting with status 1
[stdout]
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (preloaded format=latex)
restricted \write18 enabled.
I can't find the format file `latex.fmt'!
Where x is the voxel position (relative to the center of the kernel),
:sigma: is the filter width, and S is an arbitrary scaling factor.
The vector k is the direction of modulation, and the frequency of
modulation is given by :omega: . Note that
the vector k is internally normalized to be a unit vector
by plastimatch, so that larger k vectors do not increase
the modulation.
The value of k can be set manually, or can be selected according
to lie on a Fibanocci spiral. The Fibanocci spiral method is convenient
for choosing a set of k vectors that are approximately evenly
spaced on the unit sphere.
The values for :omega: and :sigma: can be interlinked. If :omega: is set,
but :sigma: is not set, or vice versa, the other will be set automatically
according to the following formula, which seems to work well:
System Message: WARNING/2 (\omega = 4.5 \cdot \sigma^2
)
latex exited with error
[stderr]
kpathsea: Running mktexfmt latex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /usr/share/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /root/.texlive2024/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /usr/share/texmf-var/web2c
mktexfmt [INFO]: --- remaking latex with pdftex
mktexfmt: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' ...
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (INITEX)
restricted \write18 enabled.
(/usr/share/texmf-dist/web2c/cp227.tcx)
entering extended mode
(/usr/share/texmf-dist/tex/latex/tex-ini-files/latex.ini
(/usr/share/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex)
(/usr/share/texmf-dist/tex/latex/base/latex.ltx
(/usr/share/texmf-dist/tex/latex/base/texsys.cfg)
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, parameters,
LaTeX2e <2023-11-01> patch level 1
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.ltx
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex)) hacks,
document commands, control, par, spacing, files, font encodings, lengths,
====================================
Local config file fonttext.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fonttext.cfg
(/usr/share/texmf-dist/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlenc.def)
(/usr/share/texmf-dist/tex/latex/base/omsenc.def)
(/usr/share/texmf-dist/tex/latex/base/ot1enc.def)
(/usr/share/texmf-dist/tex/latex/base/t1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/t1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmss.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmtt.fd)))
====================================
Local config file fontmath.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fontmath.cfg
(/usr/share/texmf-dist/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlcmm.fd)
(/usr/share/texmf-dist/tex/latex/base/omscmsy.fd)
(/usr/share/texmf-dist/tex/latex/base/omxcmex.fd)
(/usr/share/texmf-dist/tex/latex/base/ucmr.fd)))
====================================
Local config file preload.cfg used
=====================================
(/usr/share/texmf-dist/tex/latex/base/preload.cfg
(/usr/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref,
environments, center, verbatim, math definitions, boxes, title, sectioning,
contents, floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(/usr/share/texmf-dist/tex/generic/babel/hyphen.cfg
(/usr/share/texmf-dist/tex/generic/hyphen/hyphen.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/dumyhyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
! I can't find file `dehypht-x-2024-02-28.tex'.
<to be read again>
\relax
l.192 \repeat
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
<to be read again>
\relax
l.192 \repeat
No pages of output.
Transcript written on latex.log.
mktexfmt [INFO]: log file copied to: /usr/share/texmf-var/web2c/pdftex/latex.log
mktexfmt [ERROR]: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini >&2 </dev/null' return status: 1
mktexfmt [ERROR]: returning error due to option --strict
mktexfmt [INFO]: disabled formats: 3
mktexfmt [INFO]: not selected formats: 53
mktexfmt [INFO]: failed to build: 1 (pdftex/latex)
mktexfmt [INFO]: total formats: 57
mktexfmt [INFO]: exiting with status 1
[stdout]
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (preloaded format=latex)
restricted \write18 enabled.
I can't find the format file `latex.fmt'!
At the current time, only the real component of the Gabor filter is generated.
Gauss
The cannonical form for a Gaussian kernel is given as
System Message: WARNING/2 (\frac{1}{\sqrt{(2\pi)^2|\Sigma|}}
\cdot \mathrm{exp} \left( -\frac{1}{2}(x-\mu)^T \Sigma^{-1} (x-\mu) \right)
)
latex exited with error
[stderr]
kpathsea: Running mktexfmt latex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /usr/share/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /root/.texlive2024/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /usr/share/texmf-var/web2c
mktexfmt [INFO]: --- remaking latex with pdftex
mktexfmt: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' ...
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (INITEX)
restricted \write18 enabled.
(/usr/share/texmf-dist/web2c/cp227.tcx)
entering extended mode
(/usr/share/texmf-dist/tex/latex/tex-ini-files/latex.ini
(/usr/share/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex)
(/usr/share/texmf-dist/tex/latex/base/latex.ltx
(/usr/share/texmf-dist/tex/latex/base/texsys.cfg)
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, parameters,
LaTeX2e <2023-11-01> patch level 1
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.ltx
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex)) hacks,
document commands, control, par, spacing, files, font encodings, lengths,
====================================
Local config file fonttext.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fonttext.cfg
(/usr/share/texmf-dist/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlenc.def)
(/usr/share/texmf-dist/tex/latex/base/omsenc.def)
(/usr/share/texmf-dist/tex/latex/base/ot1enc.def)
(/usr/share/texmf-dist/tex/latex/base/t1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/t1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmss.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmtt.fd)))
====================================
Local config file fontmath.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fontmath.cfg
(/usr/share/texmf-dist/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlcmm.fd)
(/usr/share/texmf-dist/tex/latex/base/omscmsy.fd)
(/usr/share/texmf-dist/tex/latex/base/omxcmex.fd)
(/usr/share/texmf-dist/tex/latex/base/ucmr.fd)))
====================================
Local config file preload.cfg used
=====================================
(/usr/share/texmf-dist/tex/latex/base/preload.cfg
(/usr/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref,
environments, center, verbatim, math definitions, boxes, title, sectioning,
contents, floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(/usr/share/texmf-dist/tex/generic/babel/hyphen.cfg
(/usr/share/texmf-dist/tex/generic/hyphen/hyphen.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/dumyhyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
! I can't find file `dehypht-x-2024-02-28.tex'.
<to be read again>
\relax
l.192 \repeat
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
<to be read again>
\relax
l.192 \repeat
No pages of output.
Transcript written on latex.log.
mktexfmt [INFO]: log file copied to: /usr/share/texmf-var/web2c/pdftex/latex.log
mktexfmt [ERROR]: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini >&2 </dev/null' return status: 1
mktexfmt [ERROR]: returning error due to option --strict
mktexfmt [INFO]: disabled formats: 3
mktexfmt [INFO]: not selected formats: 53
mktexfmt [INFO]: failed to build: 1 (pdftex/latex)
mktexfmt [INFO]: total formats: 57
mktexfmt [INFO]: exiting with status 1
[stdout]
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (preloaded format=latex)
restricted \write18 enabled.
I can't find the format file `latex.fmt'!
Note: because plastimatch uses a fixed width convolution kernel, the
above expression may not sum to unity. Therefore, an empirical
factor S is used instead.
System Message: WARNING/2 (S \cdot \mathrm{exp} \left( -\frac{1}{2}(x-\mu)^T \Sigma^{-1} (x-\mu) \right)
)
latex exited with error
[stderr]
kpathsea: Running mktexfmt latex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /usr/share/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /root/.texlive2024/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /usr/share/texmf-var/web2c
mktexfmt [INFO]: --- remaking latex with pdftex
mktexfmt: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' ...
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (INITEX)
restricted \write18 enabled.
(/usr/share/texmf-dist/web2c/cp227.tcx)
entering extended mode
(/usr/share/texmf-dist/tex/latex/tex-ini-files/latex.ini
(/usr/share/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex)
(/usr/share/texmf-dist/tex/latex/base/latex.ltx
(/usr/share/texmf-dist/tex/latex/base/texsys.cfg)
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, parameters,
LaTeX2e <2023-11-01> patch level 1
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.ltx
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex)) hacks,
document commands, control, par, spacing, files, font encodings, lengths,
====================================
Local config file fonttext.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fonttext.cfg
(/usr/share/texmf-dist/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlenc.def)
(/usr/share/texmf-dist/tex/latex/base/omsenc.def)
(/usr/share/texmf-dist/tex/latex/base/ot1enc.def)
(/usr/share/texmf-dist/tex/latex/base/t1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1enc.def)
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/t1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmr.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmss.fd)
(/usr/share/texmf-dist/tex/latex/base/ot1cmtt.fd)))
====================================
Local config file fontmath.cfg used
====================================
(/usr/share/texmf-dist/tex/latex/base/fontmath.cfg
(/usr/share/texmf-dist/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===
(/usr/share/texmf-dist/tex/latex/base/omlcmm.fd)
(/usr/share/texmf-dist/tex/latex/base/omscmsy.fd)
(/usr/share/texmf-dist/tex/latex/base/omxcmex.fd)
(/usr/share/texmf-dist/tex/latex/base/ucmr.fd)))
====================================
Local config file preload.cfg used
=====================================
(/usr/share/texmf-dist/tex/latex/base/preload.cfg
(/usr/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref,
environments, center, verbatim, math definitions, boxes, title, sectioning,
contents, floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(/usr/share/texmf-dist/tex/generic/babel/hyphen.cfg
(/usr/share/texmf-dist/tex/generic/hyphen/hyphen.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/dumyhyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
(/usr/share/texmf-dist/tex/generic/hyphen/zerohyph.tex)
! I can't find file `dehypht-x-2024-02-28.tex'.
<to be read again>
\relax
l.192 \repeat
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
<to be read again>
\relax
l.192 \repeat
No pages of output.
Transcript written on latex.log.
mktexfmt [INFO]: log file copied to: /usr/share/texmf-var/web2c/pdftex/latex.log
mktexfmt [ERROR]: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini >&2 </dev/null' return status: 1
mktexfmt [ERROR]: returning error due to option --strict
mktexfmt [INFO]: disabled formats: 3
mktexfmt [INFO]: not selected formats: 53
mktexfmt [INFO]: failed to build: 1 (pdftex/latex)
mktexfmt [INFO]: total formats: 57
mktexfmt [INFO]: exiting with status 1
[stdout]
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Alpine Linux) (preloaded format=latex)
restricted \write18 enabled.
I can't find the format file `latex.fmt'!