public class QuadPoseEstimator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected double |
bestError |
protected georegression.struct.se.Se3_F64 |
bestPose |
static double |
FUDGE_FACTOR |
protected java.util.List<georegression.struct.point.Point2D_F64> |
listObs |
protected boofcv.struct.distort.Point2Transform2_F64 |
normToPixel |
protected boofcv.struct.distort.Point2Transform2_F64 |
pixelToNorm |
protected java.util.List<boofcv.struct.geo.Point2D3D> |
points |
static double |
SMALL_PIXELS |
| Constructor and Description |
|---|
QuadPoseEstimator(double refineTol,
int refineIterations)
Constructor which picks reasonable and generally good algorithms for pose estimation.
|
QuadPoseEstimator(boofcv.abst.geo.EstimateNofPnP p3p,
boofcv.abst.geo.RefinePnP refine)
Constructor in which internal estimation algorithms are provided
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeErrors(georegression.struct.se.Se3_F64 fiducialToCamera)
Compute the sum of reprojection errors for all four points
|
java.util.List<boofcv.struct.geo.Point2D3D> |
createCopyPoints2D3D() |
protected void |
enlarge(georegression.struct.shapes.Quadrilateral_F64 corners,
double scale)
Enlarges the quadrilateral to make it more sensitive to changes in orientation
|
protected boolean |
estimate(georegression.struct.shapes.Quadrilateral_F64 cornersPixels,
georegression.struct.shapes.Quadrilateral_F64 cornersNorm,
georegression.struct.se.Se3_F64 foundFiducialToCamera)
Given the observed corners of the quad in the image in pixels estimate and store the results
of its pose
|
protected void |
estimateP3P(int excluded)
Estimates the pose using P3P from 3 out of 4 points.
|
protected void |
extend(georegression.struct.point.Point2D_F64 pivot,
georegression.struct.point.Point2D_F64 corner,
double scale) |
double |
getError()
Reprojection error of fiducial
|
georegression.struct.se.Se3_F64 |
getWorldToCamera() |
void |
pixelToMarker(double pixelX,
double pixelY,
georegression.struct.point.Point2D_F64 marker)
Given the found solution, compute the the observed pixel would appear on the marker's surface.
|
boolean |
process(georegression.struct.shapes.Quadrilateral_F64 corners,
boolean unitsPixels)
Estimate the 3D pose of the camera from the observed location of the fiducial.
|
void |
setFiducial(double x0,
double y0,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Specify the location of points on the 2D fiducial.
|
void |
setLensDistoriton(boofcv.alg.distort.LensDistortionNarrowFOV distortion)
Specifies the intrinsic parameters.
|
public static final double SMALL_PIXELS
public static final double FUDGE_FACTOR
protected boofcv.struct.distort.Point2Transform2_F64 pixelToNorm
protected boofcv.struct.distort.Point2Transform2_F64 normToPixel
protected java.util.List<boofcv.struct.geo.Point2D3D> points
protected java.util.List<georegression.struct.point.Point2D_F64> listObs
protected double bestError
protected georegression.struct.se.Se3_F64 bestPose
public QuadPoseEstimator(double refineTol,
int refineIterations)
refineTol - Convergence tolerance. Try 1e-8refineIterations - Number of refinement iterations. Try 200public QuadPoseEstimator(boofcv.abst.geo.EstimateNofPnP p3p,
boofcv.abst.geo.RefinePnP refine)
public void setLensDistoriton(boofcv.alg.distort.LensDistortionNarrowFOV distortion)
distortion - Intrinsic camera parameterspublic void setFiducial(double x0,
double y0,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
public void pixelToMarker(double pixelX,
double pixelY,
georegression.struct.point.Point2D_F64 marker)
pixelX - (Input) pixel coordinatepixelY - (Input) pixel coordinatemarker - (Output) location on the markerpublic boolean process(georegression.struct.shapes.Quadrilateral_F64 corners,
boolean unitsPixels)
Estimate the 3D pose of the camera from the observed location of the fiducial.
MUST callsetFiducial(double, double, double, double, double, double, double, double) and setLensDistoriton(boofcv.alg.distort.LensDistortionNarrowFOV) before calling this function.corners - Observed corners of the fiducial.unitsPixels - If true the specified corners are in original image pixels or false for normalized image coordinatesprotected boolean estimate(georegression.struct.shapes.Quadrilateral_F64 cornersPixels,
georegression.struct.shapes.Quadrilateral_F64 cornersNorm,
georegression.struct.se.Se3_F64 foundFiducialToCamera)
protected void estimateP3P(int excluded)
excluded - which corner to exclude and use to check the answers from the othersprotected void enlarge(georegression.struct.shapes.Quadrilateral_F64 corners,
double scale)
protected void extend(georegression.struct.point.Point2D_F64 pivot,
georegression.struct.point.Point2D_F64 corner,
double scale)
protected double computeErrors(georegression.struct.se.Se3_F64 fiducialToCamera)
fiducialToCamera - Transform being evaluatedpublic georegression.struct.se.Se3_F64 getWorldToCamera()
public double getError()
public java.util.List<boofcv.struct.geo.Point2D3D> createCopyPoints2D3D()