Files
doc_phd_thesis/022_ErrorResilience/Figures/BMAAlgorithm.tex
T

121 lines
4.3 KiB
TeX

%User Variables
\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric}
\usetikzlibrary{decorations.pathreplacing,decorations.pathmorphing,shapes}
\usetikzlibrary{matrix,shapes.symbols,plotmarks,decorations.markings,shadows}
\newcommand{\block}{1cm}
\newcommand{\scale}{0.7}
\begin{tikzpicture}[scale=\scale,every node/.style={minimum size=0.6*\scale*\block}, inner sep=0pt,on grid]
\definecolor{lightgray}{rgb}{0.80,0.80,0.80};
\definecolor{darkgray}{rgb}{0.40,0.40,0.40};
\tikzstyle{arrow}=[draw, <->,shorten <=1pt,shorten >=1pt,>=stealth',thick]
\tikzstyle{pel}=[circle, rounded corners ,draw=lightgray!80, fill=lightgray!80, thick, scale=0.5]
\tikzstyle{outerpel}=[pel, fill=gray, draw=gray!90, thick]
\tikzstyle{innerpel}=[pel, fill=black!90, draw=black!90, thick]
% Image pixels
\foreach \x in {-2,...,9}
\foreach \y in {-2,...,9}
{
\node at (\x+0.5,\y+0.5) [pel]() {};
}
% outer boundary
\foreach \x in {0,...,7}
\foreach \y in {-1,8}
{
\node at (\x+0.5,\y+0.5) [outerpel](ref_tp) {};
}
\foreach \x in {-1,8}
\foreach \y in {0,...,7}
{
\node at (\x+0.5,\y+0.5) [outerpel](ref_tp) {};
}
% inner boundary
\foreach \x in {0,...,7}
\foreach \y in {0,7}
{
\node at (\x+0.5,\y+0.5) [innerpel](ref_tp) {};
}
\foreach \x in {0,7}
\foreach \y in {1,...,6}
{
\node at (\x+0.5,\y+0.5) [innerpel](ref_tp) {};
}
% \foreach \x in {0,8}
% \foreach \y in {1,...,2,4,5,...,7}
% {
% \node at (\x+0.5,\y+0.5) [pel](ref_lft) {};
% }
% Center
% \draw[draw=black,thick, opacity=1] (\block,\block) rectangle ++(7*\block,7*\block);
\node[anchor=center,scale=\scale, text centered] at (4,4) {Lost Block};
\draw[draw=black, thick] (0*\block,-1) -- ++(0,10*\block);
\draw[draw=black, thick] (8*\block,-1) -- ++(0,10*\block);
\draw[draw=black, thick] (-1*\block,0*\block) -- ++(10*\block,0);
\draw[draw=black, thick] (-1*\block,8*\block) -- ++(10*\block,0);
% \draw[draw=black, thick] (8*\block-8+4,-1) -- (8*\block-8+4,10);
% Lost pixel
%\node at (4*\block+\block/2, 3*\block+\block/2) [pel, fill=black, draw=black, thick](lostpel) [label=north east: $lp$] {};
% Reference pixels
%\node at (4*\block+\block/2, 8*\block+\block/2) [pel, fill=black, draw=black, thick](ref_tp) [label=north west: $p_1$] {};
%\node at (0*\block+\block/2, 3*\block+\block/2) [pel, fill=black, draw=black, thick](ref_lft) [label=north west: $p_2$] {};
%\node at (4*\block+\block/2, 0*\block+\block/2) [pel, fill=black, draw=black, thick](ref_bottm) [label=south east: $p_3$] {};
%\node at (8*\block+\block/2, 3*\block+\block/2) [pel, fill=black, draw=black, thick](ref_rght) [label=north east: $p_4$] {} ;
%\path [arrow] (lostpel) -- node[left] { $d_1$} (ref_tp);
%\path [arrow] (lostpel) -- node[above] { $d_2$} (ref_lft);
%\path [arrow] (lostpel) -- node[left] { $d_3$} (ref_bottm);
%\path [arrow] (lostpel) -- node[above] { $d_4$} (ref_rght);
\node[anchor=west,scale=\scale] at (-1,10.1) (pixel_label) {Pixel};
\node at (-1.6,8.35) (pel) {};
\path [-latex,anchor=center] (pixel_label) edge (pel);
\node[anchor=west,scale=\scale, text centered] at (1,-2.2) (inner_pixel_label) {Internal Boundary};
\node at (4-0.4,0.6) (inner_pel) {};
\path [-latex,anchor=center] (inner_pixel_label) edge (inner_pel);
\node[anchor=west,scale=\scale, text centered] at (4.5,10.2) (outer_pixel_label) {External Boundary};
\node at (6-0.5,8.4) (outer_pel) {};
\path [-latex,anchor=center] (outer_pixel_label) edge (outer_pel);
\node[anchor=west,scale=\scale, text centered] at (1.7,9.1) (ref_pixel_label) { \Large $f_{(x,y,t)}$ };
\node at (1.4,7.4) (ref_pel) {};
\path [-latex,anchor=center] (ref_pixel_label) edge (ref_pel);
\node[anchor=center,scale=\scale, text centered] at (4,9) (ref_pixel_label) { \Large T };
\node[anchor=center,scale=\scale, text centered] at (4,-1) (ref_pixel_label) { \Large B };
\node[anchor=center,scale=\scale, text centered] at (-1,4) (ref_pixel_label) { \Large L };
\node[anchor=center,scale=\scale, text centered] at (9,4) (ref_pixel_label) { \Large R };
%\node[anchor=west,scale=\scale] at (5.8,6.0) (edge_label) {Contour};
%\path [-latex] (edge_label.south) edge (7.15,5.2);
%\node at (6.5,-1.3) (edge_start) {};
%\node at (10.3,8.1) (edge_end) {};
%\path [-,thick] (edge_start.north) edge[out=80, in=190] (edge_end.west);
\end{tikzpicture}