interpretation of `SensorTimestamp`

Ouverte
#368 9 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
35/100
Type d'issue
Documentation
Clarté
Plutôt claire
Activité
Active
Stack technique
cpp, python
Domaine
documentation

Piste de recherche

Read the libcamera control definition for SensorTimestamp in the public API docs and the C++ control definition it is generated from, then compare with the wait logic in picamera2/picamera2.py (the frame_timestamp_ns = md['SensorTimestamp'] - 1000 * md['ExposureTime'] block) and examples/timestamp_capture.py. The open question is which wording is correct — first row exposed versus first pixel read out — so the outcome is either a documentation correction plus comment fix, or confirmation that both are consistent. Expect discussion before any edit.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

(1) https://docs.libcamera.org/v0.8.0/public-api/namespacelibcamera_1_1controls.html#a0198b0e9a054328e84a4024b19742ec9 states

The time when the first row of the image sensor active array is exposed.


(2) https://github.com/raspberrypi/picamera2-examples/blob/d25baef2f4aedd8159ceafd5d8299918aaf9eeee/examples/timestamp_capture.py#L10-L14 states

    # 'SensorTimestamp' is when the first pixel was read out, so it started being
    # exposed 'ExposureTime' earlier.
    exposure_start_time = md['SensorTimestamp'] - 1000 * md['ExposureTime']

(3) https://github.com/raspberrypi/picamera2/blob/ae3f32ff8c80417f51d7e041dfbc1a71f9ee43d6/picamera2/picamera2.py#L1593-L1597 states

            # Check if frame started being exposed after the timestamp.
            md = self.completed_requests[0].get_metadata()
            frame_timestamp_ns = md['SensorTimestamp'] - 1000 * md['ExposureTime']
            if frame_timestamp_ns >= timestamp_ns:
                return (True, None)

It seems to me that while (2) and (3) are in agreement, the rpi interpretation of SensorTimestamp does not match what is prescribed in the libcamera documentation (1). Or am I missing something?

Langage dominant
C++
Étoiles
493
Forks
205
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de raspberrypi/libcamera

Toutes les issues de raspberrypi/libcamera

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.