Contents Menu Expand Light mode Dark mode Auto light/dark mode
Open3D primary (unknown) documentation
Open3D primary (unknown) documentation

Getting Started

  • Introduction
  • Getting started
  • Build from source
  • Link Open3D in C++ projects
  • Build documentation
  • Docker
  • ARM support
  • Cross-platform GPU support (SYCL)
  • Open3D-ML

Tutorial

  • Core
    • Tensor
    • Hash map
  • Geometry
    • Point cloud
    • Mesh
    • RGBD images
    • KDTree
    • File IO
    • Point cloud outlier removal
    • Voxelization
    • Octree
    • Surface reconstruction
    • Transformation
    • Mesh deformation
    • Intrinsic shape signatures (ISS)
    • Ray Casting
    • Distance Queries
    • UV Maps
    • Python Interface
    • Working with NumPy
  • Geometry (Tensor)
    • PointCloud
  • Dataset
  • Visualization
    • Visualization
    • Customized visualization
    • Interactive visualization
    • Non-blocking visualization
    • Headless rendering
    • CPU (Software) Rendering
    • Web visualizer and Jupyter
    • Open3D for TensorBoard
  • Pipelines
    • ICP registration
    • Robust kernels
    • Colored point cloud registration
    • Global registration
    • Multiway registration
    • RGBD integration
    • RGBD Odometry
    • Color Map Optimization
  • Pipelines (Tensor)
    • ICP registration
    • Robust Kernel
  • Reconstruction system
    • System overview
    • Make fragments
    • Register fragments
    • Refine registration
    • Integrate scene
    • Capture your own dataset
  • Reconstruction system (Tensor)
    • Voxel Block Grid
    • TSDF Integration
    • Customized Integration
    • Ray Casting in a Voxel Block Grid
    • Dense RGB-D SLAM
  • Sensor
    • Azure Kinect with Open3D
    • RealSense with Open3D
  • Reference

