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

wrong bearing on thight curves #263

Open
Stefal opened this issue Jul 18, 2018 · 7 comments
Open

wrong bearing on thight curves #263

Stefal opened this issue Jul 18, 2018 · 7 comments
Assignees

Comments

@Stefal
Copy link
Contributor

Stefal commented Jul 18, 2018

Basic information

  • Release version: 0.1.0
  • System: Windows
  • Capture Device: Action Camera

Steps to reproduce behavior

  1. Add bearing to the pictures with some tight curves

Expected behavior

The bearing should follow the curve

Actual behavior

There is too much bearing as you can see on the screenshot:
wrong_bearing
A correct angle would be 190° instead of 174°

wrong_bearing2
A correct angle would be 20° instead of 352°

@jernejaMislej
Copy link
Contributor

Hi, sorry for the late reply, I m on vacation until 10th August with limited access to internet, @ybkuang will try to address the issues while I am gone.
Just to make sure, the directions were interpolated with the processing tools?

@Stefal
Copy link
Contributor Author

Stefal commented Jul 31, 2018

Yes, with the mapillary_tools 0.1.0

@jernejaMislej
Copy link
Contributor

Ok thanks.
If the direction is missing in EXIF or the tools are run with --advanced --interpolate_directions then the direction is derived based on latitude and longitude here and then here
Unfortunately it is very likely that the formula is not accurate for tight curves since this information can not be derived from latitude and longitude only. If you know of a better formula, you are welcome to contribute.

@Stefal
Copy link
Contributor Author

Stefal commented Aug 19, 2018

This "bug" seems related to #272 as images are not time-sorted correctly.

@jernejaMislej
Copy link
Contributor

hi,
why do you think the images are not time-sorted correctly? can you give some examples?

@Stefal
Copy link
Contributor Author

Stefal commented Aug 21, 2018

It's a partial mistake.

  1. As the script add the subsecond in the datetimeoriginal, if you process an image with a subsectimeoriginal exif date, the subsecond value will be read 2 times and added. An image with these data:
    -datetimeoriginal = 2018-08-21_15h00mn59s
    -subsectimeoriginal = 9
    After mapillary_tools process, it becomes
    -datetimeoriginal = 2018-08-21_15h00mn59s9
    -subsectimeoriginal = 9
    And will be read as
    -2018-08-21_15h01mn800ms
    Why?
    Because in https:/mapillary/mapillary_tools/blob/master/mapillary_tools/exif_read.py There is this code in the extract_capture_time method:
    capture_time = format_time(capture_time)
    sub_sec = self.extract_subsec()
    capture_time = capture_time + \
    datetime.timedelta(seconds=float("0." + sub_sec))

So, you really could have a wrong sorting.

  1. After a new check, I didn't encounter this case.

Perhaps it could be better to computer the bearing with the previous image too, and return the average value.

@jernejaMislej
Copy link
Contributor

thanks for the feedback, i will have a look at that part of code and check this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants