I need to draw the following diagram using TikZ package in LaTeX
I wrote the following code so far:
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[auto, node distance=2cm,>=latex']
\tikzstyle{block} = [draw, rectangle];
\tikzstyle{rblock}=[draw, shape=rectangle,rounded corners=0.5em];
\node [rblock] (start) {Start};
\node [block, right of=start] (acquire) {Acquire Image};
\node [block, right of=acquire] (rgb2gray) {RGB to Gray};
\node [block, right of=rgb2gray] (otsu) {Localized OTSU Thresholding};
\node [block, below of=otsu] (gchannel) {Subtract the Green Channel};
\node [block, left of=gchannel] (closing) {Morphological Closing};
\end{tikzpicture}
\end{document}
But the result I get is really bad and all the boxes are on top of each other. Please note, in my code "Subtract the Green Channel" node is below "Localized Otsu Thresholding" but that is also fine, flow diagram can flow either way but preferably the one shown in image.
Could someone please tell me what I'm missing? How can I fix the length of box and let text within them span multiple lines? If possible an someone provide me LaTeX code that could draw flow diagram as shown in image? Any help would be appreciated.
Thanks everyone who answered. I've got this far:
The code I used is below:
\begin{tikzpicture}[>=latex']
ikzset{block/.style= {draw, rectangle, align=center,minimum width=2cm,minimum height=1cm},
rblock/.style={draw, shape=rectangle,rounded corners=1em,align=left,minimum width=1.5cm,minimum height=0.75cm},
input/.style={ % requires library shapes.geometric
draw,
trapezium,
trapezium left angle=60,
trapezium right angle=120,
minimum width=2.0em,
align=center,
minimum height=1.5em
},
}
\node [rblock] (start) {Start};
\node [block, right =1.75em of start] (acquire) {Acquire Image};
\node [block, right =1.75em of acquire] (rgb2gray) {RGB to Gray};
\node [block, below =1.75em of rgb2gray.south] (otsu) {Localized OTSU \\ Thresholding};
\node [block, left =1.75em of otsu] (gchannel) {Subtract the Green \ Channel};
\node [block, below left =1.75em of gchannel] (closing) {Morphological \\ Closing};
\node [block, right =1.75em of closing] (NN) {Sign Detection \\ Using NN};
\node [input, right =1.75em of NN] (limit) {Speed \\ Limit};
\node [coordinate, right =1em of otsu.east] (otsu_right) {}; %% Coordinate on right and middle
%% paths
\path[draw,->] (start) edge (acquire)
(acquire) edge (rgb2gray)
(rgb2gray.east) -| (otsu_right) -- (otsu.east)
(otsu) edge (gchannel)
% (gchannel) edge (closing)
% (closing) edge (NN)
% (NN) edge (limit)
;
\end{tikzpicture}
I'm using two column paper style therefore you fit things in, I've putting less number of boxes each line. I want that RGB to Gray
node should be right aligned with Localized OTSU
node and Morphological opening
node left aligned with Subtract Green Channel
node. I Please help. Thanks!
text width
for fixed length or Dependent node size in TikZ Overlapping. If you can improve your question/code with the answers from there, and you still need assistance, you can edit your question.