ExtractBlob3D
The ExtractBlob3D function is used to extract the blob(s) relative to a reference Plane3D structure. It returns the extracted blob(s) as a Blobs3D structure.
ExtractBlob3D Inputs
The ExtractBlob3D function has the following syntax:
ExtractBlob3D(PointCloud,Fixture3D,ExternalFixture,Region3D,ExternalRegion,PlaneFromRegion,Plane3D,ExternalPlane,AutoConnectivityDist,ConnectivityDist,AutoNoiseThreshold,NoiseThreshold,NumberToExtract,MinimumVolume,MaximumVolume,MinimumHeight,MaximumHeight,BlobTypes,SortKey,SortOrder,SortTolerance,SortReference,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 is defined. It is offset from the PointCloud origin in the following format with the following arguments: {X, Y, Z, Rotation, Tilt, TiltDirection}
Note: This parameter is available only if External Fixture is set to 0.
|
||||||||||||||||||
| External Fixture |
Specifies a reference to a Fixture3D structure defined in another cell to be used as the function's fixture. Set to 0 (OFF) to use the function's internal fixture instead. |
||||||||||||||||||
|
Region3D |
Specifies the dimensions, offset and angle of the function's 3D region of interest (ROI). 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 available only if External Region is set to 0.
|
||||||||||||||||||
|
External Region |
Specifies a reference to 3D region defined in another cell to be used as the function's Region of Interest (ROI). Set to 0 (OFF) to use the function's internal Box3D structure as the ROI. |
||||||||||||||||||
| Plane From Region |
When checked, the function uses a plane derived from the configured Region3D region or External Region This is useful if you need only just a rough reference shape or surface, and you do not want to extract or explicitly define a plane. The setting is disabled (unchecked) by default. Note: Enabling this setting disables the Plane3D setting.
|
||||||||||||||||||
| 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: This parameter is available only if the Plane from Region parameter is disabled, and the External Plane parameter is set to a value other than 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 the Plane from Region parameter is disabled.
|
||||||||||||||||||
| Auto Connectivity Dist |
When checked, the function automatically tries to estimate the smallest distance that two points can be apart, but still be considered to belong to the same blob result. This is achieved by using the known point cloud and sensor sampling distance. This parameter is enabled by default. Note: If the computed distance turns out to be smaller than the distance required for your specific inspection, regions in multiple blobs may become broken. In such cases, disable this setting and increase the connectivity distance manually with the Connectivity Distance parameter.
Disable this setting to configure the connectivity distance manually. |
||||||||||||||||||
| Connectivity Distance |
Specifies the maximum distance (in real-world units) between two points at which they are still considered to be part of the same blob. The value range is between 0.010 – inf., and default value is 1.0. Tip: Higher values connect points further apart. For example, if you see a region split in two blobs when you expected just one, increase the value of this attribute so that points further away are connected into same blob.
Note: This parameter is enabled only if Auto Connectivity Dist is disabled.
|
||||||||||||||||||
| Auto Noise Threshold |
When checked, the function automatically sets the noise threshold of the blobs to be detected, based on the detected point cloud sampling distance. This parameter is enabled by default. Note: If the configured noise threshold turns out to be incorrect for your inspection, uncheck this attribute and configure the noise threshold manually with the following attribute.
|
||||||||||||||||||
| Noise Threshold |
Specifies the noise threshold of the blobs to be detected (in real-world units). This parameter creates a margin above and below the reference shape, and all points within this region are considered overlapping the reference shape. These points will not be part of any Positive or Negative blob types: only Unchanged blobs will contain them. Configuring this parameter properly helps you to deal with noisy points near the reference shape without affecting blob height and volume measurements. Tip: For most scenarios, Cognex recommends to set the Noise Threshold to the same value (or double that) of the Separation Distance Z-value. Larger values may also work for your inspection depending on the circumstances, as long as they do not exceed the minimum expected blob height.
The value range is from 0 to inf., and the default value is 0. Note: This parameter is enabled only if Auto Noise Threshold is disabled.
|
||||||||||||||||||
| Number to Extract |
Specifies the maximum number of blobs to extract. The value range is 1 to 65535, and the default value is 1. |
||||||||||||||||||
| Minimum Volume |
Specifies the minimum volume (in real-world units) that the blobs must have to be detected and included, allowing you to skip very small blobs that are probably caused by noise. The value range is from 0 to the configured value of the Maximum Volume property. The default value is 20). Tip: Cognex recommends setting this property as tight as possible to remove all unwanted blobs from the inspection.
|
||||||||||||||||||
| Maximum Volume | Specifies the maximum volume (in real-world units) that the blobs can have to be detected and included, allowing you to keep large blobs that must be part of the inspection. The value range is from the configured value of the Minimum Volume property to inf. The default value is 100,000,000). | ||||||||||||||||||
| Minimum Height |
Specifies the minimum height (in real-world units) that the blobs must have to be detected and included, allowing you to skip very small blobs that are probably caused by noise. The value range is from 0 to the configured value of the Maximum Height property. The default value is 1). |
||||||||||||||||||
| Maximum Height | Specifies the maximum height (in real-world units) that the blobs can have to be detected and included. The value range is from the configured value of the Minimum Height property to inf. The default value is 10000). | ||||||||||||||||||
| Blob Types |
Specifies the blob types to detect or ignore by checking or unchecking their respective properties. The available types are the following:
|
||||||||||||||||||
| Sort Key |
Specifies the logic by which the blobs of the referenced Blobs3D structure will be sorted. The available values are the following:
|
||||||||||||||||||
| Sort Order |
Specifies whether to sort the results in ascending or descending order. Note: This parameter is disabled if Sort Key is set to None.
|
||||||||||||||||||
| Sort Tolerance |
Specifies a threshold to determine if 2 or more results are tied. If they are tied, they can be sorted by a subsequent sort. Only takes effect when multiple sorting rules are applied (e.g. grid sorting or appending a sort tool). Note: This parameter is disabled if Sort Key is set to None.
|
||||||||||||||||||
| Sort Reference |
Specifies the origin of the coordinate space in which the positional and rotational values are defined. The available values are the following:
Note: This parameter is enabled only if External Region is set to 0, and Sort Key is set to Center of Mass X, Center of Mass Y, Center of Mass Z, Center of Mass R, Center of Mass Spoke Angle Norm/Abs, Center of Mass Spoke Radius, Center of Mass X then Y then Z, or Center of Mass Y then X then Z.
|
||||||||||||||||||
|
Show |
Selects the type of graphics to overlay on the image.
|
ExtractBlob3D Outputs
|
Returns |
A Blobs3D data structure containing the extracted 3D blob(s), 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.
|
ExtractBlob3D Vision Data Access Functions
The following Blobs3D Vision Data Access Functions are automatically inserted into the spreadsheet to create the result table:
| Function | Description |
| GetBoundingBox(Blobs3D, index) | Returns the bounding box of the blob as a Box3D structure. |
| GetCenterOfMass(Blobs3D, index) | Returns the center of mass of the blob as a Point3D structure |
| GetHeight(Blobs3D,index) | Returns the height of the blob. |
| GetHeightHistogram(Blobs3D, index, binSize, minValue, maxValue) | Returns the height histogram of the blob as a Histogram3D structure |
| GetNFound(Blobs3D) | Returns the number of blobs extracted by the function. |
| GetNPoints(Blobs3D, index) | Returns the number of points in the blob. |
| GetType(Blobs3D, index) | Returns the blob type of the blob as an integer value. |
| GetTypeText(Blobs3D, index) | Returns the blob type of the blob as text. |
| GetVolume(Blobs3D, index) | Returns the volume of the blob. |