I’m trying to work this out following the formula from https://support.pix4d.com/hc/en-us/articles/202977149-What-does-the-Output-Params-Folder-contain-#label12 but I’m hitting a bit of a road block. Presumably I can get the X and Y coordinates of any pixel in the orthomosaic by using the world file (world coordinates + pixel location * pixel size), and the Z coordinate from the DSM, however when I multiply these coordinates by a matrix from the [project]_pmatrix.txt file I get some very large values, so I tried doing the same with the point cloud and got the same results.
Let’s say I pick a point from my cloud in the Pix4D Mapper desktop app: the point coordinates (X, Y, Z) are (612834, 6022815, 334) using WGS84. The app shows me several images which contain this point, and I pick one where the pixel coordinates corresponding to my chosen point are (1499, 1112) in an image of size 4000 x 3000. I take the matrix corresponding to this image and multiply it with the point coordinates to get a new set of coordinates (x,y,z) which gives(14190732177, 4139527026, 723498). Dividing x and y by z gives me a pixel location of (19614, 5799), which is clearly incorrect.
What am I doing wrong? Some of the matrix values look a bit odd, so I’ve copied it below; could this be the culprit? My map is ~650m by ~450m at a resolution of ~3cm.
I also tried to use the pmatrix and it does not seem to work right now. We do not actively support these output files and do not have any ressources to allocate to investigate this issue for the moment.
You can use the project_name_calibrated_camera_parameters file instead. This one is used by our Cloud team for the 3D inspector and works well for perspective cameras. Hope this is an acceptable workaround!
I am also having the same problem and the proposed workaround does not work for me, I get the same results I am getting with pmatrix.
I am also selecting the a point from the rayCloud and using its computed position values (in meters WGS84) as the input vector (X,Y,Z).
The result I am getting with both pmatrix and with the longer computation suggested using calibrated_camera_parameters file, are not in the range of pixels location in the image (u,v=(64995.18738050609, -2451.1417401108715)).
How would you suggest to find what goes wrong here?
I have run into exactly the same problem and have lost a fair bit of time trying to resolve the issue. Pix4D must come with a solution to this problem as it is a very important issue. How can you say that you will not support the output files generated with Pix4D when your website itself refers to these files for various purposes.
We took into consideration your comments and we apologize for any inconvenience caused.
Our Team has further investigated the cause of the issue and it was discovered that a constant shift should be applied to the 3D coordinates that refer to the output coordinate system before using the pmatrix. The offset should be subtracted from the 3D coordinate and it is located in the project_name_offset.xyz file.
For more information check again our updated article.
We encourage you to share your experience on this post, so that the Community can be helped.
Thanks, that’s great. I tried processing my data again with the new information and it works perfectly now.
When I originally posted I was using a free trial to evaluate whether Pix4D was suitable for my needs, which now has obviously expired. Would it be possible to get another free trial so that I may reevaluate Pix4D now that I know how to properly use the output?
Is there a way to find 3D location (X,Y,Z) of a pixel location given image p-matrix and offset. Just i want to reverse the above process that finding a 3d point location from 2d un-distorted image pixel location.
There is no separate output that allows the conversion of the 2D undistorted image coordinates to the 3D location. You could maybe try to use the inverted pmatrix output in order to get these values.
These cookies are necessary for the website to function and cannot be switched off in our systems.
They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences,
logging in, or filling in forms. These cookies do not store any personally identifiable information.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site.
They help us to know which pages are the most and least popular and see how visitors move around the site.
All information these cookies collect is aggregated and therefore anonymous.
If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partner (Google).
They may be used by Google to build a profile of your interests and show you relevant adverts on other sites.
They do not directly store personal information but are based on uniquely identifying your browser and internet device.
If you do not allow these cookies, you will experience less targeted advertising.