Data Processing
I. Align Data
During different scans of target objects, the position of pins in the acquired image data may vary slightly. If the acquired data are not in the same reference frame, the built project cannot be applied to all scanned data. Since the relative position of pins on a target object is fixed, certain features can be extracted to transform the acquired surface data and align all data.
Process Details
Use the Transform Surface Step to transform all surface data to a unified reference frame.
The Plane + Line approach is used to transform the reference frame since the surface surrounding pins is relatively flat, and extracting line features is simple.
-
Extract a plane feature: Use the Measure Surface Flatness Step to obtain a plane feature, which will be taken as the XOY plane of the unified reference frame.
-
Extract a line feature: Use the Fit Line to Surface Edge Step to obtain a line feature, and the line will be projected onto the input plane to act as the X axis.
Increasing the Outlier Fraction can help fit a more accurate line when there is a lot of noise. -
Align data: Run the Transform Surface Step to complete the transformation of the reference frame and thus align all data.
-
In the Output Results panel, click or to switch the data visualization status, and the data viewer will display the visual content accordingly.
-
The running speed of the Transform Data Step is affected by the Scan Line Count parameter set in Mech-Eye Viewer. When the parameter value is large, the image processing speed of the Step will slow down, which is likely to increase the cycle time.
-
Tilted incoming material |
Data after alignment |
II. Preprocess Data
The obtained surface data contains irrelevant data and noise. To increase the stability and accuracy of data, you can filter and denoise the surface data before measurement.
Preprocessing workflow: Filtering ➡ Rough locating ➡ Precise locating + filtering again
1) Filtering
Use the Filter Surface Points by Normals Step to extract pin data from the transformed surface data and then perform data filtering to remove noise.
-
Use a feature region to select the pin data.
-
In the parameter configuration panel of the Step, adjust parameters to remove noise.
After the Step is run, it will output processed surface data:
- Tuning experience
-
-
The Filter Surface Points by Normals Step is very effective in removing noise, especially for obtaining flat surface data. When the noise is slanted or consists of irregular scattered points, this Step can achieve good denoising results.
-
You can adjust the Max Polar Angle parameter to filter out slanted noise of varying degrees (recommended value: 60°) and adjust the Remove Noise parameter to filter out irregular points of varying degrees. Adjusting both parameters can produce better results. For more information on the parameters, see Angle-Based Filtering.
-
2) Rough Locating
Use the Blob Analysis Step to roughly locate pin tips from the filtered surface data.
-
In the parameter configuration panel of the Step, set appropriate height thresholds and area thresholds to detect the surface data of pin tips, i.e., multiple blobs.
-
Set the blob ordering method to number the detected blobs so that each blob can be accurately located in subsequent processes.
As shown in the figure, blobs are ordered “Row-wise.” The blob numbers (index) are for reference only.
Order blobs according to the actual needs. - Tuning experience
-
-
The Blob Analysis Step is essential for locating and outputting the surface data of each pin tip. In most cases, you can obtain good surface data of pin tips by setting reasonable height thresholds and area thresholds.
-
If data adhesion occurs, you can address the issue in the previous filtering process.
-
3) Precise locating + filtering again
Due to the physical characteristics of pins, the surface data of pin tips may not be flat enough or may have warped edges. It is necessary to further narrow down data range and apply additional filtering to remove noise.
-
Use the Locate Feature Point of Surface Step to extract the center point of each pin from the roughly located surface data of pin tips.
As shown in the figure, the feature point type is set to “Mean” to extract the center point of each blob (in bright yellow).
-
Use the Extract Alignment Parameter Group Step to obtain the coordinates of each center point.
When narrowing down the data range next, you only need to set one feature region, and the rest feature regions will be automatically aligned with the surface data of pin tips according to the coordinates of center points. -
Next, use the Process Surface by Filter Step to filter the roughly located surface data of pin tips to further narrow down the data range.
- Tuning experience
-
-
The measurement of pins requires high precision. The obtained surface data of pins may not be stable, but the central part of each pin tip is usually stable. The center point of the pin tip data (blob) can be used as the center of a small feature region to effectively extract the stable data.
-
You can use the Process Surface by Filter Step to further process the surface data and thus reduce data fluctuations.
As shown in the figure, remove the highest and lowest points from the data to further enhance data stability.
-
Up to now, you have finished data processing.
Next, you can start to measure the height and position of pins.