Add optional indices arg for fast computation of a small subset of FPFH features #7118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type
Motivation and Context
Allows optional selection of specific points when computing FPFH features for a point cloud. Previously, if you only needed FPFH features from a small subset of points (e.g., ISS keypoints), you had to compute the features for the entire point cloud (which was slow and unnecessary) and then select the relevant features. Now, you can directly compute the FPFH features for just the selected points, resulting in faster performance.
Unrelated, also fixed a bug in #7039 when calling SelectByIndex with
invert=true
.Checklist:
python util/check_style.py --apply
to apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
Made significant modifications to multiple files. Extra processing for a correct dataflow was needed when the user provides the required point indices.
An optional argument
indices
is added toComputeFPFHFeature
andt\ComputeFPFHFeature
. Ifindices
is provided, the function computes and returns the FPFH features for only the selected points. Some additional processing is performed to prepare the data. The catch is that even if the user selects n points, to compute the corresponding n FPFH features, the SPFH features of all the neighbors of each selected point must first be computed. And to compute the SPFH feature for a point, you need the data of its neighbors.This means that selecting 1% or 10% of the points will not result in a 100x or 10x speed-up, because the many SPFH features of all the neighbors still need to be computed. Moreover, the new inner pipelines within the FPFH functions are optimized for selecting a small fraction of indices (around 0-10%). If the fraction of selected indices is large, the speed-up will be minimal. In fact, if the fraction of selected points approaches 100%, calling the function without specifying indices (i.e., computing FPFH features for the entire point cloud) will actually be faster. In the next days I can add benchmark tests too.