# Enable EIS and LDC

Note

This section is only applicable for QCS6490.

This section describes the EIS and LDC features and how to run their various use cases.

Electronic Image Stabilization (EIS) is an image enhancement technique using electronic processing. EIS minimizes blurring and compensates for device shake.
EIS takes the motion data from an IMU sensor and generates the transformation matrix to compensate for device moment in all three directions.

A gyroscope sensor provides motion in pitch, yaw, and roll. The image warping library module that runs on the GPU applies warping to the image based on the generated transformation matrix.
The iWarp library uses the OpenGL API for warping. Lens Distortion Correction (LDC) is the process to correct the distortion that’s introduced due to fisheye lenses,
which makes a straight line in a scene be captured as a curved line due to the distortion of the lens. A static mesh is generated using the calibration process of the lens.

The image warping library module that runs on the GPU applies warping to the image based on the generated static mesh. The iWarp library uses the OpenGL API for warping.

EIS and LDC can be run independently or at the same time. The following are the possible GST command options for EIS and LDC use cases:

| GST command option | Description |
| --- | --- |
| `eis=1` | Enables EIS on first stream only |
| `eis=2` | Enables EIS on two streams |
| `ldc=1` | Enables LDC on all (1 or 2) streams |
| `eis=1`, `ldc=1` | Enables EIS and LDC on the first stream only |
| `eis=2`, `ldc=1` | Enables EIS and LDC on two streams |

Note

Connect to the device console using SSH. See [How To SSH?](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-254/how_to.html#use-ssh) for instructions.

To collect the log, run the following command on the device:

# journalctl -f > /opt/log.txt
    Copy to clipboard

## EIS single stream use case

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=1 ! \
    video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_1080p.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[926]: [INFO]: RecorderCameraContext : OpenCamera: EIS on single stream is ON..
    cam-server[908]: CamX: [ INFO]908 981 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 131072
    cam-server[908]: CamX: [CORE_CFG]908 1796 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

## EIS enabled on first of two streams use case

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=1 video_0::type=preview ! \
    video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 \
    extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! \
    h264parse ! mp4mux ! filesink location=/opt/cam_prev.mp4 camsrc. ! \
    video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,\
    interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 \
    output-io-mode=5 extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" \
    ! h264parse ! mp4mux ! filesink location=/opt/cam_vid.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[926]: [INFO]: RecorderCameraContext : OpenCamera: EIS on single stream is ON..
    cam-server[926]: CamX: [ INFO]926 988 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 131072
    cam-server[926]: CamX: [CORE_CFG]926 2529 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

## EIS enabled on two streams

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=2 video_0::type=preview ! \
    video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 \
    extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! \
    h264parse ! mp4mux ! filesink location=/opt/cam_prev.mp4 camsrc. ! \
    video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,\
    interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 \
    output-io-mode=5 extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" \
    ! h264parse ! mp4mux ! filesink location=/opt/cam_vid.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[914]: [INFO]: RecorderCameraContext : OpenCamera: EIS on dual stream is ON..
    cam-server[914]: CamX: [ INFO]914 960 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 131072
    cam-server[914]: CamX: [CORE_CFG]914 2421 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

## LDC single stream use case

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc ldc=1 ! \
    video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_1080p.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[926]: [INFO]: RecorderCameraContext : OpenCamera: EIS is disabled cam-server[926]: [INFO]: RecorderCameraContext : OpenCamera: LDC is ON..
    cam-server[926]: CamX: [ INFO]926 990 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 524288
    cam-server[926]: CamX: [CORE_CFG]926 2132 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

## LDC enabled on two streams use case

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc ldc=1 video_0::type=preview ! \
    video/x-raw,format= NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_prev.mp4 \
    camsrc. ! video/x-raw,format=NV12,width=1280,height=720,\
    framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 \
    output-io-mode=5 extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! \
    h264parse ! mp4mux ! filesink location=/opt/cam_vid.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[914]: [INFO]: RecorderCameraContext : OpenCamera: EIS is disabled cam-server[914]: [INFO]: RecorderCameraContext : OpenCamera: LDC is ON..
    cam-server[914]: CamX: [ INFO]914 966 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 524288
    cam-server[914]: CamX: [CORE_CFG]914 1591 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

## EIS and LDC single stream use case

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=1 ldc=1 ! \
    video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 \
    ! v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_1080p.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[914]: [INFO]: RecorderCameraContext : OpenCamera: EIS on single stream is ON..
    cam-server[914]: [INFO]: RecorderCameraContext : OpenCamera: LDC is ON.. cam-server[914]: CamX: [CORE_CFG]914 2621 [CORE     ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

## EIS and LDC enabled on first of two streams use case

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=1 ldc=1 video_0::type=preview ! \
    video/x-raw,format= NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_prev.mp4 camsrc. ! \
    video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,\
    interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 \
    output-io-mode=5 extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! \
    h264parse ! mp4mux ! filesink location=/opt/cam_vid.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[2661]: [INFO]: RecorderCameraContext : OpenCamera: EIS on single stream is ON..
    cam-server[2661]: CamX: [ INFO]2661 2663 [CHI        ]
    camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 262144
    cam-server[2661]: CamX: [CORE_CFG]2661 2834 [CORE ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

## EIS and LDC enabled on two streams use case

Use the following GStreamer command to enable this use case:

gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=2 ldc=1 video_0::type=preview ! \
    video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_prev.mp4 camsrc. ! \
    video/x-raw,format=NV12,width=1280,height=720,\
    framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 \
    output-io-mode=5 extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! \
    h264parse ! mp4mux ! filesink location=/opt/cam_vid.mp4
    Copy to clipboard

Verify this use case is selected using the following logs:

cam-server[882]: [INFO]: RecorderCameraContext : OpenCamera: EIS on dual stream is ON..
    cam-server[882]: CamX: [ INFO]882 977 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 262144
    cam-server[882]: CamX: [CORE_CFG]882 1613 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeFeatureZSLPreviewRawYuvEisIoT_0 status is now PipelineStatus::STREAM_ON
    Copy to clipboard

Last Published: Jul 02, 2025

[Previous Topic
Enable high dynamic range](https://docs.qualcomm.com/bundle/publicresource/80-70020-17/topics/enable-high-dynamic-range.md) [Next Topic
Advanced feature concurrences](https://docs.qualcomm.com/bundle/publicresource/80-70020-17/topics/advanced-feature-concurrences.md)