Comments (5)
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.
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.
Could you explain your use case? Not sure I understand your question.
The current code use 2 time sources:
- At the start of the recording, the current world time is captured using currentTimeMillis which is converted to a date-time format and stored as
time
in VideoCaptureData. - For each camera frame we store a timestamp as
time_ns
in VideoFrameMetaData which is nano-seconds since boot. As long as your Android device supports it, see SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME. The value of this is also stored in the protobuf file here.
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.
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.
Good luck with your project!
from videoimucapture-android.
Related Issues (18)
- How do you read the video_meta.pb3 file? HOT 8
- some questions about the project structure and howw to understand each component HOT 16
- Timestamp abnormal. HOT 10
- ModuleNotFoundError: No module named 'recording_pb2' HOT 3
- Global status : warn HOT 2
- Error converting video to rosbag HOT 9
- Video capture using front facing camera HOT 1
- Error regarding camera_meta.lens_pose_rotation HOT 2
- Not getting 30 FPS Video Output HOT 2
- time synchronization problem HOT 1
- Question about the inverted aspect ratio of saved videos
- "Cannot find IMU" error on Samsung A50, Android 11 HOT 1
- Recording has fewer frame metadata messages than there are image frames. HOT 3
- Error running camera calibration HOT 12
- Skipped Frame,Missing Data HOT 2
- Added magnetometer reading & but couldn't read from .pb3 HOT 2
- Linear interpolation not working HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from videoimucapture-android.