Rectangular Planar Point Cloud Bounding Box With Normals

Description

This operator calculates an Oriented Bounding Box (OBB) for each input point cloud (an OBB is a rectangular box that can rotate arbitrarily, enclosing an object with minimum volume, and its edges are not necessarily parallel to the coordinate axes). It outputs the parameters of this OBB, including the center point, dimensions, transformation matrix, normal vector, and an adjustable ROI.

Overview

Calculates and outputs an oriented minimum bounding box for rectangular planar point clouds based on the input plane normal vector.

Scenarios

  • Precise Pose Estimation: Obtaining the precise dimensions, center, and orientation of an object, especially for rectangular or nearly rectangular objects placed arbitrarily rotated on a plane.

  • Grasp Planning: Providing precise bounding box information for robot grasping, including the object’s length, width, height, and orientation.

  • Dimension Measurement: Measuring the 3D dimensions of an object.

  • ROI Generation: Generating an ROI with orientation that tightly fits the object for subsequent fine processing or analysis.

Inputs and Outputs

Inputs

Point Cloud: The input point cloud or list of point clouds, mainly targeting planar point clouds.

Plane normal: A list containing plane normal vectors [nx, ny, nz] corresponding one-to-one with the input point cloud list. This normal vector defines the reference plane direction when searching for the minimum area bounding box.

Outputs

Bounding Box Normal: A list of calculated OBB normals in N×3 format (N bounding boxes, each normal has three xyz components).

Bounding Box Center: A list of center points of each bounding box in N×3 format (N bounding boxes, each center has xyz coordinates). The calculation method is determined by the 'Center Type' parameter.

Bounding Box: A list of detailed information for each bounding box, including center coordinates, size, and 3×3 rotation matrix, in the format [{center: [cx, cy, cz], size: [sx, sy, sz], transform: [[3×3 matrix]]}].

Bounding Box Size: A list of X, Y, Z dimensions of each bounding box along its principal axes, in N×3 format (N bounding boxes).

3D ROI: A list of 3D ROIs generated from the bounding boxes, possibly adjusted by scaling, in the format [{min: [min_x, min_y, min_z], max: [max_x, max_y, max_z], transform: cam2ROIFrame}].

Bounding Box Corner Points: A list of 8 corner point coordinates for each bounding box, in N×8×3 format (N bounding boxes, 8 corner points per box, each corner has three xyz coordinates).

Parameters

Angle Array Range

Description

Angular range of the rotation array.

Parameter Range

Values/Range: [0, 180]

Default: 90.0

Unit: °

Angle Array Step

Description

The angle increment when searching within the "Angle Array Range".

Tuning Instructions

Decreasing the step size improves the precision of finding the optimal angle but increases calculation time.

Increasing the step size does the opposite. The default value of 1.0 degree usually achieves a good balance between precision and speed.

Parameter Range

[0, 50], Default: 1, Unit: Degree

Parameter Range

Values/Range: [0, 50]

Default: 1.0

Unit: °

Center Point Type

Description

Select how the output "Bounding Box Center" is calculated.

Tuning Instructions

  • Bounding Box Center (Default): Directly uses the geometric center of the calculated AABB or OBB.

  • Point Cloud Mean: Uses the mean XYZ coordinates of the original point cloud forming the bounding box.

  • Point Cloud Median: Uses the median XYZ coordinates of the original point cloud forming the bounding box, which is more robust to outliers.

Parameter Range

Default: Bounding Box Center

Parameter Range

Values/Range:

  • Point Cloud Mean

  • Point Cloud Median

  • Bounding Box Center

Default: Bounding Box Center

Padding Method

Description

If set to "fixed value", subtracts the padding range from the ROI/bounding box minimum and adds it to the maximum to expand or shrink the range. If set to "ratio", scales each axis (X, Y, Z) proportionally.

Parameter Range

Values/Range:

  • Specified Value

  • Specified Ratio

  • No Scaling Allowed

Default: No Scaling Allowed

X Padding Range

Description

X-axis padding range. Subtracts this value from the X minimum and adds it to the X maximum of the ROI and bounding box to expand or shrink the range.

Parameter Range

Values/Range: [-5000, 10000]

Default: 0.0

Unit: mm

Y Padding Range

Description

Y-axis padding range. Subtracts this value from the Y minimum and adds it to the Y maximum of the ROI and bounding box to expand or shrink the range.

Parameter Range

Values/Range: [-5000, 10000]

Default: 0.0

Unit: mm

Z Padding Range

Description

Z-axis padding range. Subtracts this value from the Z minimum and adds it to the Z maximum of the ROI and bounding box to expand or shrink the range.

Parameter Range

Values/Range: [-5000, 10000]

Default: 0.0

Unit: mm

X Padding Ratio

Description

X-axis scale ratio. Scales the X dimension of the ROI and bounding box proportionally.

Parameter Range

Values/Range: [0, 5]

Default: 1

Unit: mm

Y Padding Ratio

Description

Y-axis scale ratio. Scales the Y dimension of the ROI and bounding box proportionally.

Parameter Range

Values/Range: [0, 5]

Default: 1

Unit: mm

Z Padding Ratio

Description

Z-axis scale ratio. Scales the Z dimension of the ROI and bounding box proportionally.

Parameter Range

Values/Range: [0, 5]

Default: 1

Unit: mm