Point Cloud Bounding Box (Along Long Edge)

Description

This operator calculates an Oriented Bounding Box (OBB) for each input point cloud. Unlike standard OBB calculation, this operator forces one principal axis of the bounding box (usually the longest axis) to align with the line direction input by the user during calculation. Finally, it outputs the parameters of this aligned OBB, including the center point, dimensions, transformation matrix, normal vector, and an adjustable 3D ROI.

Overview

Calculates an oriented bounding box for the input point cloud where the long edge of the box aligns with the input line direction.

Scenarios

  • Oriented Target Object Pose Estimation: When it is necessary to obtain the precise bounding box of an object with a known principal direction (for example, the long edge direction of a strip-shaped target object). By inputting this principal direction (long edge line), a bounding box that is more stable and fits the actual orientation of the object better can be obtained.

  • Constrained Bounding Box Calculation: In some applications, it is necessary to calculate the object boundary range under a specific directional constraint.

  • Picking and Placing: Generating aligned bounding boxes for objects with known principal directions facilitates robots in performing oriented picking or placing operations.

Inputs and Outputs

Inputs

Point Cloud: The input point cloud or list of point clouds.

Long edge line equation parameters: A list containing line model parameters corresponding one-to-one with the input point cloud list. This direction vector defines the principal direction with which the bounding box needs to align.

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

Center Point Type

Description

Selects the method used to calculate the output "Bounding Box Center Point".

Tuning Instructions

  • Bounding Box Center (Default): Directly uses the geometric center of the calculated OBB aligned with the input line.

  • Point Cloud Mean: Uses the mean XYZ coordinates of the raw point cloud constituting the OBB.

  • Point Cloud Median: Uses the median XYZ coordinates of the raw point cloud constituting the OBB, which is more robust to outliers.

Which method to choose depends on the requirements of subsequent applications for the definition of the center point.

Parameter Range

Values/Range:

  • Point Cloud Mean

  • Point Cloud Median

  • Bounding Box Center

Default: Bounding Box Center

Normal Z Direction

Description

Specifies whether the normal faces the positive or negative Z-axis direction.

Parameter Range

Values/Range:

  • Positive Z

  • Negative Z

Default: Positive Z

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