> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mrdvs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Camera SDK

> Use Camera SDK to connect MRDVS cameras, configure parameters and acquire data in your application.

> **[CameraSDK on GitHub](https://github.com/Lanxin-MRDVS/CameraSDK#english)**
>
> Development libraries, English documentation, examples and release notes.

## Download SDK

| System | Version | Download |
| - | - | - |
| Windows | V2.4.70 | [Download EXE · 42.5 MB](https://mrdvs.oss-cn-hangzhou.aliyuncs.com/%E8%BF%88%E5%B0%94%E5%BE%AE%E8%A7%86%28MRDVS%29-Windows%E4%B8%8A%E4%BD%8D%E6%9C%BA/MRDVS-2.4.70.260911.exe) |
| Linux x64 / ARM64 / ARM32 | V2.4.70 | [Download TAR.GZ · 33.6 MB](https://mrdvs.oss-cn-hangzhou.aliyuncs.com/%E8%BF%88%E5%B0%94%E5%BE%AE%E8%A7%86%28MRDVS%29-Windows%E4%B8%8A%E4%BD%8D%E6%9C%BA/MRDVS-2.4.70.20260911.tar.gz) |

## Choose a tool

| Task | Tool |
| - | - |
| Connect cameras, inspect images and point clouds, and adjust parameters | [LxCameraViewer](/en/developers/software/lxcameraviewer.md) |
| Acquire data and control cameras in your application | Camera SDK |
| Deploy application algorithms | [Algorithm deployment guides](/en/solutions/index.md) |

## Development workflow

**1. Verify the connection**

Use LxCameraViewer to check the connection, images and point clouds.

**2. Choose the SDK package**

Select the package for your operating system and processor architecture, and read its documentation.

**3. Run an example and integrate**

Run a sample before integrating your application. Record the SDK and camera firmware versions used in deployment.

## GitHub quickstart

These examples use the GitHub repository layout. Installed packages may use different directories; adjust paths to match your installation.

### Supported platforms

| OS | Architecture | Runtime libraries | Examples |
| - | - | - | - |
| Linux | x64 / ARM64 / ARM32 | `libLxCameraApi.so`, `libLxDataProcess.so` | C/C++, Python, ROS, ROS 2 |
| Windows | x64 / x86 | `LxCameraApi.dll`, `LxDataProcess.dll` | C/C++, Python, C# |

### Get the source

```bash theme={null}
git clone https://github.com/Lanxin-MRDVS/CameraSDK.git
```

The Linux installation script requires administrator privileges and installs runtime libraries in `/opt/MRDVS`.

### Run a C/C++ example

**Linux**

```bash theme={null}
cd CameraSDK/linux
source install.sh
cd Sample/C
cmake -S . -B build
cmake --build build
./build/bin/demo_single_camera2
```

**Windows**

```powershell theme={null}
cd CameraSDK/windows/Sample/C
cmake -S . -B build
cmake --build build --config Release
```

> **Python and C# examples**
>
> Before running Python examples, set the library path and camera IP. Windows applications must be able to load the DLLs for their target architecture.
>
> | Examples | GitHub |
> | - | - |
> | Python · Linux | [Sample/python](https://github.com/Lanxin-MRDVS/CameraSDK/tree/master/linux/Sample/python) |
> | Python · Windows | [Sample/python](https://github.com/Lanxin-MRDVS/CameraSDK/tree/master/windows/Sample/python) |
> | C# · Windows | [Sample/C#](https://github.com/Lanxin-MRDVS/CameraSDK/tree/master/windows/Sample/C%23) |

> **API call sequence**
>
> ```text theme={null}
> DcGetDeviceList
> DcOpenDevice
> DcSetBoolValue / DcSetIntValue / DcSetFloatValue / DcSetStringValue
> DcStartStream
> DcSetCmd(LX_CMD_GET_NEW_FRAME) or DcRegisterFrameCallback
> DcGetPtrValue
> DcStopStream
> DcCloseDevice
> ```

### ROS integration

| ROS | GitHub |
| - | - |
| ROS 1 | [lx\_camera\_node\_ws](https://github.com/Lanxin-MRDVS/CameraSDK/tree/master/linux/Sample/ROS/lx_camera_node_ws) |
| ROS 2 | [lx\_camera\_node\_ws](https://github.com/Lanxin-MRDVS/CameraSDK/tree/master/linux/Sample/ROS2/lx_camera_node_ws) |

## Developer documentation

| Developer documentation | Version | Download |
| - | - | - |
| C/C++ developer guide | V2.0 · English | [Download PDF](https://raw.githubusercontent.com/Lanxin-MRDVS/CameraSDK/master/Document_EN/MRDVS_LxCameraSDK_C-Cpp_DeveloperGuide_V2.0_20260604.pdf) |
| Python developer guide | V2.0 · English | [Download PDF](https://raw.githubusercontent.com/Lanxin-MRDVS/CameraSDK/master/Document_EN/MRDVS_LxCameraSDK_Python_DeveloperGuide_V2.0_20260604.pdf) |
| Linux examples guide | V2.0 · English | [Download PDF](https://raw.githubusercontent.com/Lanxin-MRDVS/CameraSDK/master/Document_EN/MRDVS_LxCameraSDK_Linux_SampleGuide_V2.0_20260727.pdf) |

> **API and integration references**
>
> These online references retain detailed API, example and protocol information. Check installation paths and supported features against your SDK and firmware versions.
>
> * [Camera SDK User Guide](/en/developers/camera-sdk/user-guide.md)
> * [Linux SDK Examples](/en/developers/camera-sdk/linux-examples.md)
> * [JSON communication protocol](/en/developers/camera-sdk/json-protocol.md)

## Error codes and troubleshooting

Error codes help locate SDK, connection, and data-stream problems. Record the error code, SDK version, camera model, and device log before troubleshooting.

> [!WARNING]
>
> Do not troubleshoot by changing only the SDK version. Also confirm compatibility between the camera firmware, data-processing library, and development environment.

> **SDK error reference (−1 to −29)**
>
> | Code | Error codes and troubleshooting |
> | - | - |
> | `LX_ERROR = -1` | **Possible cause** Unknown error. **Resolution** Export the device log and send it to MRDVS technical support. |
> | `LX_E_NOT_SUPPORT = -2` | **Possible cause** The function is not supported. **Resolution** The current device does not support this feature. |
> | `LX_E_NETWORK_ERROR = -3` | **Possible cause** Network communication error. **Resolution** Check the IP configuration, network cables, switch, and packet loss. |
> | `LX_E_INPUT_ILLEGAL = -4` | **Possible cause** An input parameter is invalid. **Resolution** Check the parameters passed to the interface. |
> | `LX_E_RECONNECTING = -5` | **Possible cause** The device is reconnecting. **Resolution** 1. Wait briefly and retry until the connection is restored. 2. Check that the camera is powered on and the network connection is normal. |
> | `LX_E_DEVICE_ERROR = -6` | **Possible cause** The device failed or did not respond. **Resolution** Restart the application or camera and try again. |
> | `LX_E_DEVICE_NEED_UPDATE = -7` | **Possible cause** The device version is too old. **Resolution** Upgrade the firmware. |
> | `LX_E_API_NEED_UPDATE = -8` | **Possible cause** The API version is too old. **Resolution** Update the SDK. |
> | `LX_E_CTRL_PERMISS_ERROR = -9` | **Possible cause** Exclusive-control permission could not be obtained. **Resolution** Only one primary client can control a camera. If the camera was not shut down normally, wait `3–5 s` for the permission to be released. |
> | `LX_E_GET_DEVICEINFO_ERROR = -10` | **Possible cause** Device information could not be read. **Resolution** Check the device firmware version or contact MRDVS support. |
> | `LX_E_IMAGE_SIZE_ERROR = -11` | **Possible cause** The requested image size does not match the stream. **Resolution** Close the device and open it again. |
> | `LX_E_IMAGE_PARTITION_ERROR = -12` | **Possible cause** Image parsing failed, often because the pixel format is incorrect. **Resolution** Open the device again. |
> | `LX_E_DEVICE_NOT_CONNECTED = -13` | **Possible cause** The camera is not connected. **Resolution** The application attempted to use a camera that was not open. Check the call order and confirm that the camera opened successfully. |
> | `LX_E_DEVICE_INIT_FAILED = -14` | **Possible cause** Camera initialization failed. **Resolution** Open the camera again. |
> | `LX_E_DEVICE_NOT_FOUND = -15` | **Possible cause** No camera, or no matching camera, was found. **Resolution** Check that the camera handle passed to the interface is valid. |
> | `LX_E_FILE_INVALID = -16` | **Possible cause** The file name, type, format, or path is invalid, or the file could not be opened. **Resolution** Check that the path is correct and that the file can be opened manually. |
> | `LX_E_CRC_CHECK_FAILED = -17` | **Possible cause** CRC or MD5 verification failed during upload or download. **Resolution** Retry the transfer. |
> | `LX_E_TIME_OUT = -18` | **Possible cause** The request timed out. **Resolution** Retry. Packet loss or a low camera frame rate may be responsible. |
> | `LX_E_FRAME_LOSS = -19` | **Possible cause** Frames were lost, often in callback mode. **Resolution** Occasional loss may not require action. For frequent loss, check network bandwidth and buffering. |
> | `LX_E_ENABLE_ANYSTREAM_FAILED = -20` | **Possible cause** The requested stream configuration could not be enabled. **Resolution** Versions before `2.4.9` did not allow all streams to be disabled. This error code is obsolete in later versions. |
> | `LX_E_NOT_RECEIVE_STREAM = -21` | **Possible cause** No stream data was received. **Resolution** Use the camera-open troubleshooting steps for a missing data stream. |
> | `LX_E_PARSE_STREAM_FAILED = -22` | **Possible cause** The stream started but could not be parsed. **Resolution** Check the firmware version or contact MRDVS support. |
> | `LX_E_PROCESS_IMAGE_FAILED = -23` | **Possible cause** Image processing failed. **Resolution** Confirm that the `Dataprocess` image-processing library version is compatible. |
> | `LX_E_SETTING_NOT_ALLOWED = -24` | **Possible cause** The requested setting is not allowed in continuous mode. **Resolution** In continuous mode, stop the stream before changing the ROI, multi-camera mode, alignment, or other stream-related settings. Set the camera mode first, then apply the setting. |
> | `LX_E_LOAD_DATAPROCESSLIB_ERROR = -25` | **Possible cause** The image-processing library could not be loaded. **Resolution** Ensure that the `Dataprocess` dynamic library/shared object exists and is included in the library path. Run `source install.sh`. |
> | `LX_E_FUNCTION_CALL_LOGIC_ERROR = -26` | **Possible cause** The function call order or prerequisite logic is invalid. **Resolution** Check the SDK log and adjust the call sequence. Common cases include: 1. Stop the stream before changing a setting that changes the image size. 2. Do not change image size in continuous mode. 3. Algorithm upload and built-in application algorithms are mutually exclusive. 4. Do not enable auto exposure when HDR is enabled. 5. Auto-exposure parameters depend on the auto-exposure state. 6. Trigger parameters depend on the trigger mode. |
> | `LX_E_IPAPPDR_UNREACHABLE_ERROR = -27` | **Possible cause** The IP address is unreachable or the network is misconfigured. **Resolution** Confirm that the SDK host can ping the camera. |
> | `LX_E_FRAME_ID_NOT_MATCH = -28` | **Possible cause** RGB and ToF frames were not synchronized within the timeout window. **Resolution** When RGB-D synchronization is enabled, choose whether to discard the frame or ignore the warning based on whether synchronization or real-time data is more important for your application. |
> | `LX_E_FRAME_MULTI_MACHINE = -29` | **Possible cause** The frame contains an interference signal from another camera. **Resolution** Based on the application, discard the frame or ignore the warning. |

> **Error `-25` or `LxDataProcess` fails to load**
>
> **Possible cause** On Linux, the library is not included in the environment path. **Resolution** Run `source install.sh`.

> **The captured image is divided into three sections**
>
> **Possible cause** The displayed image aspect ratio is incorrect.

> **ROS 2 conflicts with the SDK library**
>
> **Resolution** Use the wrapper in the `util` directory. It links the camera SDK indirectly and avoids a direct library conflict.

> **How can I identify a Lite camera versus a standard camera with RGB?**
>
> **Resolution** Call `DcGetBoolValue(handle, LX_BOOL_ENABLE_2D_STREAM, &test_rgb)`. A Lite camera returns that the feature is not supported.

> **How is time synchronization handled?**
>
> **Resolution** The SDK synchronizes with PTP automatically on each interface call. No additional trigger is required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.