Class WorldToCameraToPixel


  • public class WorldToCameraToPixel
    extends java.lang.Object
    Convenience class which will take a point in world coordinates, translate it to camera reference frame, then project onto the image plane and compute its pixels. Supports lens distortion
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure​(LensDistortionNarrowFOV distortion, georegression.struct.se.Se3_F64 worldToCamera)
      Specifies intrinsic camera parameters and the transform from world to camera.
      void configure​(CameraPinholeBrown intrinsic, georegression.struct.se.Se3_F64 worldToCamera)
      Specifies intrinsic camera parameters and the transform from world to camera.
      void configure​(CameraPinhole intrinsic, georegression.struct.se.Se3_F64 worldToCamera)  
      georegression.struct.point.Point2D_F64 transform​(georegression.struct.point.Point3D_F64 worldPt)
      Computes location of 3D point in world as observed in the camera.
      boolean transform​(georegression.struct.point.Point3D_F64 worldPt, georegression.struct.point.Point2D_F64 pixelPt)
      Computes the observed location of the specified point in world coordinates in the camera pixel.
      boolean transform​(georegression.struct.point.Point3D_F64 worldPt, georegression.struct.point.Point2D_F64 pixelPt, georegression.struct.point.Point2D_F64 normPt)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorldToCameraToPixel

        public WorldToCameraToPixel()
    • Method Detail

      • configure

        public void configure​(CameraPinholeBrown intrinsic,
                              georegression.struct.se.Se3_F64 worldToCamera)
        Specifies intrinsic camera parameters and the transform from world to camera.
        Parameters:
        intrinsic - camera parameters
        worldToCamera - transform from world to camera
      • configure

        public void configure​(CameraPinhole intrinsic,
                              georegression.struct.se.Se3_F64 worldToCamera)
      • configure

        public void configure​(LensDistortionNarrowFOV distortion,
                              georegression.struct.se.Se3_F64 worldToCamera)
        Specifies intrinsic camera parameters and the transform from world to camera.
        Parameters:
        distortion - camera parameters
        worldToCamera - transform from world to camera
      • transform

        public boolean transform​(georegression.struct.point.Point3D_F64 worldPt,
                                 georegression.struct.point.Point2D_F64 pixelPt)
        Computes the observed location of the specified point in world coordinates in the camera pixel. If the object can't be viewed because it is behind the camera then false is returned.
        Parameters:
        worldPt - Location of point in world frame
        pixelPt - Pixel observation of point.
        Returns:
        True if visible (+z) or false if not visible (-z)
      • transform

        public boolean transform​(georegression.struct.point.Point3D_F64 worldPt,
                                 georegression.struct.point.Point2D_F64 pixelPt,
                                 georegression.struct.point.Point2D_F64 normPt)
      • transform

        public georegression.struct.point.Point2D_F64 transform​(georegression.struct.point.Point3D_F64 worldPt)
        Computes location of 3D point in world as observed in the camera. Point is returned if visible or null if not visible.
        Parameters:
        worldPt - Location of point on world reference frame
        Returns:
        Pixel coordinate of point or null if not visible