TrainPatMax3D
The TrainPatMax3D function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. is used to extract and train a 3D pattern in the point cloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition.. This pattern is then used with the FindPatMax3D function. The function returns a Model3D structure.
TrainPatMax3D Overview
The TrainPatMax3D function is used to extract and train a 3D pattern in the point cloud. This pattern is then used with the FindPatMax3D function.
The TrainPatMax3D function has the following syntax:
TrainPatMax3D(PointCloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition., Fixture3D, ExternalFixture, Box3D, ExternalRegion, ExcludeBasePlane, Plane3D, ExternalPlane, PatternOrigin, PatMax3DVersion, FeatureSize, TrainEvent, Timeout, Show)
See the table for a description of the available parameters.
| Parameter | Description | ||||||||||||||||||
|
PointCloud |
Reference to a cell containing a point cloud. The default value is $A$0. |
||||||||||||||||||
|
Fixture3D |
Specifies the point cloud coordinate system in which the 3D fixture A fixture is a coordinate location on the image that keeps the tool in the place determined by the fixture. is defined. It is offset from the PointCloud origin in the following format with the following arguments: {X, Y, Z, Rotation, Tilt, TiltDirection}
Note: The Fixture3D parameter is only available if you set External Fixture to 0.
Note: You can use the Fixture3D parameter to set the ROI fixture.
|
||||||||||||||||||
| External Fixture |
Specifies a reference to a Fixture3D structure defined in another cell. The function uses the referenced cell as the fixture of the function. Set to 0 (OFF) to use the internal fixture of the function instead. |
||||||||||||||||||
|
Box3D |
Specifies the dimensions, offset and angle for 3D region of interest (ROI) of the function. It is offset from the Fixture3D origin in the following format with the following arguments: {SizeX, SizeY, SizeZ, X, Y, Z, Rotation, Tilt, TiltDirection}
Note: This setting is only available if you set External Region to 0.
|
||||||||||||||||||
|
External Region |
Specifies a reference to a 3D region defined in another cell. The function uses the referenced cell as the Region of Interest of the function. Set to 0 (OFF) to use the internal Box3D structure of the function as the ROI. |
||||||||||||||||||
| Exclude Base Plane |
When enabled, the function adds a separate planar region of interest (ROI), so that the surface plane can be excluded when training or finding a 3D pattern, improving the performance of the tool. This setting is disabled by default, as undesired areas can also be excluded with appropriate placement of the Box3D structure. |
||||||||||||||||||
| Plane3D |
Specifies the offset and the angle of the plane to use. It is offset from the PointCloud origin in the following format with the following arguments: {X, Y, Z, Tilt, TiltDirection}
Note: This parameter is available only if External Plane is set to 0.
Note: You can use Plane3D to mask data for training. The Plane3D function prevents the tool from taking any points that belong to that plane and are within the ROI.
Note: This parameter is available only if Exclude Base Plane is True and External Plane is 0.
|
||||||||||||||||||
| External Plane |
Specifies a reference to a Rectangle3D or Circle3D structure defined in another cell to be used by the function. Set to 0 (OFF) to use the function's internal Plane3D structure instead. Note: This parameter is available only if Exclude Base Plane is True.
|
||||||||||||||||||
| Pattern Origin |
Specifies the X, Y and Z-axis location of the training pattern's origin, as offsets from the center of the training region.
|
||||||||||||||||||
| PatMax3D Version |
Note: The accuracy of the two versions is generally equal. However, there can be cases where one PatMax3D version produces a result, but the other does not.
|
||||||||||||||||||
| Feature Size |
Specifies the sampling quality of the point cloud points and patches that PatMax3D will use for alignment. The available values are the following:
Tip:
|
||||||||||||||||||
| Train Event | Trains the configured pattern upon clicking the button. | ||||||||||||||||||
| Timeout | Specifies a length of time (in milliseconds) to allow the training to run. The function execution stops if the time out exceeds the configured value. | ||||||||||||||||||
|
Show |
Selects the type of graphics to overlay on the image.
|
|
Returns |
A Model3D data structure containing the trained pattern, or #ERR if any of the input parameters are invalid. |
||||||||||||
|
Results |
When initially inserted into a cell, the following functions are automatically inserted into the spreadsheet to create a result table.
|
The following TrainPatMax3D Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:
| Function | Description |
| GetOrigin(Model3D) | Returns the origin point of the model as a Point3D structure. |
| GetTrained(Model3D) | Checks if the referenced cell contains a successfully trained pattern or not. The function returns 1 if it does, and 0 if it does not. |
| GetX(Point3D) | Returns the X-axis coordinate of the model's origin point. |
| GetY(Point3D) | Returns the Y-axis coordinate of the model's origin point. |
| GetZ(Point3D) | Returns the Z-axis coordinate of the model's origin point. |