Hi everyone,
I’m working with a camera (Radxa 4k camera) on a Rockchip-based board (Radxa Rock 5B Plus), and I’m capturing images using the v4l2-ctl
command. I’m trying to capture a 10-bit Bayer image . However, I’m unable to open or visualize the captured image properly.
Setup and Commands Tried
- Checked supported formats using:
v4l2-ctl --device=/dev/video0 --list-formats-ext
Output:
Type: Video Capture Multiplanar
[0]: 'RG10' (10-bit Bayer RGRG/GBGB)
[1]: 'BA10' (10-bit Bayer GRGR/BGBG)
[2]: 'GB10' (10-bit Bayer GBGB/RGRG)
[3]: 'BG10' (10-bit Bayer BGBG/GRGR)
[4]: 'Y10 ' (10-bit Greyscale)
- Captured raw frame:
v4l2-ctl --device=/dev/video0 --set-fmt-video=width=3864,height=2192,pixelformat=BA10 --stream-mmap --stream-count=1 --stream-to=frame.raw
This successfully created a frame.raw
file in my current directory. It has file size of 10 MB.
Then used raw2tiff to convert in .tiff format.
raw2tiff -w 3864 -l 2192 -b 1 -d short -p minisblack -c none frame.raw frame.tiff
after that used imagemagic tool to convert it in .png format.
convert frame.tiff -auto-level output.png
but that image was just white noise image. I have attached the output image here.
Please give the suggestion. How to capture the proper image with this camera.
I have also enabled the DT overlay for radxa 4k camera using rsetup.