<s>
Perspective-n-Point	B-General_Concept
is	O
the	O
problem	O
of	O
estimating	O
the	O
pose	O
of	O
a	O
calibrated	O
camera	O
given	O
a	O
set	O
of	O
3D	O
points	O
in	O
the	O
world	O
and	O
their	O
corresponding	O
2D	O
projections	O
in	O
the	O
image	O
.	O
</s>
<s>
This	O
problem	O
originates	O
from	O
camera	B-Algorithm
calibration	I-Algorithm
and	O
has	O
many	O
applications	O
in	O
computer	O
vision	O
and	O
other	O
areas	O
,	O
including	O
3D	B-General_Concept
pose	I-General_Concept
estimation	I-General_Concept
,	O
robotics	O
and	O
augmented	O
reality	O
.	O
</s>
<s>
Given	O
a	O
set	O
of	O
3D	O
points	O
in	O
a	O
world	O
reference	O
frame	O
and	O
their	O
corresponding	O
2D	O
image	O
projections	O
as	O
well	O
as	O
the	O
calibrated	O
intrinsic	B-Algorithm
camera	I-Algorithm
parameters	I-Algorithm
,	O
determine	O
the	O
6	O
DOF	O
pose	O
of	O
the	O
camera	O
in	O
the	O
form	O
of	O
its	O
rotation	O
and	O
translation	O
with	O
respect	O
to	O
the	O
world	O
.	O
</s>
<s>
where	O
is	O
the	O
homogeneous	O
world	O
point	O
,	O
is	O
the	O
corresponding	O
homogeneous	O
image	O
point	O
,	O
is	O
the	O
matrix	O
of	O
intrinsic	B-Algorithm
camera	I-Algorithm
parameters	I-Algorithm
,	O
(	O
where	O
and	O
are	O
the	O
scaled	O
focal	O
lengths	O
,	O
is	O
the	O
skew	O
parameter	O
which	O
is	O
sometimes	O
assumed	O
to	O
be	O
0	O
,	O
and	O
is	O
the	O
principal	O
point	O
)	O
,	O
is	O
a	O
scale	O
factor	O
for	O
the	O
image	O
point	O
,	O
and	O
and	O
are	O
the	O
desired	O
3D	O
rotation	O
and	O
3D	O
translation	O
of	O
the	O
camera	O
(	O
extrinsic	O
parameters	O
)	O
that	O
are	O
being	O
calculated	O
.	O
</s>
<s>
or	O
the	O
Direct	B-General_Concept
Linear	I-General_Concept
Transform	I-General_Concept
(	O
DLT	O
)	O
applied	O
to	O
the	O
projection	O
model	O
,	O
are	O
exceptions	O
to	O
this	O
assumption	O
as	O
they	O
estimate	O
these	O
intrinsic	O
parameters	O
as	O
well	O
as	O
the	O
extrinsic	O
parameters	O
which	O
make	O
up	O
the	O
pose	O
of	O
the	O
camera	O
that	O
the	O
original	O
PnP	O
problem	O
is	O
trying	O
to	O
find	O
.	O
</s>
<s>
RANSAC	B-Algorithm
is	O
also	O
commonly	O
used	O
with	O
a	O
PnP	O
method	O
to	O
make	O
the	O
solution	O
robust	O
to	O
outliers	O
in	O
the	O
set	O
of	O
point	O
correspondences	O
.	O
</s>
<s>
This	O
following	O
section	O
describes	O
two	O
common	O
methods	O
that	O
can	O
be	O
used	O
to	O
solve	O
the	O
PnP	O
problem	O
that	O
are	O
also	O
readily	O
available	O
in	O
open	O
source	O
software	O
and	O
how	O
RANSAC	B-Algorithm
can	O
be	O
used	O
to	O
deal	O
with	O
outliers	O
in	O
the	O
data	O
set	O
.	O
</s>
<s>
An	O
open	O
source	O
implementation	O
of	O
Gao	O
's	O
P3P	O
solver	O
can	O
be	O
found	O
in	O
OpenCV	B-Language
's	O
calib3d	O
module	O
in	O
the	O
solvePnP	O
function	O
.	O
</s>
<s>
After	O
calculating	O
the	O
initial	O
coefficients	O
,	O
the	O
Gauss-Newton	B-Algorithm
algorithm	I-Algorithm
is	O
used	O
to	O
refine	O
them	O
.	O
</s>
<s>
Open	O
source	O
software	O
implementations	O
of	O
this	O
method	O
can	O
be	O
found	O
in	O
OpenCV	B-Language
's	O
Camera	B-Algorithm
Calibration	I-Algorithm
and	O
3D	O
Reconstruction	O
module	O
in	O
the	O
solvePnP	O
function	O
as	O
well	O
as	O
from	O
the	O
code	O
published	O
by	O
Lepetit	O
,	O
et	O
al	O
.	O
</s>
<s>
This	O
method	O
is	O
not	O
robust	O
against	O
outliers	O
and	O
generally	O
compares	O
poorly	O
to	O
RANSAC	B-Algorithm
P3P	O
followed	O
by	O
nonlinear	O
refinement	O
.	O
</s>
<s>
Each	O
regional	O
minimum	O
is	O
computed	O
with	O
sequential	B-Algorithm
quadratic	I-Algorithm
programming	I-Algorithm
that	O
is	O
initiated	O
at	O
nearest	O
orthogonal	O
approximation	O
matrices	O
.	O
</s>
<s>
A	O
C++	O
implementation	O
is	O
,	O
which	O
has	O
also	O
been	O
ported	O
to	O
OpenCV	B-Language
and	O
included	O
in	O
the	O
Camera	B-Algorithm
Calibration	I-Algorithm
and	O
3D	O
Reconstruction	O
module	O
(	O
SolvePnP	O
function	O
)	O
.	O
</s>
<s>
Thus	O
,	O
RANSAC	B-Algorithm
can	O
be	O
used	O
in	O
conjunction	O
with	O
existing	O
solutions	O
to	O
make	O
the	O
final	O
solution	O
for	O
the	O
camera	O
pose	O
more	O
robust	O
to	O
outliers	O
.	O
</s>
<s>
An	O
open	O
source	O
implementation	O
of	O
PnP	O
methods	O
with	O
RANSAC	B-Algorithm
can	O
be	O
found	O
in	O
OpenCV	B-Language
's	O
Camera	B-Algorithm
Calibration	I-Algorithm
and	O
3D	O
Reconstruction	O
module	O
in	O
the	O
solvePnPRansac	O
function	O
.	O
</s>
