-
Notifications
You must be signed in to change notification settings - Fork 0
beam_defects
This module contains classes and functions to extract and interact with defects labelled in a Point Cloud.
Defect
is a pure virtual class that acts as a superclass to Crack, Spall, Delam, and Corrosion. Each sublcass will contain a PointXYZ point cloud that represents a single defect instance. The subclasses will implement the superclasse's methods, such as GetSize(), to suit the specific subclass (e.g. GetSize() returns area for Delam but length for Crack).
The methods in the crack class are used to perform actions such as calculating the crack size (length). The crack OSIM severity calculation is explained below.
The methods in the spall class are used to perform actions such as calculating the spall size (area). The spall OSIM severity can also be calculated automatically. The severity categories are based on the OSIM Manual.
The methods in the delam class are used to perform actions such as calculating the delam size (area). The delam OSIM severity can also be calculated automatically. The severity categories are based on the OSIM Manual.
The methods in the delam class are used to perform actions such as calculating the corrosion size (area). The corrosion OSIM severity is currently under development.
defect_functions.h
contains functions to gather information (e.g. area, OSIM severity) about a point cloud member variable within a defect object.
extract_functions.h
contains functions to extract Defect
objects from a labelled point cloud (beam container).
The following code shows how to load a PointBridge beam container, extract a vector of Delam objects, and output the area of each delam.
#include "beam_defects/Crack.h"
#include "beam_defects/extract_functions.h"
#include <beam_containers/PointBridge.h>
#include <pcl/io/pcd_io.h>
#include <vector>
int main() {
// Read in the cloud data
pcl::PCDReader reader;
auto cloud = boost::make_shared<pcl::PointCloud<beam_containers::PointBridge>>();
reader.read("test_data/20180622-flir_delam_ptCloud.pcd", *cloud);
// Extract a vector of Delam objects
float threshold = 0.9;
std::vector<beam_defects::Delam> delam_vector_ =
beam_defects::GetDelams(cloud, threshold);
// Loop through Delam objects and output their area
for (auto& defect : delam_vector_) {
std::cout << "Delam size is: " << defect.GetSize() << "m^2" << std::endl;
}
return 0;
}
The crack width and length are calculated using an adaptive sliding window along the crack skeleton. The algorithm is broken into the following steps:
- Find absolute endpoints of the crack skeleton.
- Fit window to the initial starting point.
- For each window:
- find the endpoint by searching all sides that the starting point is not on
- add these two points to a list
- calculate slope of crack within the window using these two points
- depending on the slope of the crack, measure width of crack vertically or horizontally across the window using the associated depth map, add this width to a list
- Repeat until no endpoint is found within the window
- Calculate euclidean distance of each endpoint using the DepthMap to get the length estimate
- Take an average of the list containing the widths to get the width estimate
- Return size of crack as length times width
- Home
- Onboarding
- Installation Guide
- Libbeam
- Mapping
- Calibration
- Hardware Instructions
- Deep Learning
- Formatting
- PoTree Maps
- Supported Hardware
- Additional Resources