Functions
sal3d::Area Namespace Reference

Namespace for the Area Tool functions. More...

Functions

float areaToRefLine (const sal3d::COP &cop, int row, int edgePoints)
 Calculates the area of a given COP row over a base.
float areaEnclosed (const std::vector< sal3d::COP > &cops, int row)
 Calculates the area enclosed by a row of several COP objects.

Detailed Description

Namespace for the Area Tool functions.

The functions and classes in this namespace require linking with area.lib (import library for area.dll).

With the functions provided in this module, it is possible to compute the area enclosed in a multiple camera 360° laser triangulation slice, or the area of objects over a flat surface.

For the former case, it requires a COP from each camera, they being calibrated in a single coordinate system by a common calibration pattern. Interpolation occurs in the regions where there is not enough information, due either to shadows or insufficient camera coverage on the object scanned. The area calculation acts choosing rows from the multiple COPs; this requires correct acquisition synchronisation in order to match the profiles between COPs.

The latter case, objects over a flat surface, requires a COP from a single camera. If the bottom of the object is flat, the area can be computed by interpolating a "floor" line, which is then used to compute the area of what is above the floor. To properly use this function the acquisition must contain points from this base line.

Coding example

Following is a simple example that computes the area for each row of a COP, which for example can later be used to compute volumes.

 sal3d::COP cop("file.cop");
 std::vector<float> rowsArea;
 for (int i = 0; i < cop.height(); ++i)
 {
     //the 5 leftmost points and 5 rightmost points in the COP are used
     //to compute the reference line
     const float area =
         areaToRefLine(cop, i, 5);
     rowsArea.push_back(area);
 }

 // Work with areas
 ...