How can I construct projection matrix using rotation and translation vector inside reconstruction.json?

I want to project GCP over images. I guess I need projection matrix for each camera. I saw a file which contains rotation and translation vector. But how do i plug them into matrix ?

“camera”: CAMERA_ID,
“rotation”: [X, Y, Z], # Estimated rotation as an angle-axis vector
“translation”: [X, Y, Z], # Estimated translation
“gps_position”: [X, Y, Z], # GPS coordinates in the reconstruction reference
“gps_dop”: METERS, # GPS accuracy in meters
“orientation”: NUMBER, # EXIF orientation tag (can be 1, 3, 6 or 8)
“capture_time”: SECONDS # Capture time as a UNIX timestamp

1 Like

Really cool question!

You’re looking to show the GCP over each individual image, not the final product like DEM/Ortho, right?

Have you looked into the source code of POSM GCPI? It might help as it does this, in effect:

1 Like

Yes, I checked out POSM GCPI but it didnt help. I have gcp files without image coordinates. I want to develop a feature that helps users to place gcp s easly without having image coordinates like in other softwares like Agisoft

Hmm… So pre-select images that might have the GCP in them via a certain distance from its EXIF GPS location compared to the GCP’s location?

Yea i found similar soultion as you say but it has -/+ 15 degree errors. Because EXIF yaw pitch roll angle is not correct %100 so i need estimated rotation. And that rotation can be found in reconstruction.json. But i couldnt convert angle-axis rotation to yaw-pitch-roll angles.
you can see my current solution output.i can find gcp s over images, but need better solution.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.