Guest User

Untitled

a guest
Jul 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1. documentclass{standalone}
  2. usepackage{tikz}
  3. usepackage{xcolor}
  4. usetikzlibrary{calc, positioning, arrows}
  5. colorlet{myred}{red!70}
  6. colorlet{myblue}{blue!50}
  7. begin{document}
  8. tikzstyle{redbox} = [rectangle, draw=white, thick, fill=myred, rounded corners=5pt, minimum height=15mm, align=center, text=white, font=bfseries]
  9. tikzstyle{redarrow} = [-stealth, ultra thick, myred!70!black]
  10. begin{tikzpicture}[node distance=5mm]
  11. draw[draw=none, fill=myred!40] (-13.75,-1) rectangle (13,1);
  12. draw[draw=none, fill=myred!40] (13,1) -- ++(0,1) -- ++(2,-2) -- ++(-2,-2) -- cycle;
  13. 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};
  14. node[redbox, left=of center] (in1) {Frame\(i-1)};
  15. node[redbox, left=of in1] (in2) {Frame\(i-2)};
  16. node[redbox, left=of in2] (in3) {Frame\(i-3)};
  17. node[redbox, left=of in3] (in4) {Frame\(i-4)};
  18. node[redbox, left=of in4] (in5) {Frame\(i-5)};
  19. node[redbox, left=of in5] (in6) {Frame\(i-6)};
  20. node[redbox, left=of in6] (in7) {Frame\(i-7)};
  21. node[redbox, right=of center] (ip1) {Frame\(i+1)};
  22. node[redbox, right=of ip1] (ip2) {Frame\(i+2)};
  23. node[redbox, right=of ip2] (ip3) {Frame\(i+3)};
  24. node[redbox, right=of ip3] (ip4) {Frame\(i+4)};
  25. node[redbox, right=of ip4] (ip5) {Frame\(i+5)};
  26. node[redbox, right=of ip5] (ip6) {Frame\(i+6)};
  27. node[redbox, right=of ip6] (ip7) {Frame\(i+7)};
  28. draw[] ($(center.north west)!0.75!(center.north)$) edge[redarrow, bend right=60] ($(in1.north)!0.25!(in1.north east)$);
  29. draw[] ($(in1.north west)!0.75!(in1.north)$) edge[redarrow, bend right=60] ($(in2.north)!0.25!(in2.north east)$);
  30. draw[] ($(in2.north west)!0.75!(in2.north)$) edge[redarrow, bend right=60] ($(in3.north)!0.25!(in3.north east)$);
  31. draw[] ($(in3.north west)!0.75!(in3.north)$) edge[redarrow, bend right=60] ($(in4.north)!0.25!(in4.north east)$);
  32. draw[] ($(in4.north west)!0.75!(in4.north)$) edge[redarrow, bend right=60] ($(in5.north)!0.25!(in5.north east)$);
  33. draw[] ($(in5.north west)!0.75!(in5.north)$) edge[redarrow, bend right=60] ($(in6.north)!0.25!(in6.north east)$);
  34. draw[] ($(in6.north west)!0.75!(in6.north)$) edge[redarrow, bend right=60] ($(in7.north)!0.25!(in7.north east)$);
  35. draw[] ($(center.north east)!0.75!(center.north)$) edge[redarrow, bend left=60] ($(ip1.north)!0.25!(ip1.north west)$);
  36. draw[] ($(ip1.north east)!0.75!(ip1.north)$) edge[redarrow, bend left=60] ($(ip2.north)!0.25!(ip2.north west)$);
  37. draw[] ($(ip2.north east)!0.75!(ip2.north)$) edge[redarrow, bend left=60] ($(ip3.north)!0.25!(ip3.north west)$);
  38. draw[] ($(ip3.north east)!0.75!(ip3.north)$) edge[redarrow, bend left=60] ($(ip4.north)!0.25!(ip4.north west)$);
  39. draw[] ($(ip4.north east)!0.75!(ip4.north)$) edge[redarrow, bend left=60] ($(ip5.north)!0.25!(ip5.north west)$);
  40. draw[] ($(ip5.north east)!0.75!(ip5.north)$) edge[redarrow, bend left=60] ($(ip6.north)!0.25!(ip6.north west)$);
  41. draw[] ($(ip6.north east)!0.75!(ip6.north)$) edge[redarrow, bend left=60] ($(ip7.north)!0.25!(ip7.north west)$);
  42. node[circle, below=of center, draw=white, thick, fill=myblue, align=center, text=white, minimum width=3cm, font=bfseries] (center2) {TP\or\FP};
  43. begin{scope}[xshift=-1.5cm, yshift=-2.9cm, scale=0.75]
  44. draw[draw=white, thick, fill=myblue] (0,0) -- ++(-2.5,0) -- ++(-0.5,-0.5) -- ++(0.5,-0.5) -- ++(2.5,0) -- cycle;
  45. node[font=bfseries, text=white] at (-1.25,-0.5) {flag};
  46. end{scope}
  47. foreach x in {0, 1, ..., 5} {
  48. begin{scope}[xshift=-3.5cm -x*2 cm, yshift=-2.9cm, scale=0.75]
  49. 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;
  50. node[font=bfseries, text=white] at (-1.5,-0.5) {flag};
  51. end{scope}
  52. }
  53. begin{scope}[xshift=1.5cm, yshift=-2.9cm, scale=0.75]
  54. draw[draw=white, thick, fill=myblue] (0,0) -- ++(2.5,0) -- ++(0.5,-0.5) -- ++(-0.5,-0.5) -- ++(-2.5,0) -- cycle;
  55. node[font=bfseries, text=white] at (1.25,-0.5) {flag};
  56. end{scope}
  57. foreach x in {0, 1, ..., 5} {
  58. begin{scope}[xshift=3.5cm +x*2 cm, yshift=-2.9cm, scale=0.75]
  59. 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;
  60. node[font=bfseries, text=white] at (1.5,-0.5) {flag};
  61. end{scope}
  62. }
  63. end{tikzpicture}
  64. end{document}
  65.  
  66. documentclass[tikz,border=3.14mm]{standalone}
  67. usetikzlibrary{positioning,decorations.markings,shapes.symbols,calc,backgrounds,shadows}
  68. begin{document}
  69. tikzset{twisted arrow/.style={decorate,decoration={markings,%
  70. mark=at position 0 with {coordinate (ta-base) at (0,0);},
  71. mark=at position 0.5 with {coordinate (ta-mid) at (0,0);
  72. pgftransformreset
  73. fill[#1!70!black] let p1=($(ta-mid)-(ta-base)$) in
  74. pgfextra{pgfmathsetmacro{myangle}{ifthenelse(x1>0,180,0)}}
  75. ([xshift=-2pt]ta-base) to[out=90,in=myangle] (ta-mid)
  76. to[out=myangle,in=90] ([xshift=2pt]ta-base)
  77. -- cycle;},
  78. mark=at position 0.99 with {coordinate (ta-end) at (0,0);
  79. pgftransformreset
  80. fill[#1] let p1=($(ta-end)-(ta-mid)$) in
  81. pgfextra{pgfmathsetmacro{myangle}{ifthenelse(x1<0,180,0)}}
  82. (ta-mid) to[out=myangle,in=90] ([xshift=-2pt,yshift=4pt]ta-end)
  83. -- ++(-2pt,0) -- (ta-end) -- ++(4pt,4pt) -- ++(-2pt,0) to[out=90,in=myangle]
  84. cycle;
  85. }
  86. }},
  87. dblock/.style={rounded corners,very thick,draw,white,fill=red,align=center},
  88. flag/.style={draw,white,fill=blue!20,shape=signal}}
  89. begin{tikzpicture}[every shadow/.style={shadow xshift=0,shadow yshift=-0.5ex}]
  90. node[dblock,alias=r-0] (l-0) {The frame to be\ displayed with\ the
  91. detection\ overlaid};
  92. foreach X [evaluate=X as Y using int(X-1)]in {1,...,7}
  93. {node[dblock,right=1pt of r-Y] (r-X) {Frame\ (i+X)};
  94. draw[twisted arrow=red] (r-Y.70) to[out=90,in=90,looseness=2] (r-X.110);
  95. node[dblock,left=1pt of l-Y] (l-X) {Frame\ (i-X)};
  96. draw[twisted arrow=red] (l-Y.110) to[out=90,in=90,looseness=2] (l-X.70);}
  97. begin{scope}[on background layer]
  98. fill[red!20] ([yshift=-2pt]l-7.south west) -- ([yshift=-2pt]r-6.south east)
  99. -- ++(0,-8pt) -- (r-7.east) -- ([yshift=10pt]r-6.north east) --
  100. ([yshift=2pt]r-6.north east) -- ([yshift=2pt]l-7.north west) -- cycle;
  101. end{scope}
  102. node[below=1cm of l-0,circle,fill=blue!20,align=center,text=white,draw=white, very
  103. thick,font=Large,drop shadow,alias=L-0] (R-0){TP\ or\ FP};
  104. begin{scope}[on background layer]
  105. foreach X [evaluate=X as Y using int(X-1)]in {1,...,7}
  106. {node[flag,right=0.5pt of R-Y,signal from=west,signal to=east,minimum
  107. width=1.5cm] (R-X) {flag};
  108. node[flag,left=0.5pt of L-Y,signal from=east,signal to=west,minimum
  109. width=1.5cm] (L-X) {flag};}
  110. end{scope}
  111. end{tikzpicture}
  112. end{document}
Add Comment
Please, Sign In to add comment