isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.55k stars 2.32k forks source link

"select_by_index" to work with the class "open3d.pipelines.registration.Feature" #7004

Closed RubensBenevides closed 1 day ago

RubensBenevides commented 1 month ago

Checklist

Proposed new feature or change

Suppose that I have a list of indexes indexes = o3d.utility.IntVector( [10,20,30] ) and I want to select these indexes from the FPFH descriptors: FPFH = o3d.pipelines.registration.compute_fpfh_feature(cloud, kd_tree_descriptor) I could do FPFH.select_by_index(indexes) but:

'open3d.cpu.pybind.pipelines.registration.Feature' object has no attribute 'select_by_index'

I can convert the FPFH features to numpy arrays: FPFH = np.asarray(FPFH.data) FPFH = FPFH.transpose()

and then select only the rows that I want FPFH = FPFH[indexes]

But now, there is no way to convert the FPFH numpy array back to a feature object.

References

(https://www.open3d.org/docs/release/python_api/open3d.pipelines.registration.Feature.html#open3d.pipelines.registration.Feature)

Additional information

No response

nicolaloi commented 4 weeks ago

I'll open a PR for this.

RubensBenevides commented 4 weeks ago

Thanks for your attention, Nicolaloi. I wanted this function to select only FPFH features calculated at keypoints. One problem with Open3D is that it calculates the FPFH for all the points in the cloud, which is not at all efficient. In my case, I work with the registration of clouds from Topographic/Terrestrial Laser Scanners, and ideally there should be a way of calculating the FPFH only for certain indices, such as the keypoints of the ISS detector.

Translated with DeepL.com (free version)

nicolaloi commented 3 weeks ago

I have opened a PR for the original feature request of the select_by_index method. What you describe in your comment is a different feature request. Can you open a new issue?