-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflowchart.tex
113 lines (100 loc) · 4.75 KB
/
flowchart.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
\pgfdeclarelayer{marx}
\pgfsetlayers{main,marx}
% A macro for marking coordinates (specific to the coordinate naming
% scheme used here). Swap the following 2 definitions to deactivate
% marks.
\providecommand{\cmark}[2][]{%
\begin{pgfonlayer}{marx}
\node [nmark] at (c#2#1) {#2};
\end{pgfonlayer}{marx}
}
\providecommand{\cmark}[2][]{\relax}
% -------------------------------------------------
\begin{figure}[h]
\begin{center}
\begin{tikzpicture}[%
>=triangle 60, % Nice arrows; your taste may be different
start chain=going below, % General flow is top-to-bottom
node distance=6mm and 60mm, % Global setup of box spacing
every join/.style={norm}, % Default linetype for connecting boxes
]
{\small\ttfamily\selectfont
%\fontfamily{lmodern}
% -------------------------------------------------
% A few box styles
% <on chain> *and* <on grid> reduce the need for manual relative
% positioning of nodes
\tikzset{
base/.style={draw, on chain, on grid, align=center, minimum height=4ex},
proc/.style={base, rectangle, text width=8em},
test/.style={base, diamond, aspect=2, text width=5em},
term/.style={proc, rounded corners},
% coord node style is used for placing corners of connecting lines
coorda/.style={coordinate, on chain, on grid, node distance=6mm and 25mm},
coordb/.style={coordinate, on chain, on grid, node distance=6mm and 35mm},
coordc/.style={coordinate, on chain, on grid, node distance=6mm and 45mm},
% nmark node style is used for coordinate debugging marks
nmark/.style={draw, cyan, circle, font={\sffamily\bfseries}},
% -------------------------------------------------
% Connector line styles for different parts of the diagram
norm/.style={->, draw, blue},
free/.style={->, draw, green},
cong/.style={->, draw, red},
it/.style={font={\small\itshape}}
}
% -------------------------------------------------
% Start by placing the nodes
% Use join to connect a node to the previous one a
\node [term, it] (p0) {Inicio};
\node [proc, fill=violet!30, join] (p1) {Reducción del área de trabajo};
\node [test, fill=blue!30, join] (t1) {¿12 bpp?};
% No join for exits from test nodes - connections have more complex
% requirements
% We continue until all the blocks are positioned
\node [proc, fill=brown!30] (p2) {Conversión a 16 bits};
\node [proc, fill=red!30, join] (p3) {Filtro adaptativo de la mediana};
\node [proc, fill=green!30, join] (p4) {Ecualización de histograma};
\node [proc, fill=yellow!30, join] (p5) {Encogimiento de la imagen};
\node [term, join, it] (p6) {Fin};
% We position the next block explicitly as the first block in the
% second column. The chain 'comes along with us'. The distance
% between columns has already been defined, so we don't need to
% specify it.
% -------------------------------------------------
% Now we place the coordinate nodes for the connectors with angles, or
% with annotations. We also mark them for debugging.
\node [coorda, left=of t1] (c0) {};
\node [coorda, right=of p3, yshift=-1.2em] (c1) {}; \cmark{1}
\node [coordb, right=of p3, yshift=-1.2em] (c2) {}; \cmark{2}
\node [coordc, right=of p4] (c3) {}; \cmark{3}
% -------------------------------------------------
% A couple of boxes have annotations
% -------------------------------------------------
% All the other connections come out of tests and need annotating
% First, the straight north-south connections. In each case, we first
% draw a path with a (consistently positioned) annotation node, then
% we draw the arrow itself.
\path (t1.south) to node [near start, xshift=1em] {$s\acute{\imath}$} (p2);
\draw [->,blue] (t1.south) -- (p2);
% -------------------------------------------------
% Finally, the twisty connectors. Again, we place the annotation
% first, then draw the connector
\path (t1.west) to node [near start, yshift=-3em, xshift=-1.3em] {$no$} (c0);
\draw [*->, blue, xshift=-1.3em] (t1.west) -- (c0) |- (p3);
\path (p3.east) to node [near start, yshift=1em] {} (c1);
\draw [o->, blue, dashed, thick] ([yshift=-1.2em]p3.east) -- ([yshift=-1.2em]c1) |- (p5);
\path (p3.east) to node [near start] {} (c2);
\draw [o->, red, dashed, thick] ([yshift=1.2em]p3.east) -- ([yshift=1.2em]c2) |- ([yshift=1.2em]p6);
\path (p4.east) to node [near start] {} (c3);
\draw [o->, green!50!black, dashed, thick] (p4.east) -- (c3) |- ([yshift=-1.2em]p6);
% -------------------------------------------------
%\draw[brown, thick] ($(p4.north west)+(-1.2, 0.3)$) rectangle ($(p5.south east)+(1.2, -0.3)$)
%node [right, xshift=1em, yshift=5em]{GUI};
}
\end{tikzpicture}
\end{center}
\caption[Método de preprocesamiento]
{Método de preprocesamiento. \textbf{1}, \textbf{2} y \textbf{3} nos indican
que se pueden obviar algunas fases del método.}
\label{fig:flowchart}
\end{figure}