Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] java – What is the timestamp in the CameraX.ImageInfo?

Posted on November 11, 2022 By

Solution 1 :

according to official documentation https://developer.android.com/reference/androidx/camera/core/ImageInfo#getTimestamp() image timestamp is a long, which means that as every timestamp, it returns the number of milliseconds from January 1st 1970.

Problem :

I want to get the CameraX(analyzer) frame created timestamp, but when I use imageProxy.getImageInfo().getTimestamp() I get a timestamp that is shorter than System.currentTimeMillis(), so I think they are not same timestamp style.

how can I transfer it to normal timestamp like the stamp of System.currentTimeMillis().

thanks @LexFerrinson, the imageProxy.getImageInfo().getTimestamp() is here https://developer.android.com/reference/androidx/camera/core/ImageInfo#getTimestamp() but I dont know how to transfer it to currentTimeMillis.

for example:

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

I got the timestamp form camerax analyzer

cameraX version:

    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"

thanks!

Comments

Comment posted by normidar

what about

Comment posted by normidar

I saw the document before your answer but I cant understand it.

Comment posted by LexFerrinson

@normidar if you get the currentTImeMillis() and you convert it to date format with

Comment posted by normidar

did you do it ? they are different timestamp.

Comment posted by LexFerrinson

@normidar should they have same timestamp? Is the picture created in your program or is it a stored picture that you get from elsewhere? Could you give me both timestamp longs?

READ  [FIXED] Android Spinner Not Populating | Android Kotlin
Powered by Inline Related Posts
Android Tags:android, android-camerax, camera, java

Post navigation

Previous Post: [FIXED] android.media.ImageWriter produces green screen screen on every second posted Image frame
Next Post: [FIXED] android – Notifee native module not found

Related Posts

[FIXED] android – Ordering CollectionReference Firease Android
[FIXED] android – Run php script on a Firebase service Android
[FIXED] c++ – Convert macro with variable args (…) to constexpr Android
[FIXED] java – How to change activity without input data? Android
[FIXED] android – MPAndroidChart – How to set data in BarChart using MPAndroidChart library from firebase Realtime Database using ValueEventListener? Android
[FIXED] java – Why do android run methods like “onItemSelected” even if they are not called in the oncreate Method? Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What is a good substitute for condensed milk?
  • ¿Como el cuerpo te avisa cuando te va a dar un infarto?
  • What is the luxury brand of Jaguar?
  • Who is Big poppa baseball player?
  • What material are foam runners?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme