---
title: C++
description: "## Examples | Name | Description | | --- | --- | | [environment-setup](/lipsedge-sdk-c/environment-setup/) | Help you make sure build environment is setup correctly | | [hello-lipsedge-sdk](https://dev.lips-hci.com/overview/hello-lipsedge-sdk/) | How to connect to camera and get camera info | | [opencv-viewer](/lipsedge-sdk-c/opencv-viewer/)…"
url: "https://dev.lips-hci.com/lipsedge-sdk-c/c/"
updated: "2026-04-01"
category: "LIPSedge™ SDK 1.x / LIPSedge™ SDK Languages & Libraries / C++"
tags:
  - LIPSedge SDK
---

# C++

## Examples

| Name | Description |
| --- | --- |
| [environment-setup](/lipsedge-sdk-c/environment-setup/) | Help you make sure build environment is setup correctly |
| [hello-lipsedge-sdk](https://dev.lips-hci.com/overview/hello-lipsedge-sdk/) | How to connect to camera and get camera info |
| [opencv-viewer](/lipsedge-sdk-c/opencv-viewer/) | Use OpenCV to display Color, depth and IR images |
| [roi](/lipsedge-sdk-c/roi/) | How to set the ROI of image frame |
| [depth_data](/lipsedge-sdk-c/depth-data/) | Get the depth value by pixel coordinate (x,y) |
| [align-depth-color](/lipsedge-sdk-c/align-depth-color/) | Align depth and RGB frame to the same coordinate |
| [range-filter](/lipsedge-sdk-c/range-filter/) | Get the data only in desired distance only |
| [remove-background](/lipsedge-sdk-c/remove-background/) | Use range filter to filter out the back ground |
| [record](/lipsedge-sdk-c/record/) | Record camera streams for NiViewer playback |
| [pointcloud](/lipsedge-sdk-c/pointcloud/) | Compute pointcloud data and display |
| [config-resolution](/lipsedge-sdk-c/config-resolution/) | Change resolution, FPS and pixel format |
| [camera-parameter](/lipsedge-sdk-c/camera-parameter/) | Get camera parameters |
| [align](https://dev.lips-hci.com/lipsedge-sdk-c/align/) | How to align depth and color streams captured from different viewpoints |
| [distance](https://dev.lips-hci.com/lipsedge-sdk-c/distance/) | Measure distances using depth data |
| [grabcuts](https://dev.lips-hci.com/lipsedge-sdk-c/grabcuts/) | Image segmentation using GrabCut algorithm. |
| [measure](https://dev.lips-hci.com/lipsedge-sdk-c/measure/) | Compute the real-world 3D distance between two user-selected points based on depth camera data. |
| [motion](https://dev.lips-hci.com/lipsedge-sdk-c/motion/) | Real-time estimation of the camera’s orientation (Roll, Pitch, Yaw) by fusing data from the onboard IMU sensors |
| [post-processing](https://dev.lips-hci.com/lipsedge-sdk-c/post-processing/) | Applying filters or other post-processing techniques to data |
| [save-to-disk](https://dev.lips-hci.com/lipsedge-sdk-c/save-to-disk/) | How to set up a camera and save both depth and RGB frames as PNG images |
| [sensor-control](https://dev.lips-hci.com/lipsedge-sdk-c/sensor-control/) | Controlling camera sensor parameters |

## Prerequisite

Install cmake and opencv.

### [https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#linux](https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#linux)Linux

```
sudo apt install cmake build-essential
sudo apt install libopencv-dev
```

### [https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#windows](https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#windows)Windows

Install [cmake](https://cmake.org/download/), [OpenCV](https://opencv.org/releases/) and [Visual Studio](https://visualstudio.microsoft.com/downloads/) (we use VS2019).

#### [https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#installation-guide-on-windows](https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#installation-guide-on-windows)Installation Guide on Windows

[LIPSedge SDK Installation](https://www.youtube.com/embed/qZqX6Qc6dtQ?feature=oembed)

Create two files, `example.cpp` and `CMakeLists.txt` with following content.

```
# CMakeLists.txt
cmake_minimum_required(VERSION 3.3)

project( example CXX )

if(MSVC)
    include_directories("C:/Program Files/OpenNI2/Include")
    link_directories("C:/Program Files/OpenNI2/Lib")
endif()

add_executable( ${PROJECT_NAME} project.cpp )

find_package(OpenCV)

target_link_libraries(${PROJECT_NAME} OpenNI2)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
```

```
// project_setup.cpp
#include <openni2/OpenNI.h>
#include <opencv2/core/core.hpp>

int main()
{
    auto version = new openni::Version();
    printf("OpenNI Version:%d.%d.%d.%dn", version->build, version->major, version->minor, version->maintenance);

    printf("OpenCV Version:%sn", CV_VERSION);
    return 0;
}
```

## [https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#build](https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#build)Build

### [https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#linux-1](https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#linux-1)Linux

Create a `build` folder next to `CMakeLists.txt`. Change directory to build folder. Use `cmake` to generate build files. Then use `make` to build.Copy

```
mkdir build
cd build
cmake ..
make
```

### [https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#windows-1](https://dev.lips-hci.com/lipsedge-tm-sdk-languages-and-libraries/overview#windows-1)Windows

1. Open Visual Studio and create a new project

![C 1 | LIPS® Developer Documentation](https://dev.lips-hci.com/wp-content/uploads/2025/02/C_1.avif)

2. Create a new cmake project

![C 2 | LIPS® Developer Documentation](https://dev.lips-hci.com/wp-content/uploads/2025/02/C_2.avif)

![C 3 1 | LIPS® Developer Documentation](https://dev.lips-hci.com/wp-content/uploads/2025/02/C_3-1.avif)

3. Modify `CMakeLists.txt` and `project_setup.cpp`

![C 4 | LIPS® Developer Documentation](https://dev.lips-hci.com/wp-content/uploads/2025/02/C_4.avif)

## Expect output

```
OpenNI Version:0.0.0.0
OpenCV Version:4.2.0.4.2.0
```
