Process Surface by Filter
Description
This Step is used to preprocess the surface with a specific filter to obtain a better surface.
Workflow
The process of configuring this Step is shown below.
-
Configure the input. Connect the ports manually or select the input(s) under Input in the parameter configuration panel.
-
Determine whether to use the feature region, select the Filter Type, and set the filter parameters.
-
Select the output item Depth Map (selected by default).
Parameter Description
- Show Advanced Filters
-
Once this parameter is selected, more advanced filters will be listed in the drop-down menu of Filter Type.
Default setting: Unselected
Instruction: Please set the parameter according to the actual requirement.
- Use Feature Region
-
Feature region defines the area to be preprocessed. When this option is selected, this Step will only process data within or outside the feature region.
Default setting: Unselected
Instruction: Please set the parameter according to the actual requirement.
- Feature Region Mode
-
Once Use Feature Region is selected, this parameter is used to set the mode of the feature region, that is, to select whether to preprocess the data within the feature region or the data outside the feature region.
Options: Include data in Region, Exclude data in Region
Default setting: Include data in Region
Instruction: To preprocess data within the feature region, select Include data in Region; otherwise, select Exclude data in Region.
For more information on how to set the feature region, please refer to Set the Feature Region. |
- Keep Unfiltered Data
-
Once this parameter is selected, the unfiltered data will be retained in the output.
Default setting: Unselected
- Filter Type
-
This parameter is used to select the filter type for feature region preprocessing.
Options: The filters are listed below. Please refer to Filter Type for detailed information.
-
Standard filter: Gap filling, Mean, Median, Decimation
-
Advanced filter: Dilation, Erosion, Opening, Closing, Morph gradient, Gaussian, Sobel, Laplacian, Negative, Normalization, Binarization, Percentile, Relative threshold, Crop
Default setting: Gap filling
Instruction: Please select the filter according to the actual requirement and data features.
Suggestions Description Understand data characteristics
Understand the features of the data: Familiarize yourself with your original data. Understand the noise types and the data processing tasks to be performed.
Check the available filters
Gain insight into the available filters. Different filters are applicable to different situations, such as the mean filter for smoothing and the median filter for noise removal.
Determine processing goal
When selecting a filter, consider the processing goals, such as noise removal, smoothing the curve, highlighting certain specific features, etc.
Test and compare
Use multiple filters to process the input data, and compare the results of each filter to see if the filtered data can meet the processing goals while preserving features.
Adjust parameters incrementally
Adjust the filter parameters incrementally for the best processing result.
Check filtering effect
Pay attention to the effect of each filter on the data. Ensure that the selected filter does not eliminate important features of the data.
-
Output Description
The output of this Step is a processed depth map that can be used as input to other Steps.
Appendix
Filter Type
-
Gap filling:
With the maximum or minimum Z values of the nearest neighbors or linear interpolation between neighboring values, this filter fills in missing data in the specified window.
Parameter Parameter Description Gap Filling Type
This parameter is used to select the method to fill the gaps.
-
Min Z point filling: Use the minimum Z value of the nearest neighbors to fill the gap.
-
Max Z point filling: Use the maximum Z value of the nearest neighbors to fill the gap.
-
Linear interpolation filling: Use linear interpolations of the Z values of the nearest neighbors to fill the gap.
Filter in X Direction
This parameter is used to determine whether to filter in the X-direction.
X-Direction Window Size
This parameter specifies the window size for X-direction filtering.
Filter in Y Direction
This parameter is used to determine whether to filter in the Y-direction.
Y-Direction Window Size
This parameter specifies the window size for Y-direction filtering.
-
-
Mean:
The mean filter can smooth the image by calculating the neighbors of pixels in the image and replacing the pixel values in the original image with the calculated average.
Parameter Parameter Description Filter in X Direction
This parameter is used to determine whether to filter in the X-direction.
X-Direction Window Size
This parameter specifies the window size for X-direction filtering.
Filter in Y Direction
This parameter is used to determine whether to filter in the Y-direction.
Y-Direction Window Size
This parameter specifies the window size for Y-direction filtering.
-
Median:
The median filter can reduce noise in images, especially salt and pepper noise. The filter substitutes the value of a certain point in the image with the median calculated within a specified window around the point, so that the surrounding pixel values are close to the real values, eliminating isolated noise points.
Parameter Parameter Description Filter in X Direction
This parameter is used to determine whether to filter in the X-direction.
X-Direction Window Size
This parameter specifies the window size for X-direction filtering.
Filter in Y Direction
This parameter is used to determine whether to filter in the Y-direction.
Y-Direction Window Size
This parameter specifies the window size for Y-direction filtering.
-
Decimation:
The decimation filter can reduce the image resolution. During decimation, some pixels in the raw image will be discarded.
Once this type of filter is selected, data outside the feature region cannot be retained during preprocessing of the feature region, i.e., Keep Unfiltered Data cannot be selected.
Parameter Parameter Description Filter in X Direction
This parameter is used to determine whether to filter in the X-direction.
X-Direction Window Size
This parameter specifies the window size for X-direction filtering.
Filter in Y Direction
This parameter is used to determine whether to filter in the Y-direction.
Y-Direction Window Size
This parameter specifies the window size for Y-direction filtering.
-
Dilation:
This type of filter can be used to remove small holes and smooth object edges to make the image more complete.
Note that dilation may magnify the noise in the image. Therefore, when dilating images, you should set a proper kernel size and symmetry to ensure that the dilation can achieve the desired result.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size during dilation.
Symmetry
This parameter is used to set the applied method for dilation.
-
Horizontal symmetry: Use the kernel to dilate the image horizontally.
-
Vertical symmetry: Use the kernel to dilate the image vertically.
-
Center symmetry: Use the square kernel to dilate the image.
-
-
Erosion:
This type of filter can be used to remove small objects or noises in the image to make the image clearer.
Note that erosion may lead to loss of image details, so you should set a proper kernel size and symmetry for erosion.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size during erosion.
Symmetry
This parameter is used to set the applied method for erosion.
-
Horizontal symmetry: Use the kernel to erode the image horizontally.
-
Vertical symmetry: Use the kernel to erode the image vertically.
-
Center symmetry: Use the square kernel to erode the image.
-
-
Opening:
Opening is essentially erosion followed by dilation. This type of filter can be used to remove the noise in the details of the image while preserving the main features of the image.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size during erosion and dilation.
-
Closing:
Closing is essentially dilation followed by erosion. This type of filter can be used to fill small holes in objects and smooth edges without significantly altering their areas. Secondly, the closing operation can effectively improve the issue of uneven object edges caused by noise.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size during dilation and erosion.
-
Morph gradient:
Morphological gradient is an operation in image morphological processing. It highlights the edge information in an image with the difference between dilation and erosion. This type of filter can enhance the object edges in the image and make the edges more prominent.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size during dilation and erosion.
-
Gaussian:
Gaussian filter can remove a certain amount of noise in the image. This type of filter can be used to effectively smooth the object edges while preserving the edges and details of the image. Therefore, it is usually used for image smoothing, removing high-frequency noise, and preprocessing before edge detection.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size in the process of smoothing the image.
-
Sobel:
Sobel is capable of performing operations within a certain range around pixels and is often used for image edge detection.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size during edge detection.
Symmetry
This parameter is used to set the applied method for edge detection.
-
Horizontal symmetry: Use the kernel to detect edges in the image horizontally.
-
Vertical symmetry: Use the kernel to detect edges in the image vertically.
-
Center symmetry: Use the square kernel to detect edges in the image.
Min Threshold
After filtering, points with Z values greater than this threshold will be considered edge points.
Max Threshold
Limit the Z values of the filtered points to this threshold or below.
-
-
Laplacian:
Laplacian can effectively detect edge and regions where grayscale changes abruptly in images.
Parameter Parameter Description Kernel Size
This parameter is used to set the kernel size during edge detection.
Min Threshold
After filtering, points with Z values greater than this threshold will be considered edge points.
Max Threshold
This parameter is used to limit the Z values of the filtered points to this threshold or below.
-
Negative:
During image processing, each pixel of the image can be inverted to achieve a visual effect similar to that of a negative film.
-
Normalization:
Normalization is a method for enhancing image contrast, which can improve the local contrast of an image without affecting the overall contrast.
Parameter Parameter Description Min Threshold
This parameter is used to normalize the filtered points to the range [Min Threshold, Max Threshold].
Max Threshold
This parameter is used to normalize the filtered points to the range [Min Threshold, Max Threshold].
-
Binarization:
This type of filter sets the pixel values of the grayscale image to two custom values. If the custom values are 0 and 255, pixels with depth values greater than or equal to the specified depth threshold are set to 255 (white), while pixels with depth values smaller than the threshold are set to 0 (black).
Parameter Parameter Description Min Threshold
This parameter is used to set the pixels whose values are smaller than or equal to Depth Threshold to the specified Min Threshold.
Max Threshold
This parameter is used to set the pixels whose values are greater than or equal to Depth Threshold to the specified Min Threshold.
Depth Threshold
Pixels with values smaller than the “Min/Max Threshold” will be set to the “Min/Max Threshold.”
-
Percentile:
After sorting the points in the feature region according to the depth values, each point has its own percentile. By setting Low Threshold Percentile and High Threshold Percentile, the points that do not meet the requirements can be removed. This type of filter can be used to analyze and process image data to extract useful information or improve image quality.
Parameter Parameter Description Low Threshold Percentile
Points with percentiles within the range of [Low Threshold Percent, High Threshold Percent] will be retained.
High Threshold Percentile
Points with percentiles within the range of [Low Threshold Percent, High Threshold Percent] will be retained.
-
Relative threshold:
Based on the specified minimum and maximum heights, set the height of the feature region relative to the reference region.
Parameter Parameter Description Low Threshold
Points with Z values within the range [Low Threshold, High Threshold] will be retained.
High Threshold
Points with Z values within the range [Low Threshold, High Threshold] will be retained.
-
Crop:
This type of filter can remove unqualified data in the feature region.
Troubleshooting
Invalid Type
No. | Error | Error Description | Possible Causes | Solution |
---|---|---|---|---|
1 |
The selected filter type is invalid. |
The selected filter type is invalid and cannot be used for filtering. |
The filter type was not selected properly. |
Select Filter Type again in the drop-down list. |
2 |
The selected gap filling type is invalid. |
When Filter Type is set to “Gap filling,” the selected Gap Filling Type is invalid. |
A valid gap filling type was not selected. |
Select Gap Filling Type again in the drop-down list. |
Invalid Parameter
No. | Error | Error Description | Possible Causes | Solution |
---|---|---|---|---|
1 |
The “Kernel Size” value is not set properly. |
After selecting a filter, the kernel size used for filtering is not set properly. |
“Kernel Size” was not greater than 0. |
Adjust the “Kernel Size” to ensure that it is greater than 0. |
2 |
The X-direction window size or Y-direction window size is not set properly. |
When Filter Type was set to “Gap filling,” the set value of “X/Y-Direction Window Size” is not appropriate. |
The “X/Y-Direction Window Size” was no greater than 0. |
Adjust the value of “X/Y-Direction Window Size” to ensure that it is greater than 0. |
3 |
Incorrect threshold setting. |
When Filter Type was set to “Relative threshold,” the threshold setting is incorrect. |
“Low Threshold” was not lower than “High Threshold” or was not within the range of 0–1. |
Adjust the thresholds again to ensure that the “Low Threshold” is smaller than the “High Threshold” and that both the “High Threshold” and “Low Threshold” are within the range of 0–1. |