Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[MaixCAM2] read_raw() returns an empty buffer (and segfaults on the second call)

オープン
#204 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
embedded-iot

調査の方向性

まず、指定された MaixCAM2 環境で camera.Camera(raw=True)、skip_frames(30)、read_raw()、および 2 番目のフレームを使って問題を再現します。raw バッファーの動作を RGB キャプチャーと比較し、文書化されている raw パスがこのモードをサポートしているか判断します。動作が修正されるか、必要なセットアップと制限事項が明確に文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Just a heads-up rather than an urgent report — I was trying out raw Bayer capture
on MaixCAM2 and it doesn't seem to work as the API suggests. Not blocking anything
on my side, but you probably want to know.

Environment

MaixCAM2 (2K variant), MaixPy 4.12.5, Ubuntu 22.04 / Linux 4.19.125 aarch64.
This is the latest image available for MaixCAM2 as far as I can tell — v4.12.5
looks like it was a MaixCAM-only release.

What happens

from maix import camera

c = camera.Camera(raw=True)
c.skip_frames(30)
raw = c.read_raw()

Metadata comes back correct — 1280x720, FMT_RGGB10, 1,152,000 bytes
(1.25 B/px, stride 1600, consistent with MIPI RAW10).

But the buffer is empty: 100% zeros, only 4 unique values across 1.15 MB,
mean/std = 0.00 / 0.15.

An RGB frame taken at the same moment is perfectly fine (std 74.3, 256 unique
values), so the sensor itself is clearly producing data.

Separately, asking for a second frame in the same process segfaults:

frame 0: 1152000 B
Segmentation fault (core dumped)

Calling read() before read_raw() triggers it too.

Things I tried

  • gc.collect() / del between calls — still segfaults
  • format=FMT_RGGB10 in the constructor — "Format not support"
  • explicit resolution — "RGB888 must not exceed 1920x1080"
  • stopping launcher first — no change
  • restarting the process for each frame — no crash, 8 frames captured, but every
    buffer still empty

That last one suggests the empty buffer and the crash are two separate things.

Question

The docs mention RAW output mainly in the astrophotography / long-exposure context.
Is the raw path only wired up for that mode on MaixCAM2? If it needs a particular
setup, that'd be worth a note in the docs — camera.Camera(raw=True) + read_raw()
reads like it should just work.

Happy to test anything if it's useful.

主要言語
Python
スター
865
フォーク
127
平均マージ
9日 6時間
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sipeed/MaixPy のほかの issue

sipeed/MaixPy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。