Method FindPlanes
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
FindPlanes(InputArray, InputArray, OutputArray, OutputArray, int, int, double, double, double, double, RgbdPlaneMethod)
Finds the planes in a depth image.
public static void FindPlanes(InputArray points3d, InputArray normals, OutputArray mask, OutputArray planeCoefficients, int blockSize = 40, int minSize = 1600, double threshold = 0.01, double sensorErrorA = 0, double sensorErrorB = 0, double sensorErrorC = 0, RgbdPlaneMethod method = RgbdPlaneMethod.Default)
Parameters
points3dInputArraythe 3d points organized like the depth image: rows x cols with 3 channels.
normalsInputArraythe normals for every point in the depth image; optional, can be empty.
maskOutputArrayan image where each pixel is labeled with the plane it belongs to (255 if none).
planeCoefficientsOutputArraythe coefficients of the corresponding planes (a,b,c,d) such that ax+by+cz+d=0.
blockSizeintthe size of the blocks to look at for a stable MSE.
minSizeintthe minimum size of a cluster to be considered a plane.
thresholddoublethe maximum distance of a point from a plane to belong to it (in meters).
sensorErrorAdoublecoefficient of the sensor error (0 by default, use 0.0075 for a Kinect).
sensorErrorBdoublecoefficient of the sensor error (0 by default).
sensorErrorCdoublecoefficient of the sensor error (0 by default).
methodRgbdPlaneMethodthe method to use to compute the planes.