Camera Guide¶
Note
To enable camera support when building Yocto images see:
QS8M with Raspberry Pi camera: local.conf section in NXP Yocto BSP.
Basler cameras: Basler Camera in NXP Yocto BSP.
Camera Enablement¶
Module |
Camera |
Precompiled Image |
Yocto Enablement |
---|---|---|---|
QS8M-MQ00 |
n.a. |
||
QSXM-MM60 |
qsxm-mm60-basler in Download Area |
||
QSXP-ML81 |
qsxp-ml81-basler in Download Area |
Camera DTB¶
To enable camera support you need to load the appropriate FDT overlay according to the following table.
Module |
Camera Supported |
FDT overlay |
---|---|---|
qs8m on qsbase2 or qsbase4 |
qs8m-cam |
|
qsxm-* on qsbase4 |
qs8m-cam |
|
qsxp-ml81 on qsbase4 |
qsxp-cam |
|
qsxm-mm60 on qsbase3 |
/TBD/ |
|
qsxp-ml81 on qsbase3 |
/TBD/ |
Stream Camera¶
To stream a camera live video on your weston desktop follow the instructions listed below.
Module |
Camera |
Stream Options |
---|---|---|
qs8m, qsxm |
Start camera stream from serial terminal: gst-launch-1.0 -v v4l2src ! \
"video/x-bayer,format=rggb,width=640,height=480,framerate=30/1" ! \
bayer2rgb ! videoconvert ! autovideosink sync=false
Capture a single .jpg frame from camera stream. gst-launch-1.0 -v v4l2src num-buffers=1 ! \
"video/x-bayer,format=rggb,width=640,height=480,framerate=30/1" ! \
bayer2rgb ! videoconvert ! jpegenc ! filesink location=test-cap.jpg
|
|
qsxp-ml81 |
Start imx8-isp into background: /opt/imx8-isp/bin/start_isp.sh &
Start camera stream from serial terminal: gst-launch-1.0 v4l2src device=/dev/video2 ! waylandsink
|
|
qsxm-mm60, qsxp-ml81 |
Start pylon viewer from serial terminal: export DISPLAY=:0; pylon
Enable the camera and click on the camera icon to stream a live video. Live-stream the camera with gstreamer: gst-launch-1.0 -v v4l2src device=/dev/video2 ! waylandsink
You can also record the camera stream using the VPU: gst-launch-1.0 v4l2src device=/dev/video2 ! \
"video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1" ! \
vpuenc_h264 ! mpegtsmux name=mux ! filesink location=test_1080.ts
|