Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure images orientation #39

Open
Benvii opened this issue Aug 11, 2018 · 3 comments
Open

Ensure images orientation #39

Benvii opened this issue Aug 11, 2018 · 3 comments
Labels
blocked Issue blocked by an other one or something else

Comments

@Benvii
Copy link
Member

Benvii commented Aug 11, 2018

Ensure that hugin always put for instance APN1 at the center of the equirectangular projection (compute the "lacet").
We might have an offset, if so we will need to add this information to the panorma table in the database.

@Benvii
Copy link
Member Author

Benvii commented Aug 12, 2018

Optimise reference image is set to the image 0 in the project base file (base.pto), this means that the APN3.JPG (which is the first image in the project file) is used as a reference.
https://github.com/OpenPathView/OPV_Tasks/blob/stable/opv_tasks/ressources/base.pto#L42

According to the documentation this image will no move during optimisation :

By selecting an image in the images table and via right-click Anchor this image for position you can indicate that a particular image shouldn't move when optimising the positions in the panorama. Only one image can be the anchor, and by default this is the first image in the project. 

The position is set to r0 p0 y0, yaw 0 is the center of the final projection (canvas) (cf the documentation here) :

Yaw, Pitch and Roll values of a source image always refer to the optical axis[*]. An image positioned in Yaw=0 and Pitch=0 means the source image optical axis[*] is in the canvas center. Please note that the actual source image center does not need to match the optical axis[*] due to Lens shift correction. Hence the image boundaries of an image with Yaw=0 and Pitch=0 need not to be centered on the result canvas. Other lens correction parameters don't affect image positioning since they are performed symmetrically around the optical axis. 

This ensure that we will always have APN3 at the center of the final projection, which means having APN3 center at Yaw:0 in Pannellum also.

Moreover, we know the APN2 center direction 89° clockwise relatively from the compass heading direction. Camera are numbered counterclockwise (we could say if we look from over the photo head that APN3 is a the left of APN2), as it's a pentagone the angle between direction of APN2 to APN3 is 72 degrees. So APN3 is at 17° degree (clockwise) from compass heading.

Finally, we could say that the center of the canvas/panorama/equirectangular (meaning yaw=0) is at {campass bearing } + 17° .

A complete representation here :
2018-8-12_33712

I will test it this afternoon and try to take more pictures with rederbro to check if it's good or not.

@Benvii
Copy link
Member Author

Benvii commented Aug 13, 2018

Has we don't know if the heading of the compass is really passing though the center of the photo head it's difficult to find the right angle. The easiest way to determine it is to take some pictures (10 pictures for instance) with a real compass in front of the APN3 and then calibrate/estimate the angle.

I can't do it know as Rederbro isn't fully functional (one of the camera's regulator is down), it will be replace in 2-3 days, so I'll do it Thursday or Friday. We might also take pictures this weekend.

  • Repare rederbro
  • take severeal pictures of a real compass in front of the APN3
  • set this angle so that it match the taken pictures
  • check on CBNB pictures that the angle is correct

@Benvii Benvii added the blocked Issue blocked by an other one or something else label Aug 13, 2018
@Benvii
Copy link
Member Author

Benvii commented Aug 17, 2018

I have termined that the GPS antenna magnetic fixation has impact on the compass, deviation from 10 to 25 degrees (maybe more) depending on it's position on the photo head. As the GPS antenna is poorly fixed, so not always at the same position we can't rely on past compass data for the test images and in the future I will simply remove the antenna to ensure compass data aren't polluted or replace it with the other antenna we have.

Comparing compass value with a real compass I also noticed that the compass in not correctly monted, indeed our compass is upside down, it's not a critical issue but we need to compensate it ( correctedAngle = 360 - upsideDownCompassAngle .
This should be done in rederbro script OpenPathView/reder-bro#4

  • Replace magnetic GPS antenna by a non magnectic one before taking pictures

@Benvii Benvii removed their assignment Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issue blocked by an other one or something else
Projects
None yet
Development

No branches or pull requests

1 participant