Forum

Author Topic: Estimated Yaw, Pitch, Roll anomaly  (Read 6629 times)

Yoann Courtois

  • Sr. Member
  • ****
  • Posts: 316
  • Engineer in Geodesy, Cartography and Surveying
    • View Profile
Estimated Yaw, Pitch, Roll anomaly
« on: December 10, 2021, 05:53:18 PM »
Hello !

We have something which looks like an anomaly in estimated yaw, pitch, roll value.
Most of images of our projects are OK, but some have crazy values.

Here is an example :
- Pitch of 76° but the image is clearly taken horizontally
- Yaw of 221° but the closest images, which looking almost exactly the same direction, has a yaw of 319°
- Roll of -86°, but better looking about -20°.

We have tested everything (optimize, realign...) but this image always converge to the same estimated orientation.

Hope you can help.
Regards
--
Yoann COURTOIS
R&D Engineer in photogrammetric process and mobile application
Lyon, FRANCE
--

Yoann Courtois

  • Sr. Member
  • ****
  • Posts: 316
  • Engineer in Geodesy, Cartography and Surveying
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #1 on: December 14, 2021, 01:53:41 AM »
Dear Agisoft Team,

May you be able to help us on this problem ?

Regards
--
Yoann COURTOIS
R&D Engineer in photogrammetric process and mobile application
Lyon, FRANCE
--

PROBERT1968

  • Sr. Member
  • ****
  • Posts: 370
  • Hello !
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #2 on: December 14, 2021, 04:53:32 AM »
Might be easier if you have any screenshot of the problem ?

Kiesel

  • Sr. Member
  • ****
  • Posts: 332
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #3 on: December 14, 2021, 09:36:45 AM »
Yoann Courtois,

you might have a look at the tie points to see what did go wrong. If there are only some photos you can try to align them by setting control points (markers) manually.

Regards,

Kiesel

Yoann Courtois

  • Sr. Member
  • ****
  • Posts: 316
  • Engineer in Geodesy, Cartography and Surveying
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #4 on: December 14, 2021, 11:34:56 AM »
Hello !

For Kiesel :
Evertyhing is perfectly OK regarding alignment. Images are well aligned and georeferenced. The problem only appear on estimated values of some camera orientation.

For PROBERT :
Here are two screenshot. The first show an example of correct values (999% of images of the project have correct values), the second show the last image of the project, well aligned but yaw/pitch/roll values looks crazy.

Regards
--
Yoann COURTOIS
R&D Engineer in photogrammetric process and mobile application
Lyon, FRANCE
--

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #5 on: December 14, 2021, 12:55:20 PM »
Hello Yoann,

Unexpected values could be a result of so-called "gimbal lock" effect: https://en.wikipedia.org/wiki/Gimbal_lock

Does it help, if you input approximate Roll/Pitch source values for all the cameras with the reasonable accuracy?
Best regards,
Alexey Pasumansky,
Agisoft LLC

PROBERT1968

  • Sr. Member
  • ****
  • Posts: 370
  • Hello !
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #6 on: December 14, 2021, 04:52:17 PM »


Thank you for sharing your screenshot.  It is not for me but it is to help to show everyone what you are trying to deal with.

Looks like of hard to do.  Is this your first time and my question to you is why are you shooting those pictures ?  Is this your first time trying to do this software or ??

Yoann Courtois

  • Sr. Member
  • ****
  • Posts: 316
  • Engineer in Geodesy, Cartography and Surveying
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #7 on: December 14, 2021, 07:09:37 PM »
Dear PROBERT,

No problem for the screens.
Ahah it's not at all my first time. We are dealing with thousands of terrestrial and aerial images with full automated processes for years now.
We are actually trying to implement new process elements that are based of image orientation angles. That's why we need accurate yaw pitch roll values of all images in our project.


Dear Alexey,

Thanks for your answer. Indeed we understand that kind of situation could appear, but for now we have no solution to identify if given values are correct or not. Even if we reset and then realign this image, the orientation values are always the same. As we have no a priori values for orientation, is there any possibily to identify extrem situation and so wrong values ? Or another possibility to get those angles ?

Actual calculation :
Code: [Select]
matrix_t = chunk.transform.matrix
matrix_m = chunk.crs.localframe(matrix_t.mulp(camera.center))
matrix_r = (matrix_m * matrix_t * camera.transform * Metashape.Matrix().Diag([1, -1, -1, 1])).rotation()
camera_yaw, camera_pitch, camera_roll = Metashape.utils.mat2ypr(matrix_r)

Regards
--
Yoann COURTOIS
R&D Engineer in photogrammetric process and mobile application
Lyon, FRANCE
--

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #8 on: December 14, 2021, 07:34:55 PM »
Hello Yoann,

If you send the project file with the observed issue (camera alignment + tie points) to support@agisoft.com, I will check, if anything could be done in order to improve the stability of the results.

In the meantime you can try to use GPS/INS Offsets option and use 90 degree Pitch offset value in order to modify (0,0,0) configuration for angles, probably it should help to avoid gimbal lock.
Best regards,
Alexey Pasumansky,
Agisoft LLC

PROBERT1968

  • Sr. Member
  • ****
  • Posts: 370
  • Hello !
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #9 on: December 14, 2021, 11:01:01 PM »
Dear PROBERT,

No problem for the screens.
Ahah it's not at all my first time. We are dealing with thousands of terrestrial and aerial images with full automated processes for years now.
We are actually trying to implement new process elements that are based of image orientation angles. That's why we need accurate yaw pitch roll values of all images in our project.

No Problem. Don't get frustrated . It is a learning curving like I am too !!!



Dear Alexey,

Thanks for your answer. Indeed we understand that kind of situation could appear, but for now we have no solution to identify if given values are correct or not. Even if we reset and then realign this image, the orientation values are always the same. As we have no a priori values for orientation, is there any possibily to identify extrem situation and so wrong values ? Or another possibility to get those angles ?

Actual calculation :
Code: [Select]
matrix_t = chunk.transform.matrix
matrix_m = chunk.crs.localframe(matrix_t.mulp(camera.center))
matrix_r = (matrix_m * matrix_t * camera.transform * Metashape.Matrix().Diag([1, -1, -1, 1])).rotation()
camera_yaw, camera_pitch, camera_roll = Metashape.utils.mat2ypr(matrix_r)

Regards

Yoann Courtois

  • Sr. Member
  • ****
  • Posts: 316
  • Engineer in Geodesy, Cartography and Surveying
    • View Profile
Re: Estimated Yaw, Pitch, Roll anomaly
« Reply #10 on: December 15, 2021, 04:07:10 PM »
Hi PROBERT,

No worry, I just wanted you to know that we are well mastering the software so this is kind of complexe problem we are facing now :)

Alexey,

I just sent this morning the archived project with the problematic image.

However, Some of our data (including this dataset) don't inlude GPS/INS informations so we cannot be helped with.
We also know that it could be problematic to process terrestrial images (taken horizontaly) with aerial orientations. But for now we didn't find the possibility to apply 90° offset somethere to get kind of "terrestrial orientation point of view".

Hope it's clear :)

Regards
--
Yoann COURTOIS
R&D Engineer in photogrammetric process and mobile application
Lyon, FRANCE
--