boofcv.alg.geo.pose
Class PnPDistanceReprojectionSq
- java.lang.Object
-
- boofcv.alg.geo.pose.PnPDistanceReprojectionSq
-
- All Implemented Interfaces:
- DistanceModelMonoPixels<Se3_F64,Point2D3D>, DistanceFromModel<Se3_F64,Point2D3D>
public class PnPDistanceReprojectionSq extends java.lang.Object implements DistanceModelMonoPixels<Se3_F64,Point2D3D>
Computes the reprojection error squared for a given motion and
Point2D3D. If the intrinsic parameters are provided then the error will be computed in pixels. Observations are assumed to be in normalized image coordinates.error = (x'-x)^2 + (y' - y)^2 where (x,y) is the observed point location and (x',y') is the reprojected point from the 3D coordinate and coordinate transformation.
-
-
Constructor Summary
Constructors Constructor and Description PnPDistanceReprojectionSq()PnPDistanceReprojectionSq(double fx, double fy, double skew)Computes reprojection error in pixels when provided to camera's intrinsic calibration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcomputeDistance(java.util.List<Point2D3D> observations, double[] distance)Computes the distance a set of points is from the model and saves the results in the provided array.doublecomputeDistance(Point2D3D pt)Computes the distance the point is from the model.voidsetIntrinsic(double fx, double fy, double skew)Specifies intrinsic camera parameters.voidsetModel(Se3_F64 worldToCamera)Sets the model parameters.
-
-
-
Constructor Detail
-
PnPDistanceReprojectionSq
public PnPDistanceReprojectionSq()
-
PnPDistanceReprojectionSq
public PnPDistanceReprojectionSq(double fx, double fy, double skew)Computes reprojection error in pixels when provided to camera's intrinsic calibration.- Parameters:
fx- focal length xfy- focal length yskew- pixel skew
-
-
Method Detail
-
setIntrinsic
public void setIntrinsic(double fx, double fy, double skew)Description copied from interface:DistanceModelMonoPixelsSpecifies intrinsic camera parameters.- Specified by:
setIntrinsicin interfaceDistanceModelMonoPixels<Se3_F64,Point2D3D>- Parameters:
fx- focal length x-axisfy- focal length y-axisskew- skew
-
setModel
public void setModel(Se3_F64 worldToCamera)
Description copied from interface:DistanceFromModelSets the model parameters.- Specified by:
setModelin interfaceDistanceFromModel<Se3_F64,Point2D3D>- Parameters:
worldToCamera- Model parameters.
-
computeDistance
public double computeDistance(Point2D3D pt)
Description copied from interface:DistanceFromModelComputes the distance the point is from the model.- Specified by:
computeDistancein interfaceDistanceFromModel<Se3_F64,Point2D3D>- Parameters:
pt- Point being evaluated. Not modified.- Returns:
- Distance the point is from the model.
-
computeDistance
public void computeDistance(java.util.List<Point2D3D> observations, double[] distance)
Description copied from interface:DistanceFromModelComputes the distance a set of points is from the model and saves the results in the provided array.- Specified by:
computeDistancein interfaceDistanceFromModel<Se3_F64,Point2D3D>- Parameters:
observations- Set of points which are to be evaluated.distance- Where model distance is stored.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG