Plane¶
- class Plane(*args, **kwargs)¶
Bases:
pybind11_object
This class defines the container for a plane geometrical structure.
A plane is given by the equation \(Ax + By + Cz + D = 0\) where (x,y,z) are the coordinates of a point and where \([A,B,C]^T\) is a normal vector of the plane.
Overloaded function.
__init__(self: visp._visp.core.Plane) -> None
Basic constructor that set the plane parameters A, B, C, D to zero.
__init__(self: visp._visp.core.Plane, P: visp._visp.core.Plane) -> None
Copy constructor.
__init__(self: visp._visp.core.Plane, A: float, B: float, C: float, D: float) -> None
Plane constructor from A, B, C, D parameters.
A plane is given by the equation \(Ax + By + Cz + D = 0\) where (x,y,z) are the coordinates of a point and \([A,B,C]^T\) is the normal vector of the plane.
__init__(self: visp._visp.core.Plane, P: visp._visp.core.Point, n: visp._visp.core.ColVector, frame: visp._visp.core.Plane.PlaneFrame) -> None
Plane constructor from a point P on the plane and the normal n to the plane.
A plane is given by the equation \(Ax + By + Cz + D = 0\) where (x,y,z) are the coordinates of a point and \([A,B,C]^T\) is the normal vector of the plane.
- Parameters:
- P
A point with coordinates (x,y,z) on the plane. The frame parameter indicates if the coordinates of this points that are used are expressed in the camera of object frame.
- n
The normal to the plane.
- frame
Indicates if the plane should be initialized from the point P coordinates expressed in the camera or object frame.
__init__(self: visp._visp.core.Plane, P: visp._visp.core.Point, Q: visp._visp.core.Point, R: visp._visp.core.Point, frame: visp._visp.core.Plane.PlaneFrame) -> None
Compute the equation of a plane given three point P, Q, R.
The normal to the plane is given by: n = PQ x PR
Note
See init(const vpPoint &, const vpPoint &, const vpPoint &)
- Parameters:
- P
Three points on the plane.
- Q
Three points on the plane.
- R
Three points on the plane.
- frame
Indicates if the plane should be initialized from the points coordinates expressed in the camera or object frame.
Methods
Overloaded function.
Note
See getABCD()
Considering the plane in the Ro frame computes the equation of the plane in the Rc frame.
- param x:
Coordinates of a point in the image plane. These coordinates are the one obtained by perspective projection of a 3D point.
- return:
The value of the plane parameter A.
- return:
Return the four dimension vector \([A,B,C,D]^T\) corresponding to the plane parameters.
- return:
The value of the plane parameter B.
- return:
The value of the plane parameter C.
- return:
The value of the plane parameter D.
Overloaded function.
Overloaded function.
Compute the coordinates of the projection of a point on the plane.
Set plane parameter A.
Set plane parameters A, B, C, D.
Set plane parameter B.
Set plane parameter C.
Set plane parameter D.
Inherited Methods
Operators
__doc__
Overloaded function.
__module__
__repr__
Attributes
__annotations__
camera_frame
object_frame
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: visp._visp.core.Plane) -> None
Basic constructor that set the plane parameters A, B, C, D to zero.
__init__(self: visp._visp.core.Plane, P: visp._visp.core.Plane) -> None
Copy constructor.
__init__(self: visp._visp.core.Plane, A: float, B: float, C: float, D: float) -> None
Plane constructor from A, B, C, D parameters.
A plane is given by the equation \(Ax + By + Cz + D = 0\) where (x,y,z) are the coordinates of a point and \([A,B,C]^T\) is the normal vector of the plane.
__init__(self: visp._visp.core.Plane, P: visp._visp.core.Point, n: visp._visp.core.ColVector, frame: visp._visp.core.Plane.PlaneFrame) -> None
Plane constructor from a point P on the plane and the normal n to the plane.
A plane is given by the equation \(Ax + By + Cz + D = 0\) where (x,y,z) are the coordinates of a point and \([A,B,C]^T\) is the normal vector of the plane.
- Parameters:
- P
A point with coordinates (x,y,z) on the plane. The frame parameter indicates if the coordinates of this points that are used are expressed in the camera of object frame.
- n
The normal to the plane.
- frame
Indicates if the plane should be initialized from the point P coordinates expressed in the camera or object frame.
__init__(self: visp._visp.core.Plane, P: visp._visp.core.Point, Q: visp._visp.core.Point, R: visp._visp.core.Point, frame: visp._visp.core.Plane.PlaneFrame) -> None
Compute the equation of a plane given three point P, Q, R.
The normal to the plane is given by: n = PQ x PR
Note
See init(const vpPoint &, const vpPoint &, const vpPoint &)
- Parameters:
- P
Three points on the plane.
- Q
Three points on the plane.
- R
Three points on the plane.
- frame
Indicates if the plane should be initialized from the points coordinates expressed in the camera or object frame.
- abcd(self) visp._visp.core.ColVector ¶
Note
See getABCD()
- Returns:
Return the four dimension vector \([A,B,C,D]^T\) corresponding to the plane parameters.
- changeFrame(self, cMo: visp._visp.core.HomogeneousMatrix) None ¶
Considering the plane in the Ro frame computes the equation of the plane in the Rc frame.
- Parameters:
- cMo: visp._visp.core.HomogeneousMatrix¶
Homogeneous transformation from Rc to Ro frames.
- computeZ(self, x: float, y: float) float ¶
- Parameters:
- Returns:
Z coordinate in [m] of the corresponding 3D point.
- getABCD(self) visp._visp.core.ColVector ¶
- Returns:
Return the four dimension vector \([A,B,C,D]^T\) corresponding to the plane parameters.
- getIntersection(self, M1: visp._visp.core.ColVector, H: visp._visp.core.ColVector) float ¶
- getNormal(*args, **kwargs)¶
Overloaded function.
getNormal(self: visp._visp.core.Plane) -> visp._visp.core.ColVector
Return the normal to the plane.
A plane is given by the equation \(Ax + By + Cz + D = 0\) where (x,y,z) is a point of R^3 and (A,B,C) are the coordinates of the normal.
Note
See getNormal(vpColVector &n)
getNormal(self: visp._visp.core.Plane, n: visp._visp.core.ColVector) -> None
Return the normal to the plane.
A plane is given by the equation \(Ax + By + Cz + D = 0\) where (x,y,z) are the coordinates of a point and \([A,B,C]^T\) is normal vector of the plane.
Note
See getNormal()
- init(*args, **kwargs)¶
Overloaded function.
init(self: visp._visp.core.Plane, P: visp._visp.core.Point, Q: visp._visp.core.Point, R: visp._visp.core.Point, frame: visp._visp.core.Plane.PlaneFrame) -> None
Compute the equation of a plane given three point P, Q, R.
The normal to the plane is given by: n = PQ x PR
- Parameters:
- P
Three points on the plane.
- Q
Three points on the plane.
- R
Three points on the plane.
- frame
Indicates if the plane should be initialized from the points coordinates expressed in the camera or object frame.
init(self: visp._visp.core.Plane, P: visp._visp.core.ColVector, n: visp._visp.core.ColVector) -> None
Initialize the plane from a point P on the plane and the normal n to the plane.
Note
See vpPlane(const vpPoint&, const vpColVector &)
- Parameters:
- P
A point with coordinates (x,y,z) on the plane. The size of the vector should be 3, with P[0]=x, with P[1]=y, with P[2]=z.
- n
The normal to the plane.
init(self: visp._visp.core.Plane, P: visp._visp.core.Plane) -> None
Initialize the plane with the parameters of an other plane P .
- Parameters:
- P
Plane used as initializer.
- projectionPointOnPlan(self, P: visp._visp.core.Point, Pproj: visp._visp.core.Point) None ¶
Compute the coordinates of the projection of a point on the plane.
- Parameters:
- P: visp._visp.core.Point¶
point to be projected on the plane
- Pproj: visp._visp.core.Point¶
result of the projection (pproj belongs to the plane)
- rayIntersection(self, M0: visp._visp.core.Point, M1: visp._visp.core.Point, H: visp._visp.core.ColVector) float ¶