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

69 lines
2.5 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.65}
\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, fill=lightgray, thick, scale=0.5]
% Neighbor pixels
\foreach \x in {-2,...,10}
\foreach \y in {-1,...,9}
{
\node at (\x+0.5,\y+0.5) [pel]() {};
}
% \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, dashed,thick, opacity=1] (\block+4,\block+4) rectangle ++(7*\block-8,7*\block-8);
\node[anchor=west,scale=\scale] at (1*\block+0.1*\block,8*\block+3) {Lost region ($R_L$)};
% 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.4,10) (pixel_label) {Pixel};
\node at (-1.5,8.4) (pel) {};
\path [-latex,anchor=center] (pixel_label) edge (pel);
\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}