interpretation of `SensorTimestamp`

未關閉
#368 9 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
半天
新手友好度
35/100
Issue 類型
文件
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
cpp, python
領域
documentation

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

(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?

主要語言
C++
星號
493
分支
205
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

raspberrypi/libcamera 的其他 Issue

查看 raspberrypi/libcamera 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。