# Easy3DLaserLineExtract

| Support            | ![](assets/images/sample_programs/applies_to/cpp.svg) ![](assets/images/sample_programs/applies_to/qt.svg)   |
|--------------------|--------------------------------------------------------------------------------------------------------------|
| Required licenses  | **Easy3DLaserLine**                                                                                          |
| Recommended images | The images from the folder `Sample Images/3D/Profiles`                                                       |
| Location           | `3D Processing/Easy3DLaserLineExtract`                                                                       |

## Purpose

This sample program demonstrates how to:

- Create a depth map from a series of profile images using the software laser line extractor.

![](assets/images/sample_programs/3d_processing_easy3dlaserlineextract.webp)

## Code highlights

1. Given a profile image, create the laser line extractor with the correct frame size and count.
   ```c++
   ELaserLineExtractor* laserLineExtractor_ = new ELaserLineExtractor(frameWidth, frameHeight, depthMapHeight);
   ```
2. Load a new image and extract the profile data. The depth map lines are accumulated in the object `ELaserLineExtractor`.
   ```c++
   currentFrame_.Load(*it);
   laserLineExtractor_->ExtractProfileFromFrame(currentFrame_);
   ```
3. Save the completed Depth Map as an image file to the “path” file.
   ```c++
   laserLineExtractor_->GetDepthMap().SaveImage(path);
   ```
