Documentation Index
Fetch the complete documentation index at: https://docs.dwe.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The stellarHD exposes two video formats over its standard UVC (USB Video Class) interface:- MJPEG — JPEG-compressed frames. Best for high framerates (up to 60 FPS) and live viewing.
- YUYV — uncompressed 4:2:2 raw video. Best when you need the original, unprocessed pixel data (machine vision, photogrammetry, scientific imaging).
Y) channel contains real image data.
YUYV is uncompressed, so it consumes far more USB bandwidth than MJPEG. As a result, raw mode is limited to lower framerates at higher resolutions. Refer to the stellarHD Technical Specifications for the supported resolution/framerate combinations.
Requirements
These commands require a Linux computer withv4l-utils, GStreamer, and FFmpeg installed:
Understanding YUYV vs MJPEG
| YUYV (uncompressed) | MJPEG | |
|---|---|---|
| Compression | None (4:2:2 uncompressed) | JPEG compressed |
| Use case | Raw pixel data, analysis | High framerate, live preview |
| Framerate | Lower at high resolution | Up to 60 FPS |
| File size | width × height × 2 bytes per frame | Variable (small) |
| Directly viewable | No (raw bytes) | Yes (each frame is a JPEG) |
YUYV is written as YUY2.
Step 1 — Identify the Device Node
When you plug in a stellarHD, the kernel creates several V4L2 device nodes. Both YUYV and MJPEG are exposed on the first node of the group./dev/video4 is the node to use. Substitute your own node in the commands below.
Step 2 — Capture a Single RAW Frame
Usev4l2-ctl to capture one uncompressed YUYV frame at full resolution:
frame_1600x1200.yuyv.
Verify the frame size
A complete raw frame should be exactlywidth × height × 2 bytes:
Step 3 — Convert the RAW Frame to PNG
Raw YUYV bytes are not directly viewable. Use FFmpeg to convert the frame into a PNG for inspection:Monochrome stellarHD Models
Because of a UVC quirk, the monochrome stellarHD advertises its output asYUYV 4:2:2 even though the sensor has no color information.
- Only the
Y(luminance) channel contains the real image. - The
UandV(chroma) channels are dummy/fixed values and can be ignored.
Verify the camera is genuinely monochrome
Play the raw file back directly withffplay. If the image appears grayscale naturally, the chroma channels are constant:
GStreamer Pipelines
View the live raw stream
Save one raw frame to disk
Faster preview with MJPEG
Because YUYV is limited to low framerates at high resolution, use MJPEG when you only need a smooth realtime preview:Extracting Luminance in OpenCV / Python
If you process raw frames downstream and your sensor is monochrome, extract the luminance channel rather than treating the frame as color.
OpenCV Guide
See our full guide on using the stellarHD with OpenCV.
Troubleshooting
The output file is the wrong size
A complete raw frame is exactlywidth × height × 2 bytes. A smaller file usually means the capture was interrupted or the requested resolution isn’t supported in YUYV mode — check v4l2-ctl -d /dev/video4 --list-formats-ext.
The converted image is skewed or garbled
The-pixel_format and -video_size passed to FFmpeg must exactly match the capture. Raw video has no header, so any mismatch corrupts the layout.
The image looks tinted on a monochrome camera
The chroma channels carry no real data on a monochrome sensor. Re-convert with-vf format=gray (FFmpeg) or extract the Y channel (OpenCV) as shown above.