Giter VIP home page Giter VIP logo

Comments (5)

DavidGillsjo avatar DavidGillsjo commented on June 10, 2024

Hi,
The time is in ns, that is correct.
It is not absolute time, only relative. For absolute time see the time variable in the VideoCaptureData message from the protobuf output. It will be according to the smartphone local timezone.

I hope that answers you question.

Best regards,
David

from videoimucapture-android.

CyanInkLinmo avatar CyanInkLinmo commented on June 10, 2024

thanks for the answer!
After I search for some infomation about proto and "google.protobuf.Timestamp", There are stills some point I am not sure.

Is the time of the APP output. pd3 file relative time? i thank the file recording.propot only use to read the .pd3 file and not change absolute time to relative. So i wanna know how APP get the absolute time and the algorithm that change absolute to relative, I can't find this in the source code file.

thanks for your patience.

from videoimucapture-android.

DavidGillsjo avatar DavidGillsjo commented on June 10, 2024

Could you explain your use case? Not sure I understand your question.
The current code use 2 time sources:

So in case you need the exact world time for each image you have to calculate the offset between the world time given by currentTimeMillis and the time since reboot given by elapsedRealTimeNanos, which is not done in the current code.
See here for more on time functions.

You may however approximate the offset by using the world time of the start of the recording VideoCaptureData.time and the timestamp of the first video frame VideoCaptureData.video_meta[0].time_ns. The error will then be the time between the start of the recording thread and the start of camera capture, which will depend on the device. I'm guessing anything from a few ms to 1 second, but this is just a wild guess, I haven't tested the delay.

It may be worth checking the first timestamp of the IMU instead, since this should be quicker to start and has a higher sampling frequency. Then you want to check VideoCaptureData.imu[0].time_ns instead.

from videoimucapture-android.

CyanInkLinmo avatar CyanInkLinmo commented on June 10, 2024

I plan to intergrate with gnss so I may need a absolute time.
I think my problem is solved, thanks a lot for your answer!
Thanks!

from videoimucapture-android.

DavidGillsjo avatar DavidGillsjo commented on June 10, 2024

Good luck with your project!

from videoimucapture-android.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.