\documentstyle[12pt]{article}
\setlength{\textwidth}{9.75 in}
\setlength{\evensidemargin}{-0.4 in}
\setlength{\oddsidemargin}{-0.4  in}
\setlength{\textheight}{7.2 in}
\setlength{\topmargin}{-1.05 in}
\setlength{\arraycolsep}{9pt}
\renewcommand{\baselinestretch}{1.0}
\newcommand{\psfuh}    {/u/vision/fuh/document/}
\newcommand{\open}{\mbox{\Large $\circ$}}
\newcommand{\close}{\mbox{\Large $\bullet$}}
% \input{psfig}
\newcommand{\epsfig}[1]{\psfig{#1}}
\begin{document}
\bibliographystyle{plain}
\Huge 
\begin{center}
Chapter 20 Accuracy
\end{center}

\LARGE
20.1 Introduction \\
accurately characterizing performance: important aspect of vision system 

\vspace{1cm} 
20.2 Mensuration Quantizing Error \\
position on digital grid: has inherent quantizing error due to discreteness \\
$B$: coordinate of line's right endpoint \\
$\Delta c$: spacing between pixel centers \\
$q$: uniform random variable, $0 \leq q \leq 1$ \\
$B=\Delta c(B^*-1/2+q)$ \\
$B^*=Ceiling(B/\Delta c -1/2)$ \\
relationship between the line segment end and the digital grid \\
=====Fig. 20.1===== 

\vspace{1cm} 
\noindent
$\beta^*$: digital coordinate of the line's rightmost pixel \\
natural quantizing model:
\[
\beta^* = \left \{
\begin{array}{ll}
B^* & {\rm with \ probability \ } q \\
B^*-1 & {\rm with \ probability \ } 1-q 
\end{array}
\right .
\]
letting $x$ be a random variable where
\[
x = \left \{
\begin{array}{ll}
1 & {\rm with \ probability \ } q \\
0 & {\rm with \ probability \ } 1-q 
\end{array}
\right .
\]
restate the quantizing model:
\[
\beta^* = B^* -1+x
\]
note: $E(x)=q$ and $E(x^2)=q$ \\
the mean of digital coordinate $\beta^*$:
\[
E(\beta^*)=E(B^*-1+x)=E\left (\frac{B}{\Delta c}+\frac{1}{2}-q-1+x\right )
=\frac{B}{\Delta c}-\frac{1}{2}
\]
thus unbiased estimator $\hat{B}$ for position $B$ is $\hat{B}=\Delta c(\beta^*+\frac{1}{2})$ \\
the variance of digital coordinate $\beta^*$:
\[
V(\beta^*)=E\left \{ \left [ 
\beta^*-\left ( \frac{B}{\Delta c}-\frac{1}{2}\right ) \right ]^2 \right \}
=E\left [ \left (B^*-1+x-\frac{B}{\Delta c}+\frac{1}{2}\right )^2 \right ]
\]
\[
=E[(x-q)^2]=E(q-2q^2+q^2)=E(q-q^2)=\frac{1}{2}-\frac{1}{3}=\frac{1}{6}
\]
$A$: line's left endpoint handled in a similar way

\vspace{1cm} 
20.3 Automated Position Inspection: False-Alarm and Misdetection Rates \\
in industrial position inspection: mechanism machines part to specification\\
inspection: ensures machining or part placement is correct \\
automated inspector: consists of machine identifying critical object points \\
$t$: known number for relative position \\
$x$: actual position \\
$x$: Gaussian distribution with mean $t$ and standard deviation $\sigma_x$ \\
$t\pm \alpha$: tolerance interval centered around position $t$ \\
$|x-t|<\alpha$: position is good \\
$|x-t|\geq\alpha$: position is bad 

\vspace{1cm} 
\noindent
actual position $x$: not known \\
measurement $y$: obtained by observing actual position and measuring it \\
measurement $y$: noisy and not equal to $x$ \\
$y$ given $x$: Gaussian distribution with mean $x$ and standard deviation $\sigma_y$ \\
$t\pm \beta$: acceptance interval for decision that actual position in tolerance\\
$|y-t|<\beta$: inspection system decides the position is good \\
$|y-t|\geq \beta$: inspection system decides the position is bad \\
false alarm: good position falsely called bad \\
misdetection: bad position missed and incorrectly called good \\
false-alarm rate is the conditional probability:
\[
P_F=P(|y-t|>\beta \ | \ |x-t|<\alpha)
\]
misdetection rate is the conditional probability:
\[
P_M=P(|y-t|<\beta \ | \ |x-t|>\alpha)
\]
entire probability model: characterized by five parameters $t,\sigma_x,\sigma_y,\alpha,\beta$ \\
problem: how to compute false-alarm and misdetection probabilities 

\vspace{1cm} 
20.3.1 Analysis \\
$P(x)$: probability density function for actual position $x$ \\
$P(y|x)$: conditional probability density function for $y$ given $x$ \\
with Gaussian distribution assumption:
\[
P(x)=\frac{1}{\sqrt{2\pi}\sigma_x}e^{-\frac{1}{2}\left ( \frac{x-t}{\sigma_x}
\right )^2}
\]
\[
P(y|x)=\frac{1}{\sqrt{2\pi}\sigma_y}e^{-\frac{1}{2}\left ( \frac{y-x}{\sigma_y}
\right )^2}
\]
conditional probability $P(|y-t|<\beta\ |\ |x-t|<\alpha)$ closely related to false-alarm probability:
\[
P(|y-t|<\beta\ |\ |x-t|<\alpha)=1-P(|y-t|>\beta\ |\ |x-t|<\alpha)=1-P_F
\]
now
\[
P(|y-t|<\beta\ |\ |x-t|<\alpha)=P(-\beta \leq y-t \leq \beta | -\alpha \leq
x-t \leq \alpha) 
\]
\[
=\frac{P(-\alpha \leq x-t \leq \alpha, -\beta \leq y-t \leq \beta)}{
P(-\alpha \leq x-t \leq \alpha)}
=\frac{\int_{x=-\alpha+t}^{\alpha+t} \int_{y=-\beta+t}^{\beta+t} P(y|x)P(x)dydx}{\int_{x=-\alpha+t}^{\alpha+t} P(x)dx}
\]
\[
=\frac{\int_{x=-\alpha+t}^{\alpha+t} \int_{y=-\beta+t}^{\beta+t} 
\frac{1}{\sqrt{2\pi}\sigma_x}e^{-\frac{1}{2}\left ( \frac{x-t}{\sigma_x}
\right )^2}\frac{1}{\sqrt{2\pi}\sigma_y}e^{-\frac{1}{2}\left ( \frac{y-x}{\sigma_y}
\right )^2}dydx}{
\int_{x=-\alpha+t}^{\alpha+t} \frac{1}{\sqrt{2\pi}\sigma_x}e^{-\frac{1}{2}\left ( \frac{x-t}{\sigma_x}
\right )^2} dx}
\]
inherent invariance of false-alarm and misdetection probabilities to the scale\\
\hspace*{1cm} $\sigma_x, \sigma_y, \alpha, \beta$ \\
define relative precision $r$ of the measurement:
\[
r = \frac{\sigma_y}{2\alpha}=\frac{\sigma_y}{2k_\alpha \sigma_y}
=\frac{1}{2 k_\alpha}
\]
=====Garfield 17:67=====


\vspace{1cm} 
20.3.2 Discussion \\
when $k_\beta=\frac{\beta}{\sigma_y}$ large: acceptance interval large \\
$k_\beta$ large: all good positions are accepted \\
$k_\beta$ large: false-alarm rate small \\
$k_\beta$ large: bad positions will also be accepted \\
$k_\beta$ large: high rate of misdetection \\
$k_\beta$ small: acceptance interval relatively small \\
$k_\beta$ small: all bad positions expected not to be accepted \\
$k_\beta$ small: misdetection rate small \\
$k_\beta$ small: good positions will also not be accepted \\
$k_\beta$ small: high rate of false alarm \\
false alarm rate and misdetection rate approximately inverse proportional \\
three operating curves for a fixed failure rate of 0.05 \\
top operating curve: relative precision of 0.1 \\
middle operating curve: relative precision of 0.065 \\
bottom operating curve: relative precision of 0.05 \\
=====Fig. 20.2===== \\
three operating curves for a fixed failure rate of 0.01 \\
top operating curve: relative precision of 0.1 \\
middle operating curve: relative precision of 0.075 \\
bottom operating curve: relative precision of 0.05 \\
=====Fig. 20.3===== \\
fix failure rate and misdetection rate: as relative precision $r$ better, \\
\hspace*{1cm} tolerance interval i.e. st. dev. of measurements smaller \\
operating curves for smaller values of relative precision below larger ones 

\vspace{1cm} 
\noindent
fix relative precision and misidentification rate: as failure rate increases \\
\hspace*{1cm} false-alarm rate increases \\
three operating curves for a fixed relative precision of 0.075 \\
top operating curve: failure rate of 0.02 \\
middle operating curve: failure rate of 0.01 \\
bottom operating curve: failure rate of 0.005 \\
=====Fig. 20.4===== \\
operating curves for larger failure rates uniformly above smaller ones 

\vspace{1cm} 
\noindent
for failure rate to increase when relative precision fixed, tolerance interval\\
\hspace*{1cm} must remain the same while st. dev. of actual position increase \\
if acceptance interval does not change, misidentification rate decreases

\vspace{1cm} 
20.4 Experimental Protocol \\
controlled experiments: important component of computer vision \\
experimental protocol: so experiment can be repeated and evidence verified by \\
\hspace*{1cm} another researcher \\
experiment protocol states:
\begin{itemize}
\item quantity (or quantities) to be measured
\item accuracy of measurement
\item population of scenes/images or artificially generated data
\end{itemize}
protocol: gives experimental design and data analysis plan

\vspace{1cm} 
\noindent
The experimental design describes how a suitably random, independent, and
representative set of images from the specified population is to be sampled,
generated, or acquired. \\
accuracy criterion: how comparison between true, measured values evaluated \\
experimental data analysis plan: how hypothesis meets specified requirement \\
experimental data analysis plan: how observed data analyzed \\
experimental data analysis plan: detailed enough for another researcher \\
analysis plan: supported by theoretically developed statistical analysis 

\vspace{1cm} 
20.5 Determining the Repeatability of Vision Sensor Measuring Positions \\
vision sensors: measure position or location in 1D, 2D, 3D \\
to determine repeatability of vision sensor: some number of points, times

\vspace{1cm} 
20.5.1 The Model \\
$N$: number of points to be measured \\
$\mu_1,...,\mu_N$: actual but unknown positions of these points \\
$M$: number of times each point is measured \\
$K$: each point is $K$-dimensional \\
$Y_{nm}$: $m$th measurement of the $n$th point \\
assumption: measurements independent \\
assumption: difference between actual and measured positions $N(0, r^2 I)$ \\
$r$: standard deviation describing repeatability of vision sensor 

\vspace{1cm} 
20.5.2 Derivation \\
mean observed positions:
\[
\hat{\mu}_n = \frac{1}{M} \sum_{m=1}^M Y_{nm}
\]
sum of norms squared of differences between observed positions and mean:
\[
S^2 = \sum_{n=1}^N \sum_{m=1}^M (Y_{nm}-\hat{\mu}_n)'(Y_{nm}-\hat{\mu}_n)
\]
We need to determine the relationship between $S^2$ and $r^2$.

\vspace{1cm} 
20.6 Determining the Positional Accuracy of Vision Sensors \\
vision sensors: may measure position in 1D, 2D, 3D \\
To determine the accuracy of the vision sensor (after it has been suitably
calibrated), an experiment must be performed in which some number of points
in known positions are exposed to the sensor, the measured positions
are compared with the known positions, and the accuracy is computed in terms
of the degree to which the actual and measured positions agree. \\
positions of points: random and not follow regular pattern \\
number of points measured large enough: variance of accuracy small 

\vspace{1cm} 
20.6.1 The Model \\
$N$: number of points to be measured \\
$\mu_1,...,\mu_N$: actual but unknown positions of these points \\
$\mu_1^*,...,\mu_N^*$: unknown expected positions of these points \\
$N$ points: independent \\
$N$ points: deviations between actual and nominal position $N(0, \sigma_1^2 I)$ \\
$M$: number of times each point is measured \\
$K$: each point is $K$-dimensional \\
$Y_{nm}$: $m$th measurement of $n$th point \\
assumption: measurements independent \\
difference between $\mu_n, Y_{nm}$: $N(\mu_n+b_n, r^2 I)$ \\
bias vector $b_n$: $N(0, \sigma_b^2 I)$ \\
positional accuracy of vision sensor: described by $r^2+\sigma_b^2$ \\
The purpose of the experiment is to estimate $r^2+\sigma_b^2$ by using a 
large enough number of samples so that the unbiased estimate $\hat{\sigma}_2$
of $\hat{r}^2 + \hat{\sigma}_b^2$ is guaranteed to be sufficiently close to
$r^2+\sigma_b^2$.

\vspace{1cm} 
20.6.2 Derivation \\
sum of norms squared of differences between observed and known positions:
\[
S^2 = \sum_{n=1}^N (Y_n - \mu_n)'(Y_n - \mu_n)
\]
We need to determine the relationship between $S^2, \sigma_1^2, \sigma_2^2$.

\vspace{1cm} 
20.7 Performance Assessment of Near-Perfect Machines \\
machines in recognition and defect inspection: required to be nearly flawless\\
error rate: fraction of time that machine's judgment incorrect \\
error rate: contains false detection and misdetection errors \\
false-detection rate: false-alarm rate: unflawed part judged flawed \\
misdetection rate: flawed part judged unflawed 

\vspace{1cm} 
20.7.1 Derivation \\
consider false-alarm errors; misdetection errors similar \\
$N$: sampling size, total number of parts observed \\
$K$: number of false-alarm judgements observed to occur in acceptance test \\
$f_\circ$: machine performance specification of false-alarm fraction \\
maximum likelihood estimate $\hat{f}$ of $f$ based on $K$: $\hat{f}=K/N$ \\
$\hat{f} < f_\circ$: machine passes acceptance test \\
$\hat{f} > f_\circ$: machine fails acceptance test \\
$f$: true error rate \\
$X_n$: random variable taking value 1 for false alarm, 0 otherwise 

\vspace{1cm} 
\noindent
in maximum-likelihood technique, compute estimate $\hat{f}$ as $f$ maximizing:
\[
Prob \left ( \sum_{n=1}^N X_n \ = K |f \right ) = \left (
\begin{array}{c}
N \\
K
\end{array} \right ) f^K (1-f)^{N-K}
\]

\vspace{1cm} 
20.7.2 Balancing the Acceptance Test \\
If the buyer and seller balance their own self-interests exactly in a middle
compromise, the operating point chosen for the acceptance test will be the one
for which the false-acceptance rate (which the buyer wants to be small) equals
the missed-acceptance rate (which the seller wants to be small).

\vspace{1cm} 
20.7.3 Lot Assessment \\
In the usual lot inspection approach, a quality control inspector makes
a complete inspection on a randomly chosen small sample from each lot. \\
reason for not inspecting all of the lot: cost \\
more than specified number of defective products found: entire lot rejected

\vspace{1cm} 
20.8 Summary \\
mensuration quantizing error model: computes variance due to random error \\
=====Oldie 33:120=====






\end{document}
