Debian DART-MX8M CSI

From Variscite Wiki
Revision as of 03:00, 17 July 2020 by Harshesh (talk | contribs) (Created page with "<!-- Set release according to "release" parameter in URL and use RELEASE_BUSTER_V1.0_DART-MX8M-MINI as default --> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!-- --> {{...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
DART-MX8M-MINI Camera

Testing MIPI-CSI2 cameras

Before running any of the pipelines below make sure you have camera(s) connected. i.MX family of processors uses gstreamer as multimedia framework. Please refer to https://gstreamer.freedesktop.org/


Note: If your rootfs doesn't have v4l-utils you can run below command to test the camera and rest of the commands

On Target:

#apt-get clean;apt-get update; apt-get install -y v4l-utils

Camera Probe

Run the following command to see if you have the camera(s) detected

# v4l2-ctl --list-devices

This should produce the following output

# v4l2-ctl --list-devices
i.MX6S_CSI (platform:32e20000.csi1_bridge):
      /dev/video0

As you can see above there is 1 camera accessible as /dev/video0

Testing Camera Preview on Display

  • 480P 640x480@30fps:
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! autovideosink sync=false
  • NTSC 720x480@30fps:
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=720,height=480 ! autovideosink sync=false
  • 720P 1280x720@30fps:
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! autovideosink sync=false
  • 1080P: 1920x1080@30fps:
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080 ! autovideosink sync=false
  • QSXGA 2592x1944@15fps:
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=2592,height=1944 ! autovideosink sync=false

Testing Camera JPEG Snapshot

To capture JPEG snapshot run one of the pipelines below depending upon the required picture resolution.

  • 480P 640x480:
# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=640,height=480   ! jpegenc ! filesink location=/tmp/test.jpg
  • NTSC 720x480:
# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=720,height=480   ! jpegenc ! filesink location=/tmp/test.jpg
  • 720P 1280x720:
# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=1280,height=720  ! jpegenc ! filesink location=/tmp/test.jpg
  • 1080P 1920x1080:
# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=1920,height=1080 ! jpegenc ! filesink location=/tmp/test.jpg
  • QSXGA 2592x1944:
# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=2592,height=1944 ! jpegenc ! filesink location=/tmp/test.jpg