填充空洞

如果有

$$f_m(x,y)= \begin{cases}
1-f(x,y) & if\ (x,y)\ is\ on\ the\ border\ of\ f\\
0 & otherwise
\end{cases}$$

则下面这个操作的作用就是填充空洞

latex error! exitcode was 1 (signal 0), transscript follows:

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=latex)
entering extended mode
(./latex_37b6a3e6745d74c52611932f68ad121c81865037_p.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-01-22>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
No file latex_37b6a3e6745d74c52611932f68ad121c81865037_p.aux.
! Missing $ inserted.
<inserted text> 
                $
l.8 g = [R_
           {f^c}(f_m)]^c
! Missing $ inserted.
<inserted text> 
                $
l.9 \end{document}
                  
[1] (./latex_37b6a3e6745d74c52611932f68ad121c81865037_p.aux) )
(see the transcript file for additional information)
Output written on latex_37b6a3e6745d74c52611932f68ad121c81865037_p.dvi (1 page,
 424 bytes).
Transcript written on latex_37b6a3e6745d74c52611932f68ad121c81865037_p.log.

在matlab中可以用一个函数实现:

g = imfill(f, 'holes');

ch3n2k.com | Copyright (c) 2004-2020 czk.