[ccmasterkernel U20] Photogroup functions pixelToRay/point3dToPixel

I read in CC SDK U20 that there are new transformation functions pixelToRay/point3dToPixel for Photogroup. For what purpose it is used?

I am looking for function to get photo corners projected on ground and transform from image pixel coordinates to real coordinates for each photos.


  • Description: Photogroup functions pixelToRay/point3dT
    Product: ContextCapture
    Product Area: Options

    These functions are needed to project a 3D point onto a photo and get its 2D pixel coordinates (useful for reprojection error computation, texturing or many other applications) and to do the opposite transformation, get a 3D ray from 2D pixel coordinates.

     

    In practice to project a 3D point onto an image given its 3D position in the world reference system, the photo pose in the world and the photogroup properties some have to:

    • Transform the 3D point from world to camera reference system by applying the photo pose
      p3dcamera = rotation * (p3dworld – center)
    • Project this p3dcamera point to the image using the new SDK function “point3dToPixel”

    To get a 3D ray from a pixel point some have to:

    • Get a 3D ray in camera coordinate system using the new SDK function “pixelToRay”
    • Transform the 3D ray from camera pose to world reference system
      ray3dworld = rotationTransposed * ray3dcamera + center
  • Thank you so much for the formula “p3dcamera = rotation * (p3dworld – center)”
    I haven't found the definition of Photo.pose.rotation and Photo.pose.center in sdk. I mistaken that as "p3dcamera = rotation * p3dworld + center" and always get the wrong projection. Your answer saved me a lot of trouble. Thank you so much!