ExtractBlobFromSphere3D
The ExtractBlobFromSphere3D function is used to extract 3D blobs relative to a reference Sphere3D structure. The function returns the extracted blob(s) in a Blobs3D structure on the Spreadsheet.
ExtractBlobFromSphere3D Inputs
The ExtractBlobFromSphere3D function has the following syntax:
ExtractBlobFromSphere3D(PointCloud,Fixture3D,ExternalFixture,Region3D,ExternalRegion,Sphere3D,ExternalSphere,AutoConnectivityDist,ConnectivityDist,AutoNoiseThreshold,NoiseThreshold,KernelSize,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.
Note: This parameter 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. |
||||||||||||||||||
| Sphere3D |
Specifies the radius and location of the 3D sphere. It is offset from the PointCloud origin in the following format with the following arguments: {Radius, X, Y, Z}
Note: This parameter is available only if External Sphere is set to 0.
|
||||||||||||||||||
| External Sphere |
Specifies a reference to a Sphere3D structure defined in another cell to be used for constructing the 3D structure. Set to 0 (OFF) to use the function's internal Sphere3D structure. |
||||||||||||||||||
| 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.
|
||||||||||||||||||
| Kernel Size |
Specifies the approximate size of the smallest tolerable deformations from the reference shape. The value range is 0 to inf., and the default value is 1. |
||||||||||||||||||
| 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.
|
ExtractBlobFromSphere3D 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.
|
ExtractBlobFromSphere3D 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. |