This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(website): add MinCutSegmentation and removeNaNNormalsFromPointCl…
…oud docs
- Loading branch information
Showing
4 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# removeNaNFromPointCloud | ||
|
||
Removes points with x, y, or z equal to NaN. | ||
|
||
```ts | ||
removeNaNFromPointCloud(cloudIn, cloudOut, indices) | ||
``` | ||
|
||
## Type Definitions | ||
|
||
```ts | ||
function removeNaNFromPointCloud<T>(cloudIn: PointCloud<T>, cloudOut?: PointCloud<T>, indices?: Indices): { | ||
cloud: PointCloud<T>; | ||
indices: Indices; | ||
}; | ||
``` |
16 changes: 16 additions & 0 deletions
16
website/docs/api/filters/remove-nan-normals-from-point-cloud.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# removeNaNNormalsFromPointCloud | ||
|
||
Removes points that have their normals invalid (i.e., equal to NaN). | ||
|
||
```ts | ||
removeNaNNormalsFromPointCloud(cloudIn, cloudOut, indices) | ||
``` | ||
|
||
## Type Definitions | ||
|
||
```ts | ||
function removeNaNNormalsFromPointCloud<T extends Normal | PointNormal>(cloudIn: PointCloud<T>, cloudOut?: PointCloud<T>, indices?: Indices): { | ||
cloud: PointCloud<T>; | ||
indices: Indices; | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"label": "Segmentation", | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
# MinCutSegmentation | ||
|
||
This class implements the segmentation algorithm based on minimal cut of the graph. | ||
|
||
More: | ||
1. https://pointclouds.org/documentation/classpcl_1_1_min_cut_segmentation.html | ||
2. https://pcl.readthedocs.io/projects/tutorials/en/master/min_cut_segmentation.html#min-cut-segmentation | ||
|
||
## Example | ||
|
||
```ts title="TypeScript" showLineNumbers | ||
import * as PCl from 'pcl' | ||
|
||
const pcl = await PCL.init(); | ||
|
||
const mcSeg = new pcl.segmentation.MinCutSegmentation<PCL.PointXYZ>( | ||
PCL.PointXYZ, | ||
); | ||
const objectCenter = new PCL.PointXYZ(68.97, -18.55, 0.57); | ||
|
||
const radius = 3.0433856; | ||
const sigma = 0.25; | ||
const sourceWeight = 0.8; | ||
const neighborNumber = 14; | ||
|
||
const foregroundPoints = new pcl.common.PointCloud<PCL.PointXYZ>(PCL.PointXYZ); | ||
foregroundPoints.addPoint(objectCenter); | ||
|
||
mcSeg.setForegroundPoints(foregroundPoints); | ||
mcSeg.setInputCloud(cloud); | ||
mcSeg.setRadius(radius); | ||
mcSeg.setSigma(sigma); | ||
mcSeg.setSourceWeight(sourceWeight); | ||
mcSeg.setNumberOfNeighbours(neighborNumber); | ||
|
||
const clusters = mcSeg.extract(); | ||
``` | ||
|
||
## Type Definitions | ||
```ts | ||
class MinCutSegmentation<T> { | ||
_native: Emscripten.NativeAPI; | ||
constructor(PT?: TPointTypesUnion); | ||
setInputCloud(cloud: PointCloud<T>): any; | ||
setSigma(sigma: number): void; | ||
getSigma(): number; | ||
setRadius(radius: number): void; | ||
getRadius(): number; | ||
setSourceWeight(weight: number): void; | ||
getSourceWeight(): number; | ||
setSearchMethod(tree: string | null): void; | ||
getSearchMethod(): string | null; | ||
setNumberOfNeighbours(neighbourNumber: number): void; | ||
getNumberOfNeighbours(): number; | ||
setForegroundPoints(cloud: PointCloud<T>): any; | ||
getForegroundPoints(): PointCloud<T>; | ||
setBackgroundPoints(cloud: PointCloud<T>): any; | ||
getBackgroundPoints(): PointCloud<T>; | ||
extract(): Vector<unknown>; | ||
getMaxFlow(): number; | ||
getColoredCloud(): PointCloud<T>; | ||
} | ||
``` |
e6529bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
pcl-js – ./
pcl-js-darkce.vercel.app
pcljs.org
pcl-js-git-master-darkce.vercel.app
www.pcljs.org