安装命令行版的texlive: sudo apt-get install texlive-full
安装一个比较有帮助性的编辑器: sudo apt-get install texmaker
安装中文环境: sudo apt-get install latex-cjk-all
sudo apt-get install ttf-wqy-microhei #文泉驿-微米黑
sudo apt-get install ttf-wqy-zenhei #文泉驿-正黑
sudo apt-get install xfonts-wqy #文泉驿-点阵宋体
\documentclass[UTF8]{ctexart} %文档类型,可键入中文
\usepackage{colortbl}
\usepackage{amsmath}
\usepackage{authblk}
\usepackage{hyperref}
\hypersetup{hidelinks}%文章中具有链接的地方都会被红框框住,取消这个红框
\usepackage{graphicx}
\graphicspath{{figs/}}
\usepackage{float}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\usepackage{pgf}
\usepackage{tikz}
\usetikzlibrary{shapes, arrows, decorations.pathmorphing, backgrounds, positioning, fit, petri, automata, calc, quotes}
\definecolor{yellow1}{rgb}{1,0.8,0.2}
\usepackage{algorithm}
\usepackage{algorithmic}
\renewcommand{\algorithmicrequire}{ \textbf{Input:}} %Use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{ \textbf{Output:}} %UseOutput in the format of Algorithm
\usetikzlibrary{graphs}
%\usepackage{fontspec}
%\setCJKmainfont{DejaVu Sans}
%\setCJKsansfont{DejaVu Sans}
%\setCJKmonofont{DejaVu Sans}
\usepackage{xcolor}
\lhead{微分流形}
\chead{3D视觉感知}
\rhead{探本清源}
\lfoot{\leftmark}%当前的章名
\cfoot{\rightmark}%当前的节名
\rfoot{\thepage}
\usepackage{listings} % Source code formatting and highlighting
\usepackage{minted}
\title{3D视觉感知\\探本清源}%文档标题
\author[a]{王红军% <-this % stops a space
\thanks{Corresponding author: [email protected]}}%作者
\author[b]{Andie}
\author[a]{Linda}
\affil[a]{https://github.com/hjwang1}%作者
\affil[b]{Department USTC, Hefei}%作者
\begin{document}%开始文章书写
%\pagestyle{empty}
\maketitle%将封面打印出来,也就是上面的标题作者
\tableofcontents %自动目录
%摘要
\vspace{8pt} %字号大小
\renewcommand{\abstractname}{\huge 摘\quad 要}
\newpage
\begin{abstract} %开始写摘要
\normalsize
\noindent 人的意识、记忆和思维是量子纠缠的,要用量子理论来解释——Matthew Fisher,这也从一个方面说明当前各种xx学习远不足以解释AI的现象,根源在所用数学理论,绕不开梯度散射等局限性,理不顺长短记忆,道不清缘由,指不明方向;最有可能统一物理的微分几何,可做人脸识别表情识别,携带了原始三维信息,其应用前景不可估量;几何决定了光的弯曲时空弯曲,可做环境识别,可做智主移动,远不是巡线、避障、定位建图的层次;物理将统一于几何,宏微观将统一于几何,主客观将统一于几何,智能在微分几何,莫比乌斯带上的“蚂蚁”将揭开其中奥妙。
\end{abstract}
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
\rowcolor[gray]{0.8}
文件编号 & 最新版本 & 审查 & 制订 \\ \hline
& V1.0.0 & & 王红军 \\ \hline
& & & \\
\hline
\end{tabular}
\end{center}
\section{引言}
\paragraph{主要内容}~{} \newline \indent 论机器人的环境感知与智主移动
\subparagraph{汇报} 兼谈基于微分几何的人工智能。
\subsection{人类对环境的感知} 人是怎么感知环境的,是怎么思考与学习的,是怎么在空间中自由行走的。
\subparagraph{本文} 档主要描述的是人的环境感知与智主移动的概要设计,指导详细设计工作,为详细设计提供统一的参照标准,包括系统的总体设计、系统架构、内外部接口、编程模型,以及其他各种主要问题的解决方案,达到供评审的标准。在详细设计的过程中,如果发现需要添加或更新概要设计标准或者约束来指导详细设计工作,必须在此文档进行更新和评审,以确保各模块详细设计的一致性和正确性。
\subsection{机器对环境的感知}
\begin{itemize}
\item 机器的感官之传感器
\item 机器是怎么思考与学习的
\item 机器怎么在空间中移动
\item 蝙蝠的拟生运动特征
\end{itemize}
\newpage
\section{总体设计}
\subsection{系统整体设计}
\paragraph{} 系统功能模块概览如图1所示:
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.5]{figs/gesture.jpg}
\caption{系统功能模块}
\end{figure}
\subsection{非线性优化}
\subsubsection{非线性优化问题}
\paragraph{} 带约束的非线性最小二乘问题的提法:
\begin{equation}
\underset{x}{min} \frac{1}{2} \sum_i \rho_i (||f_i(x_{i_1}, \cdots ,x_{i_k})||^2)
\end{equation}
\begin{equation}
s.t. \quad l_j \le x_j \le u_j
\end{equation}
\paragraph{} 备注:
\begin{itemize}
\item Cost Function;
\item Loss Function;
\item bounds constraints;
\item Lagrange multiplier method without constraints;
\end{itemize}
\subsubsection{问题求解}
\paragraph{} 非线性最小二乘问题的解法:
\begin{itemize}
\item 一阶梯度法;
\item 二阶梯度法;
\item Gauss-Newton法;
\item Line Search Method from Gauss-Newton;
\item Levenberg-Marquardt Method from Gauss-Newton;
\end{itemize}
\subparagraph{Ceres Solver} can solve bounds constrained robustified non-linear least squares problems;
\section{附录}
\subsection{仿射李群}
\begin{equation}
S_k=
\begin{bmatrix}
S_0 & S_1 \\
-\frac{S_0S_1}{S_4} & S_4
\end{bmatrix}
=\lambda
\begin{bmatrix}
\frac{1}{\lambda} & \frac{S_1/S_4}{\lambda} \\
-\frac{S_1/S_4}{\lambda} & \frac{1}{\lambda}
\end{bmatrix}
\begin{bmatrix}
S_0 & 0 \\
0 & S_4
\end{bmatrix}
, s.t.,
\lambda=\sqrt{1+(\frac{S_1}{S_4})^{2}}
\end{equation}
\begin{equation}
\begin{bmatrix}
1 & \alpha \\
0 & 1
\end{bmatrix}
or
\begin{bmatrix}
1 & 0 \\
\beta & 1
\end{bmatrix}
\end{equation}
\subsection{数据流图}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,
semithick]
\tikzstyle{every state}=[fill=yellow1,draw=none,text=black]
\node[state] (S) at (-6, 0) {$S$};
\node[state] (xin1) at (-2, 3) {$X^1_{in}$};
\node[state] (xin2) at (-2, 1) {$X^2_{in}$};
\node[state] (xin3) at (-2, -1) {$X^3_{in}$};
\node[state] (xin4) at (-2, -3) {$X^4_{in}$};
\node[state] (xout1) at (0, 3) {$X^1_{out}$};
\node[state] (xout2) at (0, 1) {$X^2_{out}$};
\node[state] (xout3) at (0, -1) {$X^3_{out}$};
\node[state] (xout4) at (0, -3) {$X^4_{out}$};
\node[state] (xin5) at (3, -2) {$X^5_{in}$};
\node[state] (xout5) at (5, -2) {$X^5_{out}$};
\node[state] (DC) at (7, 2) {$DC$};
\path (S) edge[bend left=26] node {$\infty$} (xin1)
edge[bend left=12] node {$\infty$} (xin2)
edge[bend right=12] node {$\infty$} (xin3)
edge[bend right=26] node {$\infty$} (xin4)
(xin1) edge node {$\alpha=1$} (xout1)
(xin2) edge node {$\alpha=1$} (xout2)
(xin3) edge node {$\alpha=1$} (xout3)
(xin4) edge node {$\alpha=1$} (xout4)
(xin5) edge node {$1$} (xout5);
\draw[->] (xout1) to[out=-30,in=150] node {$\beta$} (xin5);
\draw[->] (xout2.east) to[out=-15,in=165] node [below] {$\beta$} (xin5);
\draw[->] (xout3.east) to[out=0,in=180] node [below] {$\beta$} (xin5.west);
\draw[->] (xout1) to[out=-5,in=175] node {$\infty$} (DC);
\draw[->] (xout5) to[out=40, in=-120] node {$\infty$} (DC);
\draw[line width=2.5pt,red,-] (-1.7,-2.8)--(-0.3,-3.2);
\draw[line width=2.5pt,red,-] (-1.7,-3.2)--(-0.3,-2.8);
\draw[line width=2.5pt,red,dash pattern=on 6pt off 4pt on 2pt off 4pt,-] (-1,3.8)--(-1,2.5);
\draw[line width=2.5pt,red,dash pattern=on 6pt off 4pt on 2pt off 4pt,-] (-1,2.5) to[out=-10,in=170] (1.2,1.2);
\draw[line width=2.5pt,red,dash pattern=on 6pt off 4pt on 2pt off 4pt,-] (1.2,1.2) to[out=-100,in=80] (0.8,-1.9);
\end{tikzpicture}
\begin{tikzpicture}
[L1Node/.style={circle, draw=blue!50, fill=blue!20, very thick, minimum size=10mm},
L2Node/.style={rectangle,draw=green!50,fill=green!20,very thick, minimum size=10mm}]
\foreach \x in {1,...,5}
\node[L1Node] (w1_\x) at (2*\x, 0){$\int_\Omega x_\x$};
\end{tikzpicture}
\begin{tikzpicture}
[every node/.style={fill=blue!30,draw=blue!70,rounded corners},edge from parent/.style={blue,thick,draw}]
\node {root}
child {node {a1}}
child {node {a2}
child {node {b1}}
child {node {b2}}}
child {node {a3}};
\end{tikzpicture}
\begin{tikzpicture}[domain=0:4]
\draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
\draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
\draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};
\draw[color=red] plot (\x,\x) node[right] {$f(x) =x$};
% \x r 表示弧度
\draw[color=blue] plot (\x,{sin(\x r)}) node[right] {$f(x) = \sin x$};
\draw[color=orange] plot (\x,{0.05*exp(\x)}) node[right] {$f(x) = \frac{1}{20} \mathrm e^x$};
\end{tikzpicture}
\begin{tikzpicture}
\graph {
"$x_1$" -> "$x_2$"[red] -> "$x_3,x_4$";
"$x_1$" ->[bend left] "$x_3,x_4$";
};
\end{tikzpicture}
\begin{tikzpicture}
\graph {
a -> {
b -> c,
d -> e
} -> f
};
\end{tikzpicture}
\subsection{流程图}
\begin{tikzpicture}[node distance=2cm]
\tikzstyle{startstop} = [rectangle,rounded corners, minimum width=3cm,minimum height=1cm,text centered, draw=black,fill=red!30]
\tikzstyle{io} = [trapezium, trapezium left angle = 70,trapezium right angle=110,minimum width=3cm,minimum height=1cm,text centered,draw=black,fill=blue!30]
\tikzstyle{process} = [rectangle,minimum width=3cm,minimum height=1cm,text centered,text width =3cm,draw=black,fill=orange!30]
\tikzstyle{decision} = [diamond,minimum width=3cm,minimum height=1cm,text centered,draw=black,fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\node (start) [startstop] {Start};
\node (input1) [io,below of=start] {Input};
\node (process1) [process,below of=input1] {Process 1};
\node (decision1) [decision,below of=process1,yshift=-0.5cm] {Decession 1};
\node (process2a) [process,below of=decision1,yshift=-0.5cm] {Process 2aaaaaa aaaaaaa aaaa};
\node (process2b) [process,right of =decision1,xshift=2cm] {Process 2b};
\node (out1) [io,below of=process2a] {Output};
\node (stop) [startstop,below of=out1] {Stop};
\draw [arrow] (start) -- (input1);
\draw [arrow] (input1) -- (process1);
\draw [arrow] (process1) -- (decision1);
\draw [arrow] (decision1) -- node[anchor=east] {yes} (process2a);
\draw [arrow] (decision1) -- node[anchor=south] {no} (process2b);
\draw [arrow] (process2b) |- (process1);
\draw [arrow] (process2a) -- (out1);
\draw [arrow] (out1) -- (stop);
\end{tikzpicture}
\subsection{source code}
\begin{lstlisting}[language={java},caption=mainfun,breaklines=true,frame=single]
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello,World");
}
}
\end{lstlisting}
\begin{minted}[mathescape,
linenos,
numbersep=5pt,
gobble=2,
frame=lines,
framesep=2mm]{csharp}
string title = "This is a Unicode π in the sky"
/*
Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter
of an $n$-sided regular polygon circumscribing a
circle of diameter $d$.
*/
const double pi = 3.1415926535
\end{minted}
\subsection{算法图}
\begin{algorithm}[htbp]
\caption{A}
\label{alg:A}
\begin{algorithmic}
\STATE {set $r(t)=x(t)$}
\REPEAT
\STATE set $h(t)=r(t)$
\REPEAT
\STATE set $h(t)=r(t)$
\UNTIL{B}
\UNTIL{B}
\end{algorithmic}
\end{algorithm}
\begin{algorithm}[htbp]
\caption{Calculate $y = x^n$}
\label{alg1}
\begin{algorithmic}
\REQUIRE $n \geq 0 \vee x \neq 0$
\ENSURE $y = x^n$
\STATE $y \Leftarrow 1$
\IF{$n < 0$}
\STATE $X \Leftarrow 1 / x$
\STATE $N \Leftarrow -n$
\ELSE
\STATE $X \Leftarrow x$
\STATE $N \Leftarrow n$
\ENDIF
\WHILE{$N \neq 0$}
\IF{$N$ is even}
\STATE $X \Leftarrow X \times X$
\STATE $N \Leftarrow N / 2$
\ELSE[$N$ is odd]
\STATE $y \Leftarrow y \times X$
\STATE $N \Leftarrow N - 1$
\ENDIF
\ENDWHILE
\end{algorithmic}
\end{algorithm}
\begin{algorithm}[htbp]
\caption{ Framework of ensemble learning for our system.}
\label{alg:Framwork}
\begin{algorithmic}[1] %这个1 表示每一行都显示数字
\REQUIRE ~~\\ %算法的输入参数:Input
The set of positive samples for current batch, $P_n$;\\
The set of unlabelled samples for current batch, $U_n$;\\
Ensemble of classifiers on former batches, $E_{n-1}$;
\ENSURE ~~\\ %算法的输出:Output
Ensemble of classifiers on the current batch, $E_n$;
\STATE Extracting the set of reliable negative and/or positive samples $T_n$ from $U_n$ with help of $P_n$;
\label{ code:fram:extract }%对此行的标记,方便在文中引用算法的某个步骤
\STATE Training ensemble of classifiers $E$ on $T_n \cup P_n$, with help of data in former batches;
\label{code:fram:trainbase}
\STATE $E_n=E_{n-1}\cup E$;
\label{code:fram:add}
\STATE Classifying samples in $U_n-T_n$ by $E_n$;
\label{code:fram:classify}
\STATE Deleting some weak classifiers in $E_n$ so as to keep the capacity of $E_n$;
\label{code:fram:select}
\RETURN $E_n$; %算法的返回值
\end{algorithmic}
\end{algorithm}
\textcolor{red}{words to be in color}
\colorbox[rgb]{0.5,0.5,0.5}{text}%背景颜色
\par
\colorbox[rgb]{0.5,0.5,0.5}{\textcolor{white}{words to be in color}}%背景颜色
\end{document}
xelatex -shell-escape test.tex