Skip to content

Commit

Permalink
Remove built-in tikz styles
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexaraWu committed Jun 3, 2021
1 parent 0d110ef commit 29855d9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 57 deletions.
81 changes: 58 additions & 23 deletions figures/flow_chart.tex
Original file line number Diff line number Diff line change
@@ -1,28 +1,63 @@

% 定义流程图节点
\tikzstyle{startstop} = [
rectangle,
rounded corners,
minimum width=2cm,
minimum height=1cm,
text centered,
draw=black
]
\tikzstyle{io} = [
trapezium,
trapezium left angle=75,
trapezium right angle=105,
minimum width=1cm,
minimum height=1cm,
text centered,
draw=black
]
\tikzstyle{process} = [
rectangle,
minimum width=2cm,
minimum height=1cm,
text centered,
draw=black
]
\tikzstyle{decision} = [
diamond,
minimum width=2cm,
minimum height=1cm,
text centered,
draw=black]
\tikzstyle{arrow} = [thick, ->, >=stealth]

\begin{tikzpicture}[node distance=2cm]
\node (pic) [startstop] {待测图片};
\node (bg) [io, below of=pic] {读取背景};
\node (pair) [process, below of=bg] {匹配特征点对};
\node (threshold) [decision, below of=pair, yshift=-0.5cm] {多于阈值};
\node (clear) [decision, right of=threshold, xshift=3cm] {清晰?};
\node (capture) [process, right of=pair, xshift=3cm, yshift=0.5cm] {重采};
\node (matrix_p) [process, below of=threshold, yshift=-0.8cm] {透视变换矩阵};
\node (matrix_a) [process, right of=matrix_p, xshift=3cm] {仿射变换矩阵};
\node (reg) [process, below of=matrix_p] {图像修正};
\node (return) [startstop, below of=reg] {配准结果};

%连接具体形状
\draw [arrow](pic) -- (bg);
\draw [arrow](bg) -- (pair);
\draw [arrow](pair) -- (threshold);
% 设置节点
\node (pic) [startstop] {待测图片};
\node (bg) [io, below of=pic] {读取背景};
\node (pair) [process, below of=bg] {匹配特征点对};
\node (threshold) [decision, below of=pair, yshift=-0.5cm] {多于阈值};
\node (clear) [decision, right of=threshold, xshift=3cm] {清晰?};
\node (capture) [process, right of=pair, xshift=3cm, yshift=0.5cm] {重采};
\node (matrix_p) [process, below of=threshold, yshift=-0.8cm] {透视变换矩阵};
\node (matrix_a) [process, right of=matrix_p, xshift=3cm] {仿射变换矩阵};
\node (reg) [process, below of=matrix_p] {图像修正};
\node (return) [startstop, below of=reg] {配准结果};

% 连接节点
\draw [arrow](pic) -- (bg);
\draw [arrow](bg) -- (pair);
\draw [arrow](pair) -- (threshold);

\draw [arrow](threshold) -- node[anchor=south] {否} (clear);
\draw [arrow](threshold) -- node[anchor=south] {否} (clear);

\draw [arrow](clear) -- node[anchor=west] {否} (capture);
\draw [arrow](capture) |- (pic);
\draw [arrow](clear) -- node[anchor=west] {是} (matrix_a);
\draw [arrow](matrix_a) |- (reg);
\draw [arrow](clear) -- node[anchor=west] {否} (capture);
\draw [arrow](capture) |- (pic);
\draw [arrow](clear) -- node[anchor=west] {是} (matrix_a);
\draw [arrow](matrix_a) |- (reg);

\draw [arrow](threshold) -- node[anchor=east] {是} (matrix_p);
\draw [arrow](matrix_p) -- (reg);
\draw [arrow](reg) -- (return);
\draw [arrow](threshold) -- node[anchor=east] {是} (matrix_p);
\draw [arrow](matrix_p) -- (reg);
\draw [arrow](reg) -- (return);
\end{tikzpicture}
1 change: 1 addition & 0 deletions setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@

% 绘图宏包
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}

% 目录树宏包
\usepackage{dirtree}
Expand Down
34 changes: 0 additions & 34 deletions texmf/tex/latex/sjtuthesis/sjtuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1334,40 +1334,6 @@
mathescape=true
}
}
\AtEndOfPackageFile*{tikz}{
\usetikzlibrary{shapes.geometric, arrows}
\tikzstyle{startstop} = [
rectangle,
rounded corners,
minimum width=2cm,
minimum height=1cm,
text centered,
draw=black
]
\tikzstyle{io} = [
trapezium,
trapezium left angle=75,
trapezium right angle=105,
minimum width=1cm,
minimum height=1cm,
text centered,
draw=black
]
\tikzstyle{process} = [
rectangle,
minimum width=2cm,
minimum height=1cm,
text centered,
draw=black
]
\tikzstyle{decision} = [
diamond,
minimum width=2cm,
minimum height=1cm,
text centered,
draw=black]
\tikzstyle{arrow} = [thick, ->, >=stealth]
}
\endinput
%%
%% End of file `sjtuthesis.cls'.

0 comments on commit 29855d9

Please sign in to comment.