0

with image_points_to_world_plane I pass Row/Col coordinates in Pixel and get a coordinate back in mm referred to the world plane..

Is there way to invert this? I need for example to know what Row/Col pixel contains the 0/0 coordinate of the world plane. so for example I give it a coordinate from the world plane and it tells me in what pixel of the image I can find this.

Can this be done?

sharkyenergy
  • 3,842
  • 10
  • 46
  • 97

2 Answers2

1

First try and use "cam_par_pose_to_hom_mat3d" to first create a matrix which can map world points to image points. Then try using the instruction "project_point_hom_mat3d" to convert your world point to the image plane.

Jake Chittle
  • 316
  • 1
  • 2
  • 4
-1
* CameraParam, CameraPose from Calibration
*
* ImgPix to World
*
RowTrans:=[400,400,500,500]
ColTrans:=[400,500,400,500]
image_points_to_world_plane (CameraParam, CameraPose,RowTrans,ColTrans, 'm', X2DReal, Y2DReal)
*
* WorldPix to ImgPix 
*
* Convert pose into transformation matrix.
pose_to_hom_mat3d(CameraPose, HomMat3D)
* Transform 3D points from world into the camera coordinate system.
affine_trans_point_3d(HomMat3D, X2DReal, Y2DReal, X2DReal*0, X, Y, Z)
* Project 3D points into image.
project_3d_point(X, Y, Z, CameraParam, Row, Column)
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Galex
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 29 '23 at 04:33