[英]What is the timestamp in the CameraX.ImageInfo?
我想獲取 CameraX(analyzer) 幀創建的時間戳,但是當我使用imageProxy.getImageInfo().getTimestamp()
時,我得到的時間戳比System.currentTimeMillis()
短,所以我認為它們不是相同的時間戳樣式。
我怎樣才能將它轉移到正常的時間戳,比如System.currentTimeMillis()
的時間戳。
謝謝@LexFerrinson,imageProxy.getImageInfo
imageProxy.getImageInfo().getTimestamp()
在這里https://developer.android.com/reference/androidx/camera/core/ImageInfo#getTimestamp()但我不知道如何將它轉移到 currentTimeMillis。
例如:
2022-06-13 15:33:52.539 ... D/l: System.currentTimeMillis():1,655,102,032,539
2022-06-13 15:33:52.578 ... D/l: imageProxy.getImageInfo().getTimestamp():17,268,452,439,387
我得到了 camerax 分析器的時間戳
cameraX 版本:
implementation "androidx.camera:camera-camera2:1.1.0-alpha09"
implementation "androidx.camera:camera-lifecycle:1.1.0-alpha09"
implementation "androidx.camera:camera-view:1.0.0-alpha29"
implementation "androidx.camera:camera-core:1.1.0-alpha29"
謝謝!
根據官方文檔https://developer.android.com/reference/androidx/camera/core/ImageInfo#getTimestamp() image timestamp 是一個 long,這意味着作為每個時間戳,它返回從 1970 年 1 月 1 日開始的毫秒數.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.