Agisoft Metashape

Agisoft Metashape => Feature Requests => Topic started by: Diego on March 25, 2011, 01:45:25 AM

Title: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on March 25, 2011, 01:45:25 AM
You can create another way to export the camera positions?
Export camera positions so photogrammetric formats: X, Y, Z, and Omega, Phi, Kappa. I wish I could upload the data processing in a photogrammetric software for stereoscopic observation points


Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on March 27, 2011, 07:19:51 PM
Hi Dmitry, Any response?
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Dmitry Semyonov on March 27, 2011, 10:33:15 PM
Hello Diego,

Thank you for a suggestion. It seems that conversion to Omega, Phi, Kappa representation should be pretty straightforward.

Can you please clarify the following:

1. In what coordinate system the camera positions should be exported? Is it a local coordinate system, or geographic one (UTM for example)?

2. In which order the rotations should be applied? Maybe you have a link to the document describing the file format and treatment of individual parameters.

If you can provide some additional details, please send an e-mail at support@agisoft.ru.

With best regards,
Dmitry Semyonov
AgiSoft LLC
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on April 16, 2011, 12:05:35 AM
Can you please clarify the following:

1. In what coordinate system the camera positions should be exported? Is it a local coordinate system, or geographic one (UTM for example)?

2. In which order the rotations should be applied? Maybe you have a link to the document describing the file format and treatment of individual parameters.


Hi Dmitry,

1. R/
The coordinate system is Transverse Mercator
2. R/
The rotation angles between image and object space are defined as follows:
Omega: X as Primary (Degrees)
Phi: Y as Secondary  (Degrees)
Kappa: Z as Tertiary (Degrees)

Rotation matrix for transformation from object to image space is computed as follows: 
R = R(Kappa) * R(Phi) * R(Omega). 
The nine elements of rotation matrix are outputed at the end of each line in the order of:
r11, r12, r13, r21, r22, r23, r31, r32, r33

Example attached txt  ;)

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Dmitry Semyonov on April 16, 2011, 04:21:33 PM
Hello Diego,

Thank you for providing a sample file. We are planning to include Kappa Phi Omega export in the next update.

The only strange thing I have noticed is that the rotation matrix in your example seems to be stored in the column-major format, while the header indicates that the row-major should be used.

What software was used to generate this file?

With best regards,
Dmitry Semyonov
AgiSoft LLC
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Dmitry Semyonov on April 23, 2011, 05:55:03 PM
Hello Diego,

We have added Kappa Phi Omega export format in the latest release.

Please let me know if it works as expected.

With best regards,
Dmitry Semyonov
AgiSoft LLC
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on April 24, 2011, 06:16:00 PM
Hi Dmitry,

And perform some tests and it works great, is great when you listen to, excellent support.  See attachment, anaglyph stereoscopic observation in photogrammetric software beyond the data calculated from the positions of the camera with the turns omega, phi and kappa, works great, great job.

(http://i55.tinypic.com/lv32p.jpg)

As for the new menu, Ground Control... is much better now, the only problem I had, it does not work Export..., when done click on export control point menu reappears import menu.  is the only problem I had.

In each update is a lot of progress, excellent job.  ;)

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Dmitry Semyonov on April 24, 2011, 06:47:53 PM
Thanks Diego,

We are aware about the Export... button problem, so it will be fixed in the next update. I hope that it is not of much importance.

With best regards,
Dmitry Semyonov
AgiSoft LLC
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on April 24, 2011, 09:52:47 PM
Hi Dmitry,

Actually that's not a big problem  ;D, so if you think is important is to introduce in the workflow, the ability to align the photos from the known camera coordinates X, Y, Z, the same as those used in Ground Control.  One of the major abilities of this program is to align the photos without knowing any information of coordinates of a camera, that's great, but the problem is with large data set, but if you create an option to align the photos  camera coordinates from known, would be the solution to this problem.

Could then look like this:

Align Photos....

and

Align Photos from Known Coordinates of Camera....

With this option the program will have input to align the photos in a set of complex data, and only have to calculate the rotations from the points that can be placed in the alignment.

I would like to know what you think?

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Dmitry Semyonov on April 25, 2011, 12:37:49 PM
Hello Diego,

You are right, using GPS camera coordinates can be used to speed up alignment of large data sets. We are going to include this type of acceleration a little bit later, but the approach will be a little bit different:


I would expect 2x-8x speedup of alignment step on large data sets with this approach.

Using unmodified GPS camera coordinates as you have proposed seems not optimal, as GPS accuracy is usually much lower then required for geometry reconstruction step.

With best regards,
Dmitry Semyonov
AgiSoft LLC
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on April 25, 2011, 02:42:28 PM
Thanks Dmitry,

This is great news, I think that helped in the set of large and complex data.  Thank you very much for your support, it would be nice to see this progress soon, sounds great.

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on May 14, 2011, 07:45:35 PM
Hi Dmitry,

After several tests, this new feature to export works fine, but I have some data processed in photogrammetric software and I would be able to process in Photoscan, ie perform geometric reconstruction, and what I need is to import the precise positioned himself for the cameras  TXT format, so X, Y, Z, Omega, Phi and Kappa , ie add another option to import cameras from known data and adjusted in this format. And so you could start the process of geometric reconstruction, after importing cameras.

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on May 18, 2011, 08:00:25 PM
Any news?

Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Dmitry Semyonov on May 19, 2011, 01:34:42 AM
Hello Diego,

PhotoScan requires precise estimates of both extrinsic and intrinsic camera parameters for geometry reconstruction, including non linear lens distortion coefficients.

Unfortunately only extrinsic camera orientation data is stored in the Omega, Phi, Kappa format, which is not sufficient for successful geometry reconstruction.

Are there any other export formats available in the photogrammetric package you are using? Implementing support for a format with both intrinsic/extrinsic calibration data will be probably a much better solution.

With best regards,
Dmitry Semyonov
AgiSoft LLC
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on May 19, 2011, 04:09:12 AM
Hello Dmitry,

Thanks for your response.  I understand your point, and I think there will be no problem, the format for the import of the cameras is as follows: a text file with data tabulation and the following X, Y, Z, Omega, Phi, Kappa, fx, fy , cx, cy, skew, k1, k2, k3, p1, p2, x_pixels, y_pixels.

Please see attached, this is the format with intrinsic and extrinsic parameters of cameras.

I hope you can help me, as I have many projects adjusted with high precision and desire to rebuild their geometry in Photoscan.

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on May 20, 2011, 04:01:40 AM
Hello Dmitry,

Looked at the sample file with intrinsic and extrinsic parameters?.  I hope that can be imported in this way.  I am aware of your comments.  Thank you very much for your support.

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Dmitry Semyonov on May 24, 2011, 01:40:31 AM
Hello Diego,

The file format you have proposed in the last post seems to include the required intrinsic and extrinsic camera orientation parameters (besides the geographic projection used). But implementing a native support for non-standard formats within PhotoScan seems to me a bad design decision. I hope that PhotoScan will include support for writing custom file format extensions in the future, but unfortunately they are not supported yet.

Nevertheless, we can help you with writing a simple stand-alone converter from the format you have proposed to the PhotoScan structure (xml) format. If you are interested, please provide also a sample photo set with accompanying camera parameters file for testing purposes. It is not necessary to have a large data set, several images should be enough. You can send the data to support@agisoft.ru.

With best regards,
Dmitry Semyonov
AgiSoft LLC
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on May 24, 2011, 06:40:28 AM
Hello Dmitry,

Thank you very much for your support.  And send test data for application of conversion, thank you very much.

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on May 30, 2011, 04:54:16 AM
Hello Dmitry,

Any progress?

Best Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Alexey Pasumansky on May 30, 2011, 02:58:33 PM
Hello Diego,

Thank you for providing the test data. We have already downloaded it and are now investigating possibility of conversion.

More details would be available at the end of the week. I let you know if there are new questions.
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Diego on May 30, 2011, 04:58:36 PM
Thanks Alexey,

Excellent news, it would be good if this option was available in formats to import cameras, but a simple application to convert and create the XML format is also an excellent choice.

Regards,

Diego
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: tkwasnitschka on June 08, 2011, 05:56:25 PM
Hi,
I am just about to purchase the pro version (which is GREAT!!!)

Some questions so I understand the camera import right:

1. I have footage and motion data from a deep sea diving robot:
x, y (lat/lon, UTM); z (m); pitch, heading, roll (°).
X and y have large uncertainties, z is better, the rotation data is of high accuracy.
There is no other data to correct for drift in the reconstruction. There is no intrinsic information available (HD footage), but in my tests photoscan outperformed all other products in terms of drift. Can I use this motion data to correct drift during reconstruction? Will the conversion script mentioned above help?

2. Will this data stabilize the drift within the model (=bend it in shape) or merely geographically align it rigidly to achieve a best fit to the camera positions? I would not want to produce countless little individually referenced chunks to get the geometry right...

3. Not having seen the camera export: Is there a way to get a camera position output in a string like t,x,y,z,h,p,r? I have to cross correlate the navigation data first to an initial solution to eliminate a nasty time offset...

Many thanks so far!
Tom

(...Sample footage on photosynth account "kwasnitschka"...)
Title: Re: Export camera positions so photogrammetric formats: X, Y, Z, and Kappa Phi Omega
Post by: Alexey Pasumansky on June 08, 2011, 07:12:22 PM
Hello Tom,

Thank you for the positive feedback.

Current version of PhotoScan does not stabilize the drift using telemetry data and treats point cloud rigidly (performs only scaling, rotation and shift transformations). Currently it is not possible to correct drift using motion data or camera positions. I hope that support for drift correction (inclusion of known camera coordinates within alignment procedure) will be added to PhotoScan at some point, but it is not implemented yet.

The conversion procedure discussed above applies to the alignment data produced by 3rd party photogrammetric software, so it is not applicable to your case, as telemetry data is of much lower accuracy.

PhotoScan supports several file formats for exporting estimated camera positions. The most close one to t,x,y,z,h,p,r data representation is probably Omega Phi Kappa format. But omega, phi and kappa angles differ from pitch, roll and heading so additional conversion may be required. Export of camera positions and point cloud is available using "Export points..." command from the "File"menu. Unfortunately there was a problem with point export feature in PhotoScan build 958, so you may need to wait for a bug fixing update planned for this weekend.