Class CameraPlaneProjection

java.lang.Object
boofcv.alg.sfm.overhead.CameraPlaneProjection

public class CameraPlaneProjection extends Object
Computes the location of a point on the plane from an observation in pixels and the reverse. See CreateSyntheticOverheadView for details about reference frames and how the plane is defined.
  • Constructor Details

    • CameraPlaneProjection

      public CameraPlaneProjection()
  • Method Details

    • setConfiguration

      public void setConfiguration(Se3_F64 planeToCamera, CameraPinholeBrown intrinsic)
      Configures the camera's intrinsic and extrinsic parameters
      Parameters:
      planeToCamera - Transform from the plane to the camera
      intrinsic - Pixel to normalized image coordinates
    • setIntrinsic

      public void setIntrinsic(CameraPinholeBrown intrinsic)
      Configures the camera's intrinsic parameters
      Parameters:
      intrinsic - Intrinsic camera parameters
    • setPlaneToCamera

      public void setPlaneToCamera(Se3_F64 planeToCamera, boolean computeInverse)
      Specifies camera's extrinsic parameters.
      Parameters:
      planeToCamera - Transform from plane to camera reference frame
      computeInverse - Set to true if pixelToPlane is going to be called. performs extra calculation
    • planeToPixel

      public boolean planeToPixel(double pointX, double pointY, Point2D_F64 pixel)
      Given a point on the plane find the pixel in the image.
      Parameters:
      pointX - (input) Point on the plane, x-axis
      pointY - (input) Point on the plane, y-axis
      pixel - (output) Pixel in the image
      Returns:
      true if the point is in front of the camera. False if not.
    • planeToNormalized

      public boolean planeToNormalized(double pointX, double pointY, Point2D_F64 normalized)
      Given a point on the plane find the normalized image coordinate
      Parameters:
      pointX - (input) Point on the plane, x-axis
      pointY - (input) Point on the plane, y-axis
      normalized - (output) Normalized image coordinate of pixel
      Returns:
      true if the point is in front of the camera. False if not.
    • pixelToPlane

      public boolean pixelToPlane(double pixelX, double pixelY, Point2D_F64 plane)
      Given a pixel, find the point on the plane. Be sure computeInverse was set to true in setPlaneToCamera(georegression.struct.se.Se3_F64, boolean)
      Parameters:
      pixelX - (input) Pixel in the image, x-axis
      pixelY - (input) Pixel in the image, y-axis
      plane - (output) Point on the plane.
      Returns:
      true if a point on the plane was found in front of the camera
    • normalToPlane

      public boolean normalToPlane(double normX, double normY, Point2D_F64 plane)
      Given a pixel in normalized coordinates, find the point on the plane. Make sure invert was set to true in setPlaneToCamera(georegression.struct.se.Se3_F64, boolean)
      Parameters:
      normX - (input) Image pixel in normalized coordinates, x-axis
      normY - (input) Image pixel in normalized coordinates, y-axis
      plane - (output) Point on the plane.
      Returns:
      true if a point on the plane was found in front of the camera