I am a new user to Latex. Recently I have decided to use latex for preparing my project instead of using MS word. Can any one please help me to draw this block diagram for my project.

Thanks in advance, I really appreciate your help. enter image description here

  • 6
    Welcome to TeX.SX! The short answer is that, yes, this is possible but I have to warn you that questions of the form "Please draw this for me" that show no effort on the part of OP, often don't get answered. You will get more help if you post some code showing what you have tried and give a minimal working example. A quick search on TeX.SX for drawing functions (with tikz or pstricks) will give you an idea of where to start from. – Andrew Jul 16 '18 at 8:24
  • Thanks dear Andrew. I will see what I can do from my side, and then edit my question. – Hemin Ali Jul 16 '18 at 10:35

Very similar to @Jojo's answer but with twisted arrows, \tikzset instead of \tikzstyle and a bit shorter code (but many more libraries ;-).

\tikzset{twisted arrow/.style={decorate,decoration={markings,%
mark=at position 0 with {\coordinate (ta-base) at (0,0);},
mark=at position 0.5 with {\coordinate (ta-mid) at (0,0);
\fill[#1!70!black] let \p1=($(ta-mid)-(ta-base)$) in 
 ([xshift=-2pt]ta-base) to[out=90,in=\myangle] (ta-mid) 
to[out=\myangle,in=90] ([xshift=2pt]ta-base) 
-- cycle;},
mark=at position 0.99 with {\coordinate (ta-end) at (0,0);
\fill[#1] let \p1=($(ta-end)-(ta-mid)$) in 
(ta-mid) to[out=\myangle,in=90] ([xshift=-2pt,yshift=4pt]ta-end) 
 -- ++(-2pt,0) -- (ta-end) -- ++(4pt,4pt) -- ++(-2pt,0)  to[out=90,in=\myangle] 
dblock/.style={rounded corners,very thick,draw,white,fill=red,align=center},
\begin{tikzpicture}[every shadow/.style={shadow xshift=0,shadow yshift=-0.5ex}]
\node[dblock,alias=r-0] (l-0) {The frame to be\\ displayed with\\ the
detection\\ overlaid};
\foreach \X [evaluate=\X as \Y using int(\X-1)]in {1,...,7}
{\node[dblock,right=1pt of r-\Y] (r-\X) {Frame\\ (i+\X)};
\draw[twisted arrow=red] (r-\Y.70) to[out=90,in=90,looseness=2] (r-\X.110);
\node[dblock,left=1pt of l-\Y] (l-\X) {Frame\\ (i-\X)};
\draw[twisted arrow=red] (l-\Y.110) to[out=90,in=90,looseness=2] (l-\X.70);}
\begin{scope}[on background layer]
\fill[red!20] ([yshift=-2pt]l-7.south west) -- ([yshift=-2pt]r-6.south east) 
-- ++(0,-8pt) -- (r-7.east) -- ([yshift=10pt]r-6.north east) --
([yshift=2pt]r-6.north east) -- ([yshift=2pt]l-7.north west) -- cycle;
\node[below=1cm of l-0,circle,fill=blue!20,align=center,text=white,draw=white, very
thick,font=\Large,drop shadow,alias=L-0] (R-0){TP\\ or\\ FP};
\begin{scope}[on background layer]
\foreach \X [evaluate=\X as \Y using int(\X-1)]in {1,...,7}
{\node[flag,right=0.5pt of R-\Y,signal from=west,signal to=east,minimum
width=1.5cm] (R-\X) {flag};
\node[flag,left=0.5pt of L-\Y,signal from=east,signal to=west,minimum
width=1.5cm] (L-\X) {flag};}

enter image description here


Here is something to get you started. I would recommend the package tikz. Just play around with the positions, arrows and colours. You can either create the nodes individually or in a loop.

\usetikzlibrary{calc, positioning, arrows}
\tikzstyle{redbox} = [rectangle, draw=white, thick, fill=myred, rounded corners=5pt, minimum height=15mm, align=center, text=white, font=\bfseries]
\tikzstyle{redarrow} = [-stealth, ultra thick, myred!70!black]
\begin{tikzpicture}[node distance=5mm]
    \draw[draw=none, fill=myred!40] (-13.75,-1) rectangle (13,1);
    \draw[draw=none, fill=myred!40] (13,1) -- ++(0,1) -- ++(2,-2) -- ++(-2,-2) -- cycle;
    \node[rectangle, rounded corners=5pt, draw=white, fill=myred, align=center, text width=3cm, minimum height=25mm,font=\bfseries, text=white] (center) at (0,0) {The frame to be displayed with the detection overlaid};
    \node[redbox, left=of center] (in1) {Frame\\(i-1)};
    \node[redbox, left=of in1] (in2) {Frame\\(i-2)};
    \node[redbox, left=of in2] (in3) {Frame\\(i-3)};
    \node[redbox, left=of in3] (in4) {Frame\\(i-4)};
    \node[redbox, left=of in4] (in5) {Frame\\(i-5)};
    \node[redbox, left=of in5] (in6) {Frame\\(i-6)};
    \node[redbox, left=of in6] (in7) {Frame\\(i-7)};
    \node[redbox, right=of center] (ip1) {Frame\\(i+1)};
    \node[redbox, right=of ip1] (ip2) {Frame\\(i+2)};
    \node[redbox, right=of ip2] (ip3) {Frame\\(i+3)};
    \node[redbox, right=of ip3] (ip4) {Frame\\(i+4)};
    \node[redbox, right=of ip4] (ip5) {Frame\\(i+5)};
    \node[redbox, right=of ip5] (ip6) {Frame\\(i+6)};
    \node[redbox, right=of ip6] (ip7) {Frame\\(i+7)};
    \draw[] ($(center.north west)!0.75!(center.north)$) edge[redarrow, bend right=60] ($(in1.north)!0.25!(in1.north east)$);
    \draw[] ($(in1.north west)!0.75!(in1.north)$) edge[redarrow, bend right=60] ($(in2.north)!0.25!(in2.north east)$);
    \draw[] ($(in2.north west)!0.75!(in2.north)$) edge[redarrow, bend right=60] ($(in3.north)!0.25!(in3.north east)$);
    \draw[] ($(in3.north west)!0.75!(in3.north)$) edge[redarrow, bend right=60] ($(in4.north)!0.25!(in4.north east)$);
    \draw[] ($(in4.north west)!0.75!(in4.north)$) edge[redarrow, bend right=60] ($(in5.north)!0.25!(in5.north east)$);
    \draw[] ($(in5.north west)!0.75!(in5.north)$) edge[redarrow, bend right=60] ($(in6.north)!0.25!(in6.north east)$);
    \draw[] ($(in6.north west)!0.75!(in6.north)$) edge[redarrow, bend right=60] ($(in7.north)!0.25!(in7.north east)$);
    \draw[] ($(center.north east)!0.75!(center.north)$) edge[redarrow, bend left=60] ($(ip1.north)!0.25!(ip1.north west)$);
    \draw[] ($(ip1.north east)!0.75!(ip1.north)$) edge[redarrow, bend left=60] ($(ip2.north)!0.25!(ip2.north west)$);
    \draw[] ($(ip2.north east)!0.75!(ip2.north)$) edge[redarrow, bend left=60] ($(ip3.north)!0.25!(ip3.north west)$);
    \draw[] ($(ip3.north east)!0.75!(ip3.north)$) edge[redarrow, bend left=60] ($(ip4.north)!0.25!(ip4.north west)$);
    \draw[] ($(ip4.north east)!0.75!(ip4.north)$) edge[redarrow, bend left=60] ($(ip5.north)!0.25!(ip5.north west)$);
    \draw[] ($(ip5.north east)!0.75!(ip5.north)$) edge[redarrow, bend left=60] ($(ip6.north)!0.25!(ip6.north west)$);
    \draw[] ($(ip6.north east)!0.75!(ip6.north)$) edge[redarrow, bend left=60] ($(ip7.north)!0.25!(ip7.north west)$);
    \node[circle, below=of center, draw=white, thick, fill=myblue, align=center, text=white, minimum width=3cm, font=\bfseries] (center2) {TP\\or\\FP};
    \begin{scope}[xshift=-1.5cm, yshift=-2.9cm, scale=0.75]
        \draw[draw=white, thick, fill=myblue] (0,0) -- ++(-2.5,0) -- ++(-0.5,-0.5) -- ++(0.5,-0.5) -- ++(2.5,0) -- cycle;
        \node[font=\bfseries, text=white] at (-1.25,-0.5) {flag};
    \foreach \x in {0, 1, ..., 5} {
        \begin{scope}[xshift=-3.5cm -\x*2 cm, yshift=-2.9cm, scale=0.75]
            \draw[draw=white, thick, fill=myblue] (0,0) -- ++(-2.5,0) -- ++(-0.5,-0.5) -- ++(0.5,-0.5) -- ++(2.5,0) -- ++(-0.5,0.5) -- cycle;
            \node[font=\bfseries, text=white] at (-1.5,-0.5) {flag};
    \begin{scope}[xshift=1.5cm, yshift=-2.9cm, scale=0.75]
        \draw[draw=white, thick, fill=myblue] (0,0) -- ++(2.5,0) -- ++(0.5,-0.5) -- ++(-0.5,-0.5) -- ++(-2.5,0) -- cycle;
        \node[font=\bfseries, text=white] at (1.25,-0.5) {flag};
    \foreach \x in {0, 1, ..., 5} {
        \begin{scope}[xshift=3.5cm +\x*2 cm, yshift=-2.9cm, scale=0.75]
            \draw[draw=white, thick, fill=myblue] (0,0) -- ++(2.5,0) -- ++(0.5,-0.5) -- ++(-0.5,-0.5) -- ++(-2.5,0) -- ++(0.5,0.5) -- cycle;
            \node[font=\bfseries, text=white] at (1.5,-0.5) {flag};


  • Thank you very much dear Jojo. That is perfect for me :) – Hemin Ali Jul 16 '18 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.