Package boofcv.alg.geo.pose
Class PRnPDirectLinearTransform
- java.lang.Object
-
- boofcv.alg.geo.pose.PRnPDirectLinearTransform
-
public class PRnPDirectLinearTransform extends java.lang.ObjectEstimates a projective camera given N points, i.e. Projective N Point (PRnP). This is the projective equivalent of the perspective N Point (PnP) problem. Each point consists of a 2D pixel observations and 3D homogenous coordinate. Pixels are normalized to have zero means and standard deviation of 1. 3D points are scaled to have a f-norm of 1. See [1] for details. Each point provides 2 linearly independent equations, requiring a minimum of 6 points. More points are allowed.WARNING: Planar surfaces are critical and it will fail on those.
[1] Peter Abeles, "Scene Reconstruction Notes: BoofCV Technical Report" 2019
-
-
Field Summary
Fields Modifier and Type Field Description protected NormalizationPoint2DN1org.ejml.interfaces.SolveNullSpace<org.ejml.data.DMatrixRMaj>solverNullspace
-
Constructor Summary
Constructors Constructor Description PRnPDirectLinearTransform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMinimumPoints()booleanisNormalize3D()booleanprocess(java.util.List<georegression.struct.point.Point4D_F64> worldPts, java.util.List<georegression.struct.point.Point2D_F64> observed, org.ejml.data.DMatrixRMaj solutionModel)Computes projective camera matrix.voidsetNormalize3D(boolean normalize3D)
-
-
-
Field Detail
-
N1
protected NormalizationPoint2D N1
-
solverNullspace
public org.ejml.interfaces.SolveNullSpace<org.ejml.data.DMatrixRMaj> solverNullspace
-
-
Method Detail
-
process
public boolean process(java.util.List<georegression.struct.point.Point4D_F64> worldPts, java.util.List<georegression.struct.point.Point2D_F64> observed, org.ejml.data.DMatrixRMaj solutionModel)Computes projective camera matrix.- Parameters:
worldPts- points in homogenous 3D coordinates in world frame. Might be modified.observed- pixel coordinates of points. not modifiedsolutionModel- (Output) 3x4 camera matrix- Returns:
- true if succesfull
-
getMinimumPoints
public int getMinimumPoints()
-
isNormalize3D
public boolean isNormalize3D()
-
setNormalize3D
public void setNormalize3D(boolean normalize3D)
-
-