\documentclass[11pt,twoside]{article}\makeatletter

\IfFileExists{xcolor.sty}%
  {\RequirePackage{xcolor}}%
  {\RequirePackage{color}}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{ifxetex}
\ifxetex
  \usepackage{fontspec}
  \usepackage{xunicode}
  \catcode`⃥=\active \def⃥{\textbackslash}
  \catcode`❴=\active \def❴{\{}
  \catcode`❵=\active \def❵{\}}
  \def\textJapanese{\fontspec{Noto Sans CJK JP}}
  \def\textChinese{\fontspec{Noto Sans CJK SC}}
  \def\textKorean{\fontspec{Noto Sans CJK KR}}
  \setmonofont{DejaVu Sans Mono}
  
\else
  \IfFileExists{utf8x.def}%
   {\usepackage[utf8x]{inputenc}
      \PrerenderUnicode{–}
    }%
   {\usepackage[utf8]{inputenc}}
  \usepackage[english]{babel}
  \usepackage[T1]{fontenc}
  \usepackage{float}
  \usepackage[]{ucs}
  \uc@dclc{8421}{default}{\textbackslash }
  \uc@dclc{10100}{default}{\{}
  \uc@dclc{10101}{default}{\}}
  \uc@dclc{8491}{default}{\AA{}}
  \uc@dclc{8239}{default}{\,}
  \uc@dclc{20154}{default}{ }
  \uc@dclc{10148}{default}{>}
  \def\textschwa{\rotatebox{-90}{e}}
  \def\textJapanese{}
  \def\textChinese{}
  \IfFileExists{tipa.sty}{\usepackage{tipa}}{}
\fi
\def\exampleFont{\ttfamily\small}
\DeclareTextSymbol{\textpi}{OML}{25}
\usepackage{relsize}
\RequirePackage{array}
\def\@testpach{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \else
    \if \@nextchar l\@ne \else
     \if \@nextchar r\tw@ \else
   \z@ \@chclass
   \if\@nextchar |\@ne \else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \else
      \if \@nextchar (8 \else
       \if \@nextchar )9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@\else
   \if \@nextchar p4 \else
    \if \@nextchar b5 \else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\gdef\arraybackslash{\let\\=\@arraycr}
\def\@textsubscript#1{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\def\abbr{}
\def\corr{}
\def\expan{}
\def\gap{}
\def\orig{}
\def\reg{}
\def\ref{}
\def\sic{}
\def\persName{}\def\name{}
\def\placeName{}
\def\orgName{}
\def\textcal#1{{\fontspec{Lucida Calligraphy}#1}}
\def\textgothic#1{{\fontspec{Lucida Blackletter}#1}}
\def\textlarge#1{{\large #1}}
\def\textoverbar#1{\ensuremath{\overline{#1}}}
\def\textquoted#1{‘#1’}
\def\textsmall#1{{\small #1}}
\def\textsubscript#1{\@textsubscript{\selectfont#1}}
\def\textxi{\ensuremath{\xi}}
\def\titlem{\itshape}
\newenvironment{biblfree}{}{\ifvmode\par\fi }
\newenvironment{bibl}{}{}
\newenvironment{byline}{\vskip6pt\itshape\fontsize{16pt}{18pt}\selectfont}{\par }
\newenvironment{citbibl}{}{\ifvmode\par\fi }
\newenvironment{docAuthor}{\ifvmode\vskip4pt\fontsize{16pt}{18pt}\selectfont\fi\itshape}{\ifvmode\par\fi }
\newenvironment{docDate}{}{\ifvmode\par\fi }
\newenvironment{docImprint}{\vskip 6pt}{\ifvmode\par\fi }
\newenvironment{docTitle}{\vskip6pt\bfseries\fontsize{22pt}{25pt}\selectfont}{\par }
\newenvironment{msHead}{\vskip 6pt}{\par}
\newenvironment{msItem}{\vskip 6pt}{\par}
\newenvironment{rubric}{}{}
\newenvironment{titlePart}{}{\par }

\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}}
\newcolumntype{P}[1]{){\arraybackslash}p{#1}}
\newcolumntype{B}[1]{){\arraybackslash}b{#1}}
\newcolumntype{M}[1]{){\arraybackslash}m{#1}}
\definecolor{label}{gray}{0.75}
\def\unusedattribute#1{\sout{\textcolor{label}{#1}}}
\DeclareRobustCommand*{\xref}{\hyper@normalise\xref@}
\def\xref@#1#2{\hyper@linkurl{#2}{#1}}
\begingroup
\catcode`\_=\active
\gdef_#1{\ensuremath{\sb{\mathrm{#1}}}}
\endgroup
\mathcode`\_=\string"8000
\catcode`\_=12\relax

\usepackage[a4paper,twoside,lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in,marginparwidth=0.75in]{geometry}
\usepackage{framed}

\definecolor{shadecolor}{gray}{0.95}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{marginnote}

\renewcommand{\@cite}[1]{#1}


\renewcommand*{\marginfont}{\itshape\footnotesize}

\def\Gin@extensions{.pdf,.png,.jpg,.mps,.tif}

  \pagestyle{fancy}

\usepackage[pdftitle={The Fast Integration of a Rotated Rectangle Applied to the Rotated Haar-like Features for Rotated Objects Detection},
 pdfauthor={}]{hyperref}
\hyperbaseurl{}

	 \paperwidth210mm
	 \paperheight297mm
              
\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}
\clubpenalty=8000
\emergencystretch 3em
\hbadness=4000
\hyphenpenalty=400
\pretolerance=750
\tolerance=2000
\vbadness=4000
\widowpenalty=10000

\renewcommand\section{\@startsection {section}{1}{\z@}%
     {-1.75ex \@plus -0.5ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
     {-1.75ex\@plus -0.5ex \@minus- .2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
     {-1.5ex\@plus -0.35ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\large}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
     {-1ex \@plus-0.35ex \@minus -0.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\normalsize}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
     {1.5ex \@plus1ex \@minus .2ex}%
     {-1em}%
     {\reset@font\normalsize\bfseries}}


\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
 \@tempdima 1.5em \begingroup
 \parindent \z@ \rightskip \@pnumwidth 
 \parfillskip -\@pnumwidth 
 \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
 \endgroup}
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\@ifundefined{c@section}{\newcounter{section}}{}
\@ifundefined{c@chapter}{\newcounter{chapter}}{}
\newif\if@mainmatter 
\@mainmattertrue
\def\chaptername{Chapter}
\def\frontmatter{%
  \pagenumbering{roman}
  \def\thechapter{\@roman\c@chapter}
  \def\theHchapter{\roman{chapter}}
  \def\thesection{\@roman\c@section}
  \def\theHsection{\roman{section}}
  \def\@chapapp{}%
}
\def\mainmatter{%
  \cleardoublepage
  \def\thechapter{\@arabic\c@chapter}
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \pagenumbering{arabic}
  \setcounter{secnumdepth}{6}
  \def\@chapapp{\chaptername}%
  \def\theHchapter{\arabic{chapter}}
  \def\thesection{\@arabic\c@section}
  \def\theHsection{\arabic{section}}
}
\def\backmatter{%
  \cleardoublepage
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \setcounter{secnumdepth}{2}
  \def\@chapapp{\appendixname}%
  \def\thechapter{\@Alph\c@chapter}
  \def\theHchapter{\Alph{chapter}}
  \appendix
}
\newenvironment{bibitemlist}[1]{%
   \list{\@biblabel{\@arabic\c@enumiv}}%
       {\settowidth\labelwidth{\@biblabel{#1}}%
        \leftmargin\labelwidth
        \advance\leftmargin\labelsep
        \@openbib@code
        \usecounter{enumiv}%
        \let\p@enumiv\@empty
        \renewcommand\theenumiv{\@arabic\c@enumiv}%
	}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}%
  {\def\@noitemerr
    {\@latex@warning{Empty `bibitemlist' environment}}%
    \endlist}

\def\tableofcontents{\section*{\contentsname}\@starttoc{toc}}
\parskip0pt
\parindent1em
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\newenvironment{reflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemsep}{0pt}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\itshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{sansreflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\itemsep}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\upshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{specHead}[2]%
 {\vspace{20pt}\hrule\vspace{10pt}%
  \phantomsection\label{#1}\markright{#2}%

  \pdfbookmark[2]{#2}{#1}%
  \hspace{-0.75in}{\bfseries\fontsize{16pt}{18pt}\selectfont#2}%
  }{}
      \def\TheFullDate{2020 2020-01-15 (revised: 14 Year 2020 15 January 2020)}
\def\TheID{\makeatother }
\def\TheDate{2020 2020-01-15}
\title{The Fast Integration of a Rotated Rectangle Applied to the Rotated Haar-like Features for Rotated Objects Detection}
\author{}\makeatletter 
\makeatletter
\newcommand*{\cleartoleftpage}{%
  \clearpage
    \if@twoside
    \ifodd\c@page
      \hbox{}\newpage
      \if@twocolumn
        \hbox{}\newpage
      \fi
    \fi
  \fi
}
\makeatother
\makeatletter
\thispagestyle{empty}
\markright{\@title}\markboth{\@title}{\@author}
\renewcommand\small{\@setfontsize\small{9pt}{11pt}\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2\p@
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini
               \topsep 2\p@ plus1\p@ minus1\p@
               \parsep 2\p@ plus\p@ minus\p@
               \itemsep 1pt}
}
\makeatother
\fvset{frame=single,numberblanklines=false,xleftmargin=5mm,xrightmargin=5mm}
\fancyhf{} 
\setlength{\headheight}{14pt}
\fancyhead[LE]{\bfseries\leftmark} 
\fancyhead[RO]{\bfseries\rightmark} 
\fancyfoot[RO]{}
\fancyfoot[CO]{\thepage}
\fancyfoot[LO]{\TheID}
\fancyfoot[LE]{}
\fancyfoot[CE]{\thepage}
\fancyfoot[RE]{\TheID}
\hypersetup{citebordercolor=0.75 0.75 0.75,linkbordercolor=0.75 0.75 0.75,urlbordercolor=0.75 0.75 0.75,bookmarksnumbered=true}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}

\date{}
\usepackage{authblk}

\providecommand{\keywords}[1]
{
\footnotesize
  \textbf{\textit{Index terms---}} #1
}

\usepackage{graphicx,xcolor}
\definecolor{GJBlue}{HTML}{273B81}
\definecolor{GJLightBlue}{HTML}{0A9DD9}
\definecolor{GJMediumGrey}{HTML}{6D6E70}
\definecolor{GJLightGrey}{HTML}{929497} 

\renewenvironment{abstract}{%
   \setlength{\parindent}{0pt}\raggedright
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
   \textcolor{GJBlue}{\large\bfseries\abstractname\space}
}{%   
   \vskip8pt
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
}

\usepackage[absolute,overlay]{textpos}

\makeatother 
      \usepackage{lineno}
      \linenumbers
      
\begin{document}

             \author[1]{Mohamed  Oualla}

             \author[2]{Khalid  Ounachad}

             \author[3]{Abdelalim  Sadiq}

             \affil[1]{  Faculty of Sciences and Technology (FST), Moulay Ismail University}

\renewcommand\Authands{ and }

\date{\small \em Received: 7 December 2019 Accepted: 5 January 2020 Published: 15 January 2020}

\maketitle


\begin{abstract}
        


The Integral Image technique, used by Viola and Jones, is generally used to calculate the integral of a rectangular filter in an input picture. This filter is a rectilinear rectangle. We propose a method to integrate a rotated one by any angle of rotation inside an image based on the Bresenham algorithm of drawing a segment. We use some pixels â??" called key points - that forms the four segments of a rotated rectangle, to calculate its Integral Image. Our method focuses on three essential tasks; the first is to determine the rule for drawing a segment (SDR), the second is to identify all the key points of the rectangle r, and the third is to calculate the integral image. The speed of this method depends on the size and angle of rotation of the rectangle. To demonstrate the efficiency of our idea, we applied it to the rotated Haar-like features that we proposed in a later work [12], which had as objectives the improvement of the Viola and Jones algorithm to detect the rotated faces in a given image. We performed tests on more widespread databases of images, which showed that the application of this technique to rotated Haar-Like features improves the performance of object detectors, in general, and faces in particular.

\end{abstract}


\keywords{haar-like features, integral image, face detection, object detection, , adaboost.}

\begin{textblock*}{18cm}(1cm,1cm) % {block width} (coords) 
\textcolor{GJBlue}{\LARGE Global Journals \LaTeX\ JournalKaleidoscope\texttrademark}
\end{textblock*}

\begin{textblock*}{18cm}(1.4cm,1.5cm) % {block width} (coords) 
\textcolor{GJBlue}{\footnotesize \\ Artificial Intelligence formulated this projection for compatibility purposes from the original article published at Global Journals. However, this technology is currently in beta. \emph{Therefore, kindly ignore odd layouts, missed formulae, text, tables, or figures.}}
\end{textblock*}


\let\tabcellsep& 	 	 		 
\section[{Introduction}]{Introduction}\par
daboost learning algorithm, proposed by \hyperref[b0]{[1]}, and adapted by Viola and Jones for object detection \hyperref[b1]{[2]} \hyperref[b2]{[3]}, is one of the most widely used algorithms in detection. This algorithm, based on Haar-like features (Fig. \hyperref[fig_0]{2}), achieves a high detection rate and we use it widely in face and pedestrian detection \hyperref[b3]{[4]} [5] \hyperref[b5]{[6]}.\par
Haar-like feature classifiers trained by Adaboost algorithm are often incapable of finding rotated objects (Fig. \hyperref[fig_8]{1}). Many experts have proposed several solutions to fill this problem; Viola and Jones \hyperref[b1]{[2]} [3] \hyperref[b3]{[4]} used rotated positive examples during training, but this approach may give some inaccurate classifier. Another process adopted by several researchers \hyperref[b4]{[5]} [7] \hyperref[b8]{[9]} [10] consists of training several classifiers which specialize in certain angle intervals, this approach provides classifiers with appropriate accuracy and efficiency, but it makes the training computationally more expensive. In \hyperref[b6]{[7]} \hyperref[b7]{[8]} the image is physically or virtually rotated until the edges of the Haar-Like feature are aligned vertically or horizontally, this approach makes the detection computationally more expensive and also a loss of information when a set of pixels will be outside the region of interest.\par
Fig. \hyperref[fig_8]{1}: Face detection with the latest method \hyperref[b12]{[12]}; The algorithm is unable to detect a few rotated faces.\par
In \hyperref[b12]{[12]}, we gave a solution allowing, firstly, to define, dynamically, a set of rotated Haar-Like Features by more than 50 angles formally expressed by ????????????ð??"ð??" (?? / ??) such that ?? and ?? are two integers. And secondly, to calculate, approximately, the rotated integral image of these rectangles to preserve the two advantages (speed and simplicity) for which Viola and Jones invented this technique for the first time. This method has shown a disadvantage, a little annoying, which consists of a false alarm rate, which is relatively high.\par
In this paper, we propose a method that calculates the real Integral Image of a rotated rectangle based on the set of pixels, called key-points, forming each of its four segments. Indeed, we determine these points by adapting the algorithm for drawing a segment \hyperref[b13]{[13]}.\par
We organize this paper as follows: Section II presents some work done in the literature. In section III we will propose our technique concerning the quickly integration of a rotated rectangle. Section IV explores the results obtained by our two experiments carried out for the case of face detection. In section V, we will give a summary of our work, some conclusions, and perspectives. 
\section[{II.}]{II.} 
\section[{Related Work}]{Related Work}\par
The technique of the Integral Image, strongly associated with the famous algorithm of Viola and Jones \hyperref[b1]{[2]}, is a technique that goes back to the year 1984 when Crow \hyperref[b16]{[16]} introduced it, for the first time, in computer graphics. Its use in computer vision began in 2001 when Viola and Jones used it to calculate the integral of the rectangular filters called HaarLike features, shown in Fig. \hyperref[fig_0]{2} (a), considered as one of the pillars of their realtime face detection algorithm. Therefore, most researchers have widely used and developed this technique to solve the problems related to the detection of objects, including faces detection \hyperref[b1]{[2]}[7], pedestrian detection \hyperref[b3]{[4]}[6], etc.\par
Let ?? be an image of dimension ?? × ??, ?? (??, ??) is the intensity of the pixel (??, ??) of the image ??. The Integral Image is another image ???? such that for each pixel (??, ??): (see Fig. \hyperref[fig_0]{2(b)}).\par
(1) Therefore, the integration of each axis-aligned (parallel to the axes of the image coordinate system) rectangle ?? = [(??, ??), ??, ?] is calculated only in four references: (see Fig. \hyperref[fig_0]{2(c)})????(??) = ????(?? + ??, ?? + ?) ? ????(??, ?? + ?) ? ????(?? + ??, ??) + ????(??, ??)\textbf{(2)}\par
As (??, ??) is the upper left corner of ??, ?? and ? represent, respectively, its width and height. In the rest of this article, this type of rectangle is called a normal rectangle.\par
This technique was then the subject of several improvements, in order to detect rotated objects in an image. Indeed, several works have chosen to feed the original set of HaarLike features, initially proposed by Viola and Jones (Fig. \hyperref[fig_0]{2} (a)), by others which are rotated by a variety of angles and offering an ease of calculating their integration. In particular, Lienhart et al. \hyperref[b4]{[5]} who introduced a 45° tilted integral image. Then, Barczak et al. \hyperref[b6]{[7]} and Du et al. \hyperref[b7]{[8]} retained the same technique of Viola and Jones to incorporate rotated features by 26.57° and 63.5°. Then Barczak and Mossom \hyperref[b8]{[9]} tried to generalize this technique for angles having a tangent in the form of a rational number 1/?? or ??/1. Another work is that of Ramirez et al. \hyperref[b9]{[10]}, who introduced the asymmetric Haar Features. Pham et al. \hyperref[b14]{[14]} have developed a technique called Polygonal integration to divide a polygon into a set of axis-aligned rectangles (normal rectangles), then determine its integration according to those of these rectangles. Doretto et al. \hyperref[b15]{[15]} gave an extension of formula 1 to compute the integral of a domain ?? ? ? ?? , which consists of a finite unification of axis-aligned rectangles. Formally, a rotated rectangle is defined by a sixelement vector as shown by the following formula:??(?, ?) = ? ?(? ? , ? ? ) ???? ???? ? ? ? = (?, ? ? , ? ? , ? ? , ? ? , ?) ? ??? × (? * ) 4 × ? *\par
The set of rotated rectangles ? is divided into two categories ??? and ???. These two categories are defined by formulas 4 and 5.??? = \{?? ? ?| (???? ? ???? ???? ???? ? ????) ???? (???? ? ???? ???? ???? ? ????)\} (4) ??? = \{?? ? ?| (???? > ???? ???? ???? < ????) ???? (???? < ???? ???? ???? > ????)\}\textbf{(5)}\par
Knowing that ??, ?? and ?? are other vertices of the rotated rectangle ??, as shown in Fig. \hyperref[fig_1]{3}.   
\section[{b) The integration of a rotated rectangle}]{b) The integration of a rotated rectangle}\par
The principle of our method consists in dividing the rectangle that encapsulates ?? into five normal rectangles called ??i, as shown in Fig. \hyperref[fig_4]{4 and 5}. The result of the intersection of ?? with the rectangles ??i is the right triangle called ???? . We illustrated this definition in Fig. \hyperref[fig_3]{5}. The following equation gives the identification of these triangles: ???? = ?? ? ???? for ?? ? \{1,2,3,4\}.\par
Knowing that the integral of a rotated rectangle is:(6) (7)\par
Indeed, we can divide a triangle ?? into several normal rectangles ??i (axis-aligned rectangles) (Fig. \hyperref[fig_5]{6}). The two vertices (????, ????) of each rectangle ??i crossed by the hypotenuse of the triangle ?? are named key points. The set of these key points, ????, are found by applying the Segment Drawing Rule (SDR) \hyperref[b13]{[13]}. In fact, ???? = ? ? ?? such that:? = ???1 ? ???2 ? ???3 ? ???4 ?? = ????1 ? ????2 ? ????3 ? ????4\par
Knowing that ????? and ?????? are, respectively, the set of key points ???? and ???? of the triangle ????.\par
Mathematically speaking, let ð??"ð??": ? ? ???? ?? be a function that determines the vector ???? = (??0, . . , ???? ) of the key points, for each rectangle ?? of ??, therefore: ð??"ð??"(??) = ???? = (??0, . . , ???? ). And ð??"ð??": ???? ?? ? ? a function that computes the Integral Image from a vector of points. In other words, ð??"ð??"(????) = ??(??). Indeed, we define the function I as a function composed of ð??"ð??" and ð??"ð??": ??(??) = ð??"ð??"??ð??"ð??"(??).\par
Therefore, the method proposed in this article, to calculate the Integral Image of a rectangle, is based on three essential tasks: ? Determine the rule for drawing a segment (SDR); ? Determine all the key points (????, ????) of the rectangle ??; ? Calculate the integral image of r according to its key points. 
\section[{c) Triangle integration}]{c) Triangle integration}\par
The major problem of the computation part of the integral of a right triangle ?? is that each slope of its hypotenuse presents different difficulties. Is very difficult to integrate a line with an irrational slope because at the level of each pixel intersected by the line, the partition model is always different. For our case, the slope of the  hypotenuse of the triangle t is rational. Specifically, a line with a rational slope produces a finite number of pixel partition models. Consider, for example, a positive slope ?? of a line ??, when this line crosses a set of pixels, the model of partitions of the pixels is repeated at each ?? pixels intersected by the line ?? \hyperref[b14]{[14]}. This repetition is the key of our solution proposed in this article. More generally, let ?? = ??/?? (??, ?? ? ?? ?????? ?? ? 0) be a rational slope, the integer vector ???? = (??, ??) / ð??"ð??"???? (| ?? |, | ?? |) represents a 2D interval such as the partition model is periodic. Otherwise, the partition model at any pixel (??, ??) is the same at (??, ??) + ????. To determine the pixels traversed by a line ??, we used the Bresenham algorithm \hyperref[b13]{[13]}, which makes it possible to define the Segment Drawing Rule (SDR).\par
Segment Drawing Rule (SDR): Based on the Bresenham algorithm \hyperref[b13]{[13]}, which allows determining all the pixels forming a segment, we have defined the rule allowing to go through all the pixels forming the hypotenuse of a iangle ?? (Fig. \hyperref[fig_6]{6 (a)}). This rule ???????? is a vector formally defined as follows: ???????? = (??1, ??2, ? , ????) such that ?? represents the number of floors which is equal to ??????(???, ???) and ???? that of pixels for the ????? floor;  The authors of \hyperref[b14]{[14]} have shown that the number of pixels, denoted np, traversed by the hypotenuse of the right triangle ?? for each partition is ???? = | ?? ?| + | ??? |? 1, indeed, we easily deduce that the total number of pixels traversed by the hypotenuse of ?? is: ???? ? ?????1 = ???? ?????? ??0 = ???? ; ? ???? = ??.\par
Therefore, the Integral Image of a triangle ?? will be the sum of those of all rectangles ????, formally: Indeed, the Integral Image of a normal rectangle ????, ????(????), according to formula 2 is: Such as the function ???? represents the Integral Image of a given pixel.\par
Therefore, from equation 8 and 9, we deduce the formula to calculate the Integral Image of a triangle ?? (case of triangle ??1):\par
Knowing that for ??1: ???? = ?? ???? ???? = ??.\par
According to this principle, we deduce the formulas for calculating the integral image of all types of triangles of the rotated rectangle ??: (Fig. \hyperref[fig_3]{5}) 
\section[{d) Rotated Rectangle Integration}]{d) Rotated Rectangle Integration}\par
In the end and according to equation 7, formula 15 shows the Integral Image of a rotated rectangle. That of the rectangle of the medium ??5 is easily found via the equation 2.\par
Knowing that ?? is the number of floors of the hypotenuses of triangles ??1 and ??2 and ?? that of triangles ??2 and ??4. So, the total number of key points ???? of a rotated rectangle ??, adding the two points ?? and ??, is ?? = 4 (?? + ??) ? 2.\par
In general, the Integral Image of a rotated rectangle ?? is: Such as ???? is the parity corresponding to the pixel ????. Fig. 7 shows the variation of the sign ???? according to the type of the triangle and the key point (+1, for ??, and ?1 for ??)\par
Algorithm 2 illustrates the process proposed to find these points for the two segments [????] and  {\ref [????]} with the direction of the path ?? = ???????????????? ? ????ð??"ð??"???.\par
Indeed, to compute the Integral Image of a rotated rectangle, we need 4 (?? + 1) ? 2 access to the memory, which means that the associated algorithm has a linear complexity O(n). In practice, the worst-case complexity varies between 40 and 74 operations for only 12\% of cases.  The complexity in the best case varies between 6 and 20 operations for more than 45\% of cases, and 23 on average for all cases.?(?) = ??(?) ? ??(?)) ? ? ??(? 1? ) ??1 0 + ? ??(? 1? ??2 0 ) ? ? ??(? 2? ??1 0 ) + ? ??(? 2? ) ??2 0 + ? ??(? 3? ) ??1 0 ? ? ??(? 3? ??2 0 ) + ? ??(? 4? ??1 0 ) ? ? ??(? 4? ??2 0 )\textbf{(15)}?(?) = ? ? ? * ??(? ? ??1 0 ) /? ? ? \{+1, ?1\}\textbf{(16)}\par
IV. 
\section[{Experiences}]{Experiences}\par
During the learning phase, we adopted the use of two of the most known and most available databases in our field, which are: UMIST Face Database \hyperref[b17]{[17]} and CMU-PIE Face Database \hyperref[b19]{[18]}. The base of faces UMIST consists of 564 images -cut and trimmed -of 20 people (mixed race, kind, and appearance) \hyperref[b17]{[17]}. In this database we represent each person's frontal profile by a multitude of images illustrating a range of poses from different angles; their number is about 19 up to 36 for each person. These images are sampled, in our experience, up to a resolution of 20 × 20. Their number is 6900 images of faces. The CMU-PIE database contains 41,368 images obtained from 68 people. These images were taken in the CMU 3D room using a set of 13 high-quality color cameras synchronized with 21 flashes. The resulting RGB color images are 640 × 486 in size. These images are sampled, in our experiment, up to a resolution of 18 × 20. And for the training of our detector, we used 9996 images of faces. For the test phase, we used the standard MIT + CMU base which contains 117 images with 511 faces.\par
The result of our work is the creation of two detectors UMIST-Detector and PIE-Detector from the process of learning using the two image bases, respectively, UMIST and PIE CMU described above. The learning phase uses more than 300,000 features (or weak classifiers) divided into two types: normal and rotated. The storage of this large number of features took on a large amount of memory. The result of this phase is a detector composed of a group of features selected by the AdaBoost algorithm. For each feature selected, it takes about 3 to 4 hours -sometimes more -calculating time using an HP Notebook PC with a 2.6 GHz frame rate and 4 GB of memory. This slowness of learning was considered a major drawback of the Viola \& Jones method. The Viola-Jones detector contains 4297 features distributed over 32 stages, as is presented in the article of its authors  {\ref [2][3]}. The difference in the number of weak classifiers of our detectors and that of Viola and Jones is because we use, at most of the original features, those rotated by different angles. Table  {\ref I} shows the numbers of normal and rotated features selected by AdaBoost for each experiment, compared by the number obtained by Viola and Jones. Indeed, this added value has allowed us to achieve good results. These results clearly show that our detectors have correct detection rates greater than or nearly equal to those reported by Viola-Jones. UMIST-Detector has a detection accuracy of up to 97.8\%, and this amounts to the fact that the images of the UMIST database are better pre-processed and standardized at the level of illumination, rotation of faces, different human races, etc. With PIE-Detector the detection rate cannot exceed the 95.9\% threshold. To have performance tests comparable to those performed by Viola \& Jones and Rowly \hyperref[b1]{[2]}[3] \hyperref[b10]{[11]}, we used the MIT-CMU test database, which consists of 117 images and 511 faces. Viola and Jones used 130 images and 507 faces. A difference that we neglected because most of the images were the same or have undergone some slight modifications. Fig. 8 illustrates these results as a ROC.\par
The results are generally better, especially those obtained by Viola and Jones. Our two detectors have lower false alarm rates than the other methods; 28\% for the first experience and 31\% for the second. By using a 2.3 GHz core i3 and a 4 GB memory capacity, our detectors can scan an image of 252 × 426 pixels in about 0.9 seconds with a scaling factor of 1.2. what makes them a little bit slow compared to that of Viola and Jones (0.7 seconds to scan an image of 384 × 288), and this is mainly due to the large number of weak classifiers used by our method. The average speed to determine all the key points for each rotated feature does not exceed 62.4 ?s.\par
V. 
\section[{Conclusion}]{Conclusion}\par
In this work, we have proposed a simple, and effective method to integrate a rectangle rotated by any angle of rotation. The principle of this technique is to find specific pixels (key points) for each segment of the rectangle, then calculate the sum of its pixels according to these points. To find these points, we adopted the Bresenham algorithm for drawing a segment. This technique applied to the Viola and Jones algorithm with rotated HaarLike features added to the core set has proven efficiency and a high detection rate for detecting rotated faces in an image. In fact, we performed two experiments using, for the training phase, two image databases known in the literature, notably UMIST and CMU-PIE, and the MIT-CMU database for the test phase. Our perspective is to apply this technique for real-time detection and also for face and emotion recognition.\begin{figure}[htbp]
\noindent\textbf{2}\includegraphics[]{image-2.png}
\caption{\label{fig_0}Fig. 2 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3}\includegraphics[]{image-3.png}
\caption{\label{fig_1}Fig. 3 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{4}\includegraphics[]{image-4.png}
\caption{\label{fig_2}Fig. 4 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{5}\includegraphics[]{image-5.png}
\caption{\label{fig_3}Fig. 5 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{4}\includegraphics[]{image-6.png}
\caption{\label{fig_4}4 ?=1}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{6}\includegraphics[]{image-7.png}
\caption{\label{fig_5}Fig. 6 (}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{6}\includegraphics[]{image-8.png}
\caption{\label{fig_6}Fig. 6 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-9.png}
\caption{\label{fig_7}×}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{1}\includegraphics[]{image-10.png}
\caption{\label{fig_8}Algorithm 1 /}\end{figure}
   \begin{figure}[htbp]
\noindent\textbf{1} \par 
\begin{longtable}{P{0.6788778877887789\textwidth}P{0.05049504950495049\textwidth}P{0.09537953795379538\textwidth}P{0.025247524752475246\textwidth}}
\tabcellsep UMIST\tabcellsep \multicolumn{2}{l}{CMU-PIE VIOLA \& JONES}\\
Normal\tabcellsep 4103\tabcellsep 4075\tabcellsep 4297\\
Rotated\tabcellsep 6424\tabcellsep 4393\tabcellsep 0\\
TOTAL\tabcellsep 10527\tabcellsep 8468\tabcellsep 4297\\
\multicolumn{4}{l}{Our program was run for 21 days for the first}\\
\multicolumn{4}{l}{experience and 15 days for the second. The first}\\
\multicolumn{4}{l}{detector consists of 10527 features distributed over 53}\\
\multicolumn{4}{l}{stages, and the second detector contains 8468 features}\\
\multicolumn{2}{l}{spread over 46 stages.}\tabcellsep \tabcellsep \end{longtable} \par
 
\caption{\label{tab_1}Table 1 :}\end{figure}
 			\footnote{( ) F © 2020 Global JournalsThe Fast Integration of a Rotated Rectangle Applied to the Rotated Haar-like Features for Rotated Objects Detection} 		 		\backmatter  			  				\begin{bibitemlist}{1}
\bibitem[Rowley and Baluja]{b10}\label{b10} 	 		\textit{},  		 			H A Rowley 		,  		 			S Baluja 		.  		 	 
\bibitem[ ASI SERIES F COMPUTER AND SYSTEMS SCIENCES ()]{b18}\label{b18} 	 		\textit{},  	 	 		\textit{ASI SERIES F COMPUTER AND SYSTEMS SCIENCES}  		1998. Springer. 163 p. .  	 
\bibitem[Freund and Schapire ()]{b0}\label{b0} 	 		‘A desicion-theoretic generalization of on-line learning and an application to boosting’.  		 			Y Freund 		,  		 			R Schapire 		.  	 	 		\textit{Journal of Computer and System Sciences(JCSS)}  		1997. 55  (1)  p. .  	 
\bibitem[Oualla et al. (2015)]{b12}\label{b12} 	 		‘A new approach to represent rotated haar-like features for objects detection’.  		 			M Oualla 		,  		 			A Sadiq 		,  		 			S Mbarki 		.  	 	 		\textit{Journal of Theoretical \& Applied Information Technology (JATIT)}  		10th August 2015. 78 p. .  	 
\bibitem[Bresenham (1965)]{b13}\label{b13} 	 		‘Algorithm for computer control of a digital plotter’.  		 			Jack E Bresenham 		.  	 	 		\textit{IBM Systems Journal}  		1th January 1965. 4  (1)  p. .  	 
\bibitem[Lienhart and Maydt ()]{b4}\label{b4} 	 		‘An extended set of haar-like features for rapid object detection’.  		 			R Lienhart 		,  		 			J Maydt 		.  	 	 		\textit{International Conference on},  				2002. IEEE. 1 p. .  	 
\bibitem[Doretto et al. ()]{b15}\label{b15} 	 		‘Appearance-based person reidentification in camera networks: Problem overview and current approaches’.  		 			G Doretto 		,  		 			T Sebastian 		,  		 			P Tu 		,  		 			J Rittscher 		.  	 	 		\textit{Journal of Ambient Intelligence and Humanized Computing},  				 (Berlin / Heidelberg)  		2011. Springer. p. .  	 
\bibitem[Graham and Allinson ()]{b17}\label{b17} 	 		‘Characterizing Virtual Eigen signatures for General Purpose Face Recognition’.  		 			D B Graham 		,  		 			N M Allinson 		.  	 	 		\textit{NATO Advanced Study Institute, Face recognition: from theory to applications},  				1997.  	 
\bibitem[Viola et al. (2005)]{b3}\label{b3} 	 		‘Detecting pedestrians using patterns of motion and appearance’.  		 			P Viola 		,  		 			M Jones 		,  		 			D Snow 		.  	 	 		\textit{International Journal of Computer Vision}  		July 2005. 63  (2)  p. .  	 
\bibitem[Pham et al.]{b14}\label{b14} 	 		‘Fast Polygonal Integration and Its Application in Extending Haar-like Features to Improve Object Detection’.  		 			M T Pham 		,  		 			Y Gao 		,  		 			V D D Hoang 		,  		 			T J Cham 		.  	 	 		\textit{proceeding of the IEEE conference on Computer Vision and Pattern Recognition},  				 (eeding of the IEEE conference on Computer Vision and Pattern Recognition)  		CVPR.  	 
\bibitem[Ramirez and Fuentes ()]{b9}\label{b9} 	 		\textit{Multi-Pose Face Detection With Asymmetric Haar Features},  		 			G A Ramirez 		,  		 			O Fuentes 		.  		2008. Mountain,CO: WACV.  	 
\bibitem[Kanade ()]{b11}\label{b11} 	 		‘Neural networkbased face detection’.  		 			T Kanade 		.  	 	 		\textit{In IEEE Trans. Pattern Analysis and Machine Intelligence}  		1998. 20 p. .  	 
\bibitem[Miyamoto et al. ()]{b5}\label{b5} 	 		‘Pedestrian recognition in far-infrared images by combining boosting-based detection and skeleton-based stochastic tracking’.  		 			R Miyamoto 		,  		 			H Sugano 		,  		 			H Saito 		.  	 	 		\textit{Advances in Image and Video Technology},  				 (Berlin Heidelberg)  		2006. Springer. p. .  	 
\bibitem[Viola and Jones ()]{b2}\label{b2} 	 		‘Rapid Object Detection Using a Boosted Cascade of Simple Features’.  		 			P Viola 		,  		 			M Jones 		.  	 	 		\textit{IEEE Computer Society Conference on Computer Vision and Pattern Recognition},  				2001. 1 p. .  	 
\bibitem[Viola and Jones ()]{b1}\label{b1} 	 		‘Robust real-time object detection’.  		 			P Viola 		,  		 			M Jones 		.  	 	 		\textit{International Journal of Computer Vision (IJCV)}  		2001. 57  (2)  p. .  	 
\bibitem[Du et al. (2006)]{b7}\label{b7} 	 		‘Rotated Haar-Like Features for Face Detection with In-Plane Rotation’.  		 			S Du 		,  		 			N Zheng 		,  		 			Q You 		,  		 			Y Wu 		,  		 			M Yuan 		,  		 			J Wu 		.  	 	 		\textit{12th International Conference},  				 (Xi'an, China)  		2006. October 18-20. 2006. p. .  	 
\bibitem[Messom and Barczak ()]{b8}\label{b8} 	 		‘Stream processing for fast and efficient rotated Haarlike features using rotated integral images’.  		 			C H Messom 		,  		 			A L C Barczak 		.  	 	 		\textit{IJISTA}  		2009. 7  (1)  p. .  	 
\bibitem[Crow ()]{b16}\label{b16} 	 		\textit{Summed-area tables for texture mapping},  		 			F Crow 		.  		1984. 84 p. .  	 
\bibitem[Sim et al. ()]{b19}\label{b19} 	 		‘The CMU Pose, Illumination, and Expression (PIE) Database of Human Faces’.  		 			T Sim 		,  		 			S Baker 		,  		 			M Bsat 		.  	 	 		\textit{Transactions on Pattern Analysis and Machine Intelligence},  				2003. 25 p. .  	 
\bibitem[Barczak ()]{b6}\label{b6} 	 		‘Toward an Efficient Implementation of a Rotation Invariant Detector using Haar-Like Features’.  		 			A L C Barczak 		.  	 	 		\textit{Proceedings of the IEEE/RSJ international conference on Intelligent robots and systems},  				 (the IEEE/RSJ international conference on Intelligent robots and systemsNouvelle-Zélande, Dunedin)  		2005.  	 
\end{bibitemlist}
 			 		 	 
\end{document}