Python API

  • open3d.camera
    • PinholeCameraIntrinsic
    • PinholeCameraIntrinsicParameters
    • PinholeCameraParameters
    • PinholeCameraTrajectory
  • open3d.core
    • Blob
    • Device
    • Dtype
    • DynamicSizeVector
    • HashMap
    • HashSet
    • Scalar
    • SizeVector
    • Tensor
    • addmm
    • append
    • concatenate
    • det
    • inv
    • lstsq
    • lu
    • lu_ipiv
    • matmul
    • maximum
    • minimum
    • solve
    • svd
    • sycl_demo
    • tril
    • triu
    • triul
    • nns
      • NearestNeighborSearch
  • open3d.data
    • ArmadilloMesh
    • AvocadoModel
    • BedroomRGBDImages
    • BunnyMesh
    • CrateModel
    • DamagedHelmetModel
    • DataDescriptor
    • Dataset
    • DemoColoredICPPointClouds
    • DemoCropPointCloud
    • DemoCustomVisualization
    • DemoDopplerICPSequence
    • DemoFeatureMatchingPointClouds
    • DemoICPPointClouds
    • DemoPoseGraphOptimization
    • DownloadDataset
    • EaglePointCloud
    • FlightHelmetModel
    • JackJackL515Bag
    • JuneauImage
    • KnotMesh
    • LivingRoomPointClouds
    • LoungeRGBDImages
    • MetalTexture
    • MonkeyModel
    • OfficePointClouds
    • PCDPointCloud
    • PLYPointCloud
    • PaintedPlasterTexture
    • RedwoodIndoorLivingRoom1
    • RedwoodIndoorLivingRoom2
    • RedwoodIndoorOffice1
    • RedwoodIndoorOffice2
    • SampleFountainRGBDImages
    • SampleL515Bag
    • SampleNYURGBDImage
    • SampleRedwoodRGBDImages
    • SampleSUNRGBDImage
    • SampleTUMRGBDImage
    • SwordModel
    • TerrazzoTexture
    • TilesTexture
    • WoodFloorTexture
    • WoodTexture
  • open3d.geometry
    • AxisAlignedBoundingBox
    • DeformAsRigidAsPossibleEnergy
    • FilterScope
    • Geometry
    • Geometry2D
    • Geometry3D
    • HalfEdge
    • HalfEdgeTriangleMesh
    • Image
    • ImageFilterType
    • KDTreeFlann
    • KDTreeSearchParam
    • KDTreeSearchParamHybrid
    • KDTreeSearchParamKNN
    • KDTreeSearchParamRadius
    • LineSet
    • MeshBase
    • Octree
    • OctreeColorLeafNode
    • OctreeInternalNode
    • OctreeInternalPointNode
    • OctreeLeafNode
    • OctreeNode
    • OctreeNodeInfo
    • OctreePointColorLeafNode
    • OrientedBoundingBox
    • PointCloud
    • RGBDImage
    • SimplificationContraction
    • TetraMesh
    • TriangleMesh
    • Voxel
    • VoxelGrid
    • get_rotation_matrix_from_axis_angle
    • get_rotation_matrix_from_quaternion
    • get_rotation_matrix_from_xyz
    • get_rotation_matrix_from_xzy
    • get_rotation_matrix_from_yxz
    • get_rotation_matrix_from_yzx
    • get_rotation_matrix_from_zxy
    • get_rotation_matrix_from_zyx
  • open3d.io
    • AzureKinectMKVMetadata
    • AzureKinectMKVReader
    • AzureKinectRecorder
    • AzureKinectSensor
    • AzureKinectSensorConfig
    • FileGeometry
    • read_azure_kinect_mkv_metadata
    • read_azure_kinect_sensor_config
    • read_feature
    • read_file_geometry_type
    • read_image
    • read_line_set
    • read_octree
    • read_pinhole_camera_intrinsic
    • read_pinhole_camera_parameters
    • read_pinhole_camera_trajectory
    • read_point_cloud
    • read_point_cloud_from_bytes
    • read_pose_graph
    • read_triangle_mesh
    • read_triangle_model
    • read_voxel_grid
    • write_azure_kinect_mkv_metadata
    • write_azure_kinect_sensor_config
    • write_feature
    • write_image
    • write_line_set
    • write_octree
    • write_pinhole_camera_intrinsic
    • write_pinhole_camera_parameters
    • write_pinhole_camera_trajectory
    • write_point_cloud
    • write_point_cloud_to_bytes
    • write_pose_graph
    • write_triangle_mesh
    • write_voxel_grid
    • rpc
      • BufferConnection
      • Connection
      • destroy_zmq_context
      • data_buffer_to_meta_geometry
      • set_active_camera
      • set_legacy_camera
      • set_mesh_data
      • set_point_cloud
      • set_time
      • set_triangle_mesh
  • open3d.t
    • geometry
      • AxisAlignedBoundingBox
      • DrawableGeometry
      • Geometry
      • Image
      • InterpType
      • LineSet
      • MethodOBBCreate
      • Metric
      • MetricParameters
      • OrientedBoundingBox
      • PointCloud
      • RGBDImage
      • RaycastingScene
      • TensorMap
      • TriangleMesh
      • VectorMetric
      • VoxelBlockGrid
    • io
      • DepthNoiseSimulator
      • RGBDSensor
      • RGBDVideoMetadata
      • RGBDVideoReader
      • RSBagReader
      • RealSenseSensor
      • RealSenseSensorConfig
      • RealSenseValidConfigs
      • SensorType
      • read_image
      • read_point_cloud
      • read_triangle_mesh
      • write_image
      • write_point_cloud
      • write_triangle_mesh
    • pipelines
      • odometry
        • Method
        • OdometryConvergenceCriteria
        • OdometryLossParams
        • OdometryResult
        • compute_odometry_information_matrix
        • compute_odometry_result_hybrid
        • compute_odometry_result_intensity
        • compute_odometry_result_point_to_plane
        • rgbd_odometry_multi_scale
      • registration
        • ICPConvergenceCriteria
        • RegistrationResult
        • TransformationEstimation
        • TransformationEstimationForColoredICP
        • TransformationEstimationForDopplerICP
        • TransformationEstimationPointToPlane
        • TransformationEstimationPointToPoint
        • compute_fpfh_feature
        • correspondences_from_features
        • evaluate_registration
        • get_information_matrix
        • icp
        • multi_scale_icp
      • slac
        • control_grid
        • slac_debug_option
        • slac_optimizer_params
        • run_rigid_optimizer_for_fragments
        • run_slac_optimizer_for_fragments
        • save_correspondences_for_pointclouds
      • slam
        • Frame
        • Model
  • open3d.ml
    • tf
      • dataloaders
        • TFDataloader
      • datasets
        • Argoverse
        • Custom3D
        • InferenceDummySplit
        • KITTI
        • Lyft
        • MatterportObjects
        • NuScenes
        • ParisLille3D
        • S3DIS
        • Scannet
        • SemSegRandomSampler
        • SemSegSpatiallyRegularSampler
        • Semantic3D
        • SemanticKITTI
        • ShapeNet
        • SunRGBD
        • TUMFacade
        • Toronto3D
        • Waymo
        • augment
          • ObjdetAugmentation
          • SemsegAugmentation
        • utils
          • BEVBox3D
          • DataProcessing
          • ObjdetAugmentation
          • create_3D_rotations
          • get_min_bbox
          • trans_augment
          • trans_crop_pc
          • trans_normalize
      • layers
        • ContinuousConv
        • FixedRadiusSearch
        • KNNSearch
        • RadiusSearch
        • SparseConv
        • SparseConvTranspose
        • VoxelPooling
      • models
        • KPFCNN
        • PVCNN
        • PointPillars
        • PointRCNN
        • PointTransformer
        • RandLANet
        • SparseConvUnet
      • modules
        • losses
          • CrossEntropyLoss
          • FocalLoss
          • SemSegLoss
          • SmoothL1Loss
        • metrics
          • SemSegMetric
      • ops
        • build_spatial_hash_table
        • continuous_conv
        • continuous_conv_backprop_filter
        • continuous_conv_transpose
        • continuous_conv_transpose_backprop_filter
        • fixed_radius_search
        • invert_neighbors_list
        • knn_search
        • nms
        • radius_search
        • reduce_subarrays_sum
        • voxel_pooling
        • voxel_pooling_grad
        • voxelize
      • pipelines
        • ObjectDetection
        • SemanticSegmentation
      • vis
        • BoundingBox3D
        • Colormap
        • DataModel
        • DatasetModel
        • LabelLUT
        • Model
        • Visualizer
        • deque
        • rgb_to_yiq
    • torch
      • classes
        • RaggedTensor
      • dataloaders
        • ConcatBatcher
        • DefaultBatcher
        • TorchDataloader
        • get_sampler
      • datasets
        • Argoverse
        • Custom3D
        • InferenceDummySplit
        • KITTI
        • Lyft
        • MatterportObjects
        • NuScenes
        • ParisLille3D
        • S3DIS
        • Scannet
        • SemSegRandomSampler
        • SemSegSpatiallyRegularSampler
        • Semantic3D
        • SemanticKITTI
        • ShapeNet
        • SunRGBD
        • TUMFacade
        • Toronto3D
        • Waymo
        • augment
          • ObjdetAugmentation
          • SemsegAugmentation
        • samplers
          • SemSegRandomSampler
          • SemSegSpatiallyRegularSampler
        • utils
          • BEVBox3D
          • DataProcessing
          • ObjdetAugmentation
          • create_3D_rotations
          • get_min_bbox
          • trans_augment
          • trans_crop_pc
          • trans_normalize
      • layers
        • ContinuousConv
        • FixedRadiusSearch
        • KNNSearch
        • RadiusSearch
        • SparseConv
        • SparseConvTranspose
        • VoxelPooling
      • models
        • KPFCNN
        • PVCNN
        • PointPillars
        • PointRCNN
        • PointTransformer
        • RandLANet
        • SparseConvUnet
      • modules
        • losses
          • CrossEntropyLoss
          • FocalLoss
          • SemSegLoss
          • SmoothL1Loss
          • filter_valid_label
        • metrics
          • SemSegMetric
      • ops
        • build_spatial_hash_table
        • continuous_conv
        • continuous_conv_transpose
        • fixed_radius_search
        • invert_neighbors_list
        • knn_search
        • nms
        • radius_search
        • reduce_subarrays_sum
        • voxel_pooling
        • voxelize
      • pipelines
        • ObjectDetection
        • SemanticSegmentation
      • vis
        • BoundingBox3D
        • Colormap
        • DataModel
        • DatasetModel
        • LabelLUT
        • Model
        • Visualizer
        • deque
        • rgb_to_yiq
  • open3d.pipelines
    • color_map
      • NonRigidOptimizerOption
      • RigidOptimizerOption
      • run_non_rigid_optimizer
      • run_rigid_optimizer
    • integration
      • ScalableTSDFVolume
      • TSDFVolume
      • TSDFVolumeColorType
      • UniformTSDFVolume
    • odometry
      • OdometryOption
      • RGBDOdometryJacobian
      • RGBDOdometryJacobianFromColorTerm
      • RGBDOdometryJacobianFromHybridTerm
      • compute_correspondence
      • compute_rgbd_odometry
    • registration
      • CauchyLoss
      • CorrespondenceChecker
      • CorrespondenceCheckerBasedOnDistance
      • CorrespondenceCheckerBasedOnEdgeLength
      • CorrespondenceCheckerBasedOnNormal
      • FastGlobalRegistrationOption
      • Feature
      • GMLoss
      • GlobalOptimizationConvergenceCriteria
      • GlobalOptimizationGaussNewton
      • GlobalOptimizationLevenbergMarquardt
      • GlobalOptimizationMethod
      • GlobalOptimizationOption
      • HuberLoss
      • ICPConvergenceCriteria
      • L1Loss
      • L2Loss
      • PoseGraph
      • PoseGraphEdge
      • PoseGraphEdgeVector
      • PoseGraphNode
      • PoseGraphNodeVector
      • RANSACConvergenceCriteria
      • RegistrationResult
      • RobustKernel
      • TransformationEstimation
      • TransformationEstimationForColoredICP
      • TransformationEstimationForGeneralizedICP
      • TransformationEstimationPointToPlane
      • TransformationEstimationPointToPoint
      • TukeyLoss
      • compute_fpfh_feature
      • correspondences_from_features
      • evaluate_registration
      • get_information_matrix_from_point_clouds
      • global_optimization
      • registration_colored_icp
      • registration_fgr_based_on_correspondence
      • registration_fgr_based_on_feature_matching
      • registration_generalized_icp
      • registration_icp
      • registration_ransac_based_on_correspondence
      • registration_ransac_based_on_feature_matching
  • open3d.utility
    • DoubleVector
    • IntVector
    • Matrix3dVector
    • Matrix4dVector
    • Vector2dVector
    • Vector2iVector
    • Vector3dVector
    • Vector3iVector
    • Vector4iVector
    • VerbosityContextManager
    • VerbosityLevel
    • get_verbosity_level
    • reset_print_function
    • set_verbosity_level
  • open3d.visualization
    • ExternalVisualizer
    • Material
    • MeshColorOption
    • MeshShadeOption
    • O3DVisualizer
    • PickedPoint
    • PointColorOption
    • RenderOption
    • ScalarProperties
    • SelectedIndex
    • SelectionPolygonVolume
    • TextureMaps
    • VectorProperties
    • ViewControl
    • Visualizer
    • VisualizerWithEditing
    • VisualizerWithKeyCallback
    • VisualizerWithVertexSelection
    • draw
    • draw_geometries
    • draw_geometries_with_animation_callback
    • draw_geometries_with_custom_animation
    • draw_geometries_with_editing
    • draw_geometries_with_key_callbacks
    • draw_geometries_with_vertex_selection
    • read_selection_polygon_volume
    • gui
      • Application
      • Button
      • CheckableTextTreeCell
      • Checkbox
      • CollapsableVert
      • Color
      • ColorEdit
      • ColormapTreeCell
      • Combobox
      • Dialog
      • FileDialog
      • FontDescription
      • FontStyle
      • Horiz
      • ImageWidget
      • KeyEvent
      • KeyModifier
      • KeyName
      • LUTTreeCell
      • Label
      • Label3D
      • Layout1D
      • LayoutContext
      • ListView
      • Margins
      • Menu
      • MouseButton
      • MouseEvent
      • NumberEdit
      • ProgressBar
      • RadioButton
      • Rect
      • SceneWidget
      • ScrollableVert
      • Size
      • Slider
      • StackedWidget
      • TabControl
      • TextEdit
      • Theme
      • ToggleSwitch
      • TreeView
      • UIImage
      • VGrid
      • VectorEdit
      • Vert
      • Widget
      • WidgetProxy
      • WidgetStack
      • Window
      • WindowBase
    • rendering
      • Camera
      • ColorGrading
      • Gradient
      • MaterialRecord
      • OffscreenRenderer
      • Open3DScene
      • Renderer
      • Scene
      • TextureHandle
      • TriangleMeshModel
      • View
    • webrtc_server
      • call_http_api
      • disable_http_handshake
      • enable_webrtc
      • register_data_channel_message_callback
    • tensorboard_plugin.summary
      • add_3d

