前言
看了某年的真题,发现要考字符串识别,要画流成图和描述用到的数字图像处理方法,所以就自己用tikz画了一个,顺便用写了写自己的想法,主要参考了一篇中科大的硕士论文。
流程图
\documentclass[UTF8,fontset=macnew]{ctexart}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{tcolorbox}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows,arrows.meta}
\tikzstyle{lingxing} = [fill = yellow!30,diamond,draw,shape aspect = 2,inner sep = 0.4pt,thick,line width = 0.5pt]
\begin{document}
\begin{tikzpicture}
\begin{scope}[node distance = 1 ]
\node(start)[rectangle,draw,fill=white] at (5,7){输入图像};
\node(erzhi)[rectangle,draw,fill=white] at (3,5){灰度图};
\node(erzhi2)[rectangle,draw,fill = white] at (7,5){灰度图};
\node(kong)[fill =white] at (5,6){ };
\node(kong2)[fill=white] at (5,4){ };
\node(erzhihou)[rectangle,draw,fill=white] at (5,2.5){二值化后的图像};
\node(quzao)[rectangle,draw,fill=white] at(5,1){去噪后的图像};
\node(shibie)[lingxing,draw,fill=white] at(5,-1){识别后的字符};
\draw[-] (start.south) -- node[above,xshift = 1.5em,yshift=-1em,font=\small]{彩色图?}(kong.center);
\draw[->] (kong.center) -| node[above,yshift=-1.8em,xshift =1.4em,font=\small]{Y rgb2gray}(erzhi.north);
\draw[->] (kong.center) -| node[above,yshift=-1.8em,xshift=-0.5em,font=\small]{N}(erzhi2.north);
\draw[-](erzhi.south) |- (kong2.center);
\draw[-](erzhi2.south) |- (kong2.center);
\draw[->](kong2.center) -- node[above,font=\small,yshift=-0.7em,xshift=2.2em]{ostu阈值}(erzhihou.north);
\draw[->](erzhihou.south) -- node[above,font=\small,xshift=1.2em,yshift = -1em]{去噪}(quzao.north);
\draw[->](quzao.south) -- node[above,font=\small,xshift=1.2em,yshift = -1em]{识别}(shibie.north);
\end{scope}
\end{tikzpicture}
\end{document}
描述
看这张图有很多点噪声和线噪声,在一定程度上这个"2"字甚至有些斜,可能提取出来之后做一次旋转变换识别效果可能才好。
今天学了10小时贼舒坦,当时梦良聊完天之后释怀了,保研是件顺其自然的事情,不如现在专心准备考研,哈哈哈!
参考文献
1.王璐. 验证码识别技术研究[D]. 中国科学技术大学.