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.
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
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:
Calling
read()beforeread_raw()triggers it too.Things I tried
gc.collect()/delbetween calls — still segfaultsformat=FMT_RGGB10in the constructor — "Format not support"launcherfirst — no changebuffer 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.