APEX ORIN NX II GMSL Camera External Trigger#

Configuration#

Camera Operating Modes#

Operating Mode

Mode Description

Usage Differences

Notice

Use External Trigger

The device controls the start of exposure, and all cameras capture images simultaneously.

Images can be captured using standard Linux methods or the SDK.

All cameras must use the same operating mode.

Purpose:#

Eliminate timing differences between cameras: In conventional continuous capture, each camera operates independently, with small differences in exposure and image capture timing. For high-speed motion analysis, multi-view 3D reconstruction, and precision industrial inspection, these differences can misalign data or produce inconsistencies that reduce accuracy. External triggering makes all cameras follow the same external signal and capture images simultaneously**.​**

Unified frame rate control:​The configuration interface automatically lists the frequencies supported by all connected cameras. Select one to set a precise, shared trigger frequency for all cameras that support external triggering.

Key Benefits:#

  • High-precision synchronization:​ All cameras begin exposure when they receive the external trigger signal, achieving synchronization within microseconds or better.

  • Consistent, controlled frame rates: Set and verify a shared capture frequency for all cameras to ensure a consistent data acquisition rate.

  • Simplified configuration: Enable external trigger mode and select a frequency supported by all cameras through the software interface, without complex low-level commands.

  • Flexible compatibility: Obtain synchronized image streams using standard Linux methods or the MIIVII SDK.

Applications:#

  • Autonomous driving and robot vision: Multiple cameras capture environmental information simultaneously, keeping perception data consistent in space and time.

  • Industrial automation and machine vision:​Synchronized measurement and positioning of fast-moving objects across multiple production-line stations, and robot guidance and picking.

  • Sports science: Multiple cameras capture athlete movements for accurate motion trajectory and pose reconstruction.

  • VR/AR: Spatial perception or synchronized multi-camera recording of real environments.

  • Scientific experiments:​Experiments that require multiple sensors to acquire data at exactly the same time.

Usage#

After selecting a camera, you can select “Use External Trigger Mode” if the camera supports external triggering.

In external trigger mode, select a supported trigger frequency.

All cameras share the same trigger, so the available frequencies are those supported by every camera.

Verify External Trigger Operation#

Condition 1: Camera Images Can Be Captured Normally#

gst-launch-1.0 -v v4l2src device="/dev/video1" ! video/x-raw,width=1280,height=720,format=UYVY ! xvimagesink

Condition 2: The Camera Frame Rate Matches the Configured Trigger Frequency#

Use the Linux v4l-utils tools to check whether the corresponding video device outputs images normally and has the correct frame rate.

Install v4l-utils

# Update the Ubuntu package index.
sudo apt update

# Install the tools.
sudo apt install v4l-utils

Use the tool with the resolution and port of the camera you are using to check image output and frame rate.

# Example: a 1920x1080 camera connected to video0.
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap

Usage#

Video Output#

Use the following commands to quickly open the camera and check the image.

Method 1: Open Cameras Without Specifying Parameters#

Open the Cameras#

sudo chmod +x /opt/miivii/features/gmsl_camera/bin/cameras_sdk_demo
cd /opt/miivii/features/gmsl_camera/bin/
# Open all cameras automatically. To open an individual camera, specify the camera channel.
./cameras_sdk_demo 

#

Performance Solution#

cameras_egl_demo: The EGL demo captures camera images directly using v4l and OpenCV.

/opt/miivii/features/gmsl_camera/bin/cameras_egl_demo -s 1280x720 -d /dev/video0

Performance and Ease of Use#

cameras_opencv_demo: The OpenCV demo uses EGL for display, providing efficient image rendering.

/opt/miivii/features/gmsl_camera/bin/cameras_opencv_demo -s 1280x720 -d /dev/video0

Method 2: Open Cameras by Specifying Camera Parameters#

Display One 720P Camera#

gst-launch-1.0 -v v4l2src device="/dev/video1" ! video/x-raw,width=1280,height=720,format=UYVY ! xvimagesink

Display One 1080P Camera#

gst-launch-1.0 -v v4l2src device="/dev/video0" ! video/x-raw,width=1920,height=1080,format=UYVY ! xvimagesink

Troubleshooting#

Symptom: The camera frame rate differs from the manual#

  • Contact MIIVII Sales for customized support. The available external trigger frame rates have been verified in actual testing.

Symptom: External trigger mode is selected, but the actual frame rate does not follow the trigger rate#

  • Confirm that the correct camera model is selected in the configuration.

  • Ask the camera manufacturer whether the camera supports external trigger mode.

Symptom: The camera does not start or displays a black screen#

  • Check hardware compatibility: Confirm that the camera model is on the device compatibility list. Contact the manufacturer for the latest list.

  • Check that the camera connector is firmly seated and the cable is free of damage or corrosion.

  • Check the configured device node: In the device Web GUI, ensure that the selected camera number matches the physical port, for example, port 2 corresponds to “Camera 2”.

  • After reconnecting a camera, save its configuration again in the Web GUI or restart the service for the settings to take effect.

Symptom: The image is green#

  • Replace the cable. Many green-screen problems are related to cabling.

  • Swap camera positions to test them. Many green-screen problems are also related to camera firmware.

  • Ask the camera manufacturer to confirm that the firmware output image format matches the supported camera format.

  • If the formats differ, ask the camera manufacturer to update the firmware or contact MIIVII Sales for support.

If the Above Steps Do Not Resolve the Issue#

# Run the following command to collect logs, and send the logs to Technical Support.
curl -sSL https://doc.miivii.com/scripts/run_miivii_diagnostic.sh | sudo bash -s gmsl