Python Examples

  • Camera
  • Geometry
    • Image
    • KD Tree
    • Octree
    • Point Cloud
    • Ray Casting
    • RGBD Image
    • Triangle Mesh
    • Voxel Grid
  • IO
  • Pipelines
  • Utility
  • Visualization

C++ API

  • C++ documentation

Contribute

  • Contributing to Open3D
  • Contribution methods
  • Open3D style guide

Docs Version

main main C++
0.19.0 (release) 0.19.0 C++ (release)
0.18.0 0.18.0 C++
0.17.0 0.17.0 C++
0.16.0 0.16.0 C++
0.15.1 0.15.1 C++
0.14.1 0.14.1 C++
0.13.0 0.13.0 C++
0.12.0 0.12.0 C++
0.11.1 0.11.1 C++
0.11.0 0.11.0 C++
0.10.0 0.10.0 C++
0.9.0 0.9.0 C++
0.8.0 0.8.0 C++
0.7.0 0.7.0 C++
0.6.0 0.6.0 C++
Back to top

open3d.ml.torch.ops.fixed_radius_search#

open3d.ml.torch.ops.fixed_radius_search(points, queries, radius, points_row_splits, queries_row_splits, hash_table_splits, hash_table_index, hash_table_cell_splits, index_dtype=3, metric='L2', ignore_query_point=False, return_distances=False)#

Computes the indices of all neighbors within a radius.

This op computes the neighborhood for each query point and returns the indices of the neighbors and optionally also the distances. The same fixed radius is used for each query point. Points and queries can be batched with each batch item having an individual number of points and queries. The following example shows a simple search with just a single batch item:

import open3d.ml.tf as ml3d

points = [
  [0.1,0.1,0.1],
  [0.5,0.5,0.5],
  [1.7,1.7,1.7],
  [1.8,1.8,1.8],
  [0.3,2.4,1.4]]

queries = [
    [1.0,1.0,1.0],
    [0.5,2.0,2.0],
    [0.5,2.1,2.1],
]

radius = 1.0

# build the spatial hash table for fixex_radius_search
table = ml3d.ops.build_spatial_hash_table(points,
                                          radius,
                                          points_row_splits=torch.LongTensor([0,5]),
                                          hash_table_size_factor=1/32)

# now run the fixed radius search
ml3d.ops.fixed_radius_search(points,
                             queries,
                             radius,
                             points_row_splits=torch.LongTensor([0,5]),
                             queries_row_splits=torch.LongTensor([0,3]),
                             **table._asdict())
# returns neighbors_index      = [1, 4, 4]
#         neighbors_row_splits = [0, 1, 2, 3]
#         neighbors_distance   = []

# or with pytorch
import torch
import open3d.ml.torch as ml3d

points = torch.Tensor([
  [0.1,0.1,0.1],
  [0.5,0.5,0.5],
  [1.7,1.7,1.7],
  [1.8,1.8,1.8],
  [0.3,2.4,1.4]])

queries = torch.Tensor([
    [1.0,1.0,1.0],
    [0.5,2.0,2.0],
    [0.5,2.1,2.1],
])

radius = 1.0

# build the spatial hash table for fixex_radius_search
table = ml3d.ops.build_spatial_hash_table(points,
                                          radius,
                                          points_row_splits=torch.LongTensor([0,5]),
                                          hash_table_size_factor=1/32)

# now run the fixed radius search
ml3d.ops.fixed_radius_search(points,
                             queries,
                             radius,
                             points_row_splits=torch.LongTensor([0,5]),
                             queries_row_splits=torch.LongTensor([0,3]),
                             **table._asdict())
# returns neighbors_index      = [1, 4, 4]
#         neighbors_row_splits = [0, 1, 2, 3]
#         neighbors_distance   = []
index_dtype:

The data type for the returned neighbor_index Tensor. Either int32 or int64. Default is int32.

metric:

Either L1, L2 or Linf. Default is L2

ignore_query_point:

If true the points that coincide with the center of the search window will be ignored. This excludes the query point if ‘queries’ and ‘points’ are the same point cloud.

return_distances:

If True the distances for each neighbor will be returned in the tensor ‘neighbors_distance’. If False a zero length Tensor will be returned for ‘neighbors_distance’.

points:

The 3D positions of the input points.

queries:

The 3D positions of the query points.

radius:

A scalar with the neighborhood radius

points_row_splits:

1D vector with the row splits information if points is batched. This vector is [0, num_points] if there is only 1 batch item.

queries_row_splits:

1D vector with the row splits information if queries is batched. This vector is [0, num_queries] if there is only 1 batch item.

hash_table_splits: Array defining the start and end the hash table

for each batch item. This is [0, number of cells] if there is only 1 batch item or [0, hash_table_cell_splits_size-1] which is the same.

hash_table_index: Stores the values of the hash table, which are the indices of

the points. The start and end of each cell is defined by hash_table_cell_splits.

hash_table_cell_splits: Defines the start and end of each hash table cell.

neighbors_index:

The compact list of indices of the neighbors. The corresponding query point can be inferred from the ‘neighbor_count_row_splits’ vector.

neighbors_row_splits:

The exclusive prefix sum of the neighbor count for the query points including the total neighbor count as the last element. The size of this array is the number of queries + 1.

neighbors_distance:

Stores the distance to each neighbor if ‘return_distances’ is True. Note that the distances are squared if metric is L2. This is a zero length Tensor if ‘return_distances’ is False.

Next
open3d.ml.torch.ops.invert_neighbors_list
Previous
open3d.ml.torch.ops.continuous_conv_transpose
Copyright © 2018 - 2023, www.open3d.org
Made with Sphinx and @pradyunsg's Furo
On this page
  • open3d.ml.torch.ops.fixed_radius_search
    • fixed_radius_search()