Commit 56d874d483a39c82094399e4ec65f59645431b78

Authored by Josh Klontz
1 parent 07d78aba

more work on face_recognition.tex

share/openbr/likely/face_recognition.tex
@@ -19,18 +19,19 @@ As Likely is a literate programming language, this document is both the source c @@ -19,18 +19,19 @@ As Likely is a literate programming language, this document is both the source c
19 \section{Quantization} 19 \section{Quantization}
20 \begin{likely} 20 \begin{likely}
21 quantize := 21 quantize :=
22 -{  
23 - lo := data.min-element  
24 - hi := data.max-element  
25 - scale := (/ 255 (- hi lo))  
26 -  
27 - src :-> 22 + () :->
28 { 23 {
29 - dst := (imitate-size src (imitate-dimensions u8 src.type))  
30 - (dst src) :=>  
31 - dst :<- src.(- lo).(* scale) 24 + lo := data.min-element
  25 + hi := data.max-element
  26 + scale := (/ 255 (- hi lo))
  27 +
  28 + src :->
  29 + {
  30 + dst := (imitate-size src (imitate-dimensions u8 src.type))
  31 + (dst src) :=>
  32 + dst :<- src.(- lo).(* scale)
  33 + }
32 } 34 }
33 -}  
34 \end{likely} 35 \end{likely}
35 36
36 \section{Consolidated Algorithm} 37 \section{Consolidated Algorithm}
@@ -38,18 +39,19 @@ The top level definition of the face recognition algorithm. @@ -38,18 +39,19 @@ The top level definition of the face recognition algorithm.
38 39
39 \begin{likely} 40 \begin{likely}
40 face-recognition := 41 face-recognition :=
41 -{  
42 - algorithm := quantize  
43 - src :->  
44 - src.algorithm  
45 -} 42 + () :->
  43 + {
  44 + algorithm := (quantize)
  45 + src :->
  46 + src.algorithm
  47 + }
46 \end{likely} 48 \end{likely}
47 49
48 \section{Entry Point} 50 \section{Entry Point}
49 The entry point to the outside world is a single C function \texttt{face\_recognition} that takes as input a \texttt{likely\_mat} (the input image) and outputs a new \texttt{likely\_mat} (the feature vector). 51 The entry point to the outside world is a single C function \texttt{face\_recognition} that takes as input a \texttt{likely\_mat} (the input image) and outputs a new \texttt{likely\_mat} (the feature vector).
50 52
51 \begin{likely} 53 \begin{likely}
52 -(extern u8X "face_recognition" f32X face-recognition) 54 +(extern u8X "face_recognition" f32X (face-recognition))
53 \end{likely} 55 \end{likely}
54 56
55 \end{document} 57 \end{document}