CVB++ 15.0
Cvb::Foundation::Metric::LaserLineExtraction Namespace Reference

Namespace for functions and classes extracting lase lines from the Foundation package. More...

Classes

struct  LineExtractionParameters
 All necessary parameters for laser line extraction. More...
 

Enumerations

enum class  PeakLocalizationMethod { ArgMax = 1 , CoG }
 Peak location parameters. More...
 
enum class  FIRFilter { None = 1 , Mean }
 Filter parameters. More...
 

Functions

void ExtractLaserLineFromImage (const Image &monoImage, LineExtractionParameters parameters, int lineOut, Image &rangeMap)
 Extracts the laser line from given monoImage and stores it to lineOut of the previously allocated range map. More...
 
void ExtractLaserLineFromImage (const Image &monoImage, LineExtractionParameters parameters, int lineOut, Image &rangeMap, Image &intensityImage)
 Extracts the laser line from given monoImage and stores it to lineOut of the previously allocated range map. More...
 

Detailed Description

Namespace for functions and classes extracting lase lines from the Foundation package.

Enumeration Type Documentation

◆ FIRFilter

enum class FIRFilter
strong

Filter parameters.

Enumerator
None 

No active filtering.

Mean 

Mean filtering.

◆ PeakLocalizationMethod

enum class PeakLocalizationMethod
strong

Peak location parameters.

Enumerator
ArgMax 

The center peak is set to the highest value in a given set.

CoG 

Estimation of the center peak with center of gravity (CoG).

Function Documentation

◆ ExtractLaserLineFromImage() [1/2]

void ExtractLaserLineFromImage ( const Image monoImage,
LineExtractionParameters  parameters,
int  lineOut,
Image rangeMap 
)

Extracts the laser line from given monoImage and stores it to lineOut of the previously allocated range map.

Attention
The rangeMap must be allocated correctly. The following constraints must be met:
  • The width of monoImage and rangeMap must be equal.
  • The height of rangeMap must be greater than lineOut.
  • The data type of rangeMap must be float or double.
// load image with laser line
auto image = Cvb::Image::Load(L"image.tif");
// allocate range map
int numberOfLines = 100;
auto rangeMap = std::make_unique<Cvb::Image>(image->Width(), numberOfLines, 1, Cvb::DataType::Float32Bpp());
// extract laser line from image and store it to 5th row in range map
int iline = 5;
ExtractLaserLineFromImage(*image, parameters, iline, *rangeMap);
static DataType Float32Bpp() noexcept
Represents single precision (32-bit) floating point pixels.
Definition: data_type.hpp:147
static std::unique_ptr< Image > Load(const String &fileName)
Loads an image with the given file name.
Definition: detail_image.hpp:32
Namespace for functions and classes extracting lase lines from the Foundation package.
Definition: metric_laser_line_extraction.hpp:18
@ CoG
Estimation of the center peak with center of gravity (CoG).
void ExtractLaserLineFromImage(const Image &monoImage, LineExtractionParameters parameters, int lineOut, Image &rangeMap)
Extracts the laser line from given monoImage and stores it to lineOut of the previously allocated ran...
Definition: metric_laser_line_extraction.hpp:90
All necessary parameters for laser line extraction.
Definition: metric_laser_line_extraction.hpp:43
Parameters
[in]monoImageMono image with laser line to be extracted.
[in]parametersParameters for laser line extraction.
[in]lineOutLine in range map (or intensity image), where results will be stored.
[out]rangeMapRange map image where results are stored. It has to be allocated correctly.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ ExtractLaserLineFromImage() [2/2]

void ExtractLaserLineFromImage ( const Image monoImage,
LineExtractionParameters  parameters,
int  lineOut,
Image rangeMap,
Image intensityImage 
)

Extracts the laser line from given monoImage and stores it to lineOut of the previously allocated range map.

Intensity values are additionally stored to intensityImage.

Attention
The rangeMap and intensityImage must be allocated correctly. The following constraints must be met:
  • The width of monoImage and rangeMap (and intensityImage) must be equal.
  • The height of rangeMap (and intensityImage) must be greater than lineOut.
  • The data type of rangeMap (and intensityImage) must be float or double.
// load image with laser line
auto image = Cvb::Image::Load(L"image.tif");
// allocate range map and intensity image
int numberOfLines = 100;
auto rangeMap = std::make_unique<Cvb::Image>(image->Width(), numberOfLines, 1, Cvb::DataType::Float32Bpp());
auto intensityImage = std::make_unique<Cvb::Image>(image->Width(), numberOfLines, 1, Cvb::DataType::Float32Bpp());
// extract laser line from image and store it to 5th row in range map
int iline = 5;
ExtractLaserLineFromImage(*image, parameters, iline, *rangeMap, *intensityImage);
Parameters
[in]monoImageMono image with laser line to be extracted.
[in]parametersParameters for laser line extraction.
[in]lineOutLine in range map (or intensity image), where results will be stored.
[out]rangeMapRange map image where results are stored. It has to be allocated correctly.
[out]intensityImageImage where intensity values are stored. It has to be allocated correctly.
Exceptions
Anyexception derived from std::exception including CvbException.