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.

  1. __init__(self: visp._visp.core.Plane) -> None

Basic constructor that set the plane parameters A, B, C, D to zero.

  1. __init__(self: visp._visp.core.Plane, P: visp._visp.core.Plane) -> None

Copy constructor.

  1. __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.

  1. __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.

  1. __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

__init__

Overloaded function.

abcd

Note

See getABCD()

changeFrame

Considering the plane in the Ro frame computes the equation of the plane in the Rc frame.

computeZ

param x:

Coordinates of a point in the image plane. These coordinates are the one obtained by perspective projection of a 3D point.

getA

return:

The value of the plane parameter A.

getABCD

return:

Return the four dimension vector \([A,B,C,D]^T\) corresponding to the plane parameters.

getB

return:

The value of the plane parameter B.

getC

return:

The value of the plane parameter C.

getD

return:

The value of the plane parameter D.

getIntersection

getNormal

Overloaded function.

init

Overloaded function.

projectionPointOnPlan

Compute the coordinates of the projection of a point on the plane.

rayIntersection

setA

Set plane parameter A.

setABCD

Set plane parameters A, B, C, D.

setB

Set plane parameter B.

setC

Set plane parameter C.

setD

Set plane parameter D.

Inherited Methods

Operators

__doc__

__init__

Overloaded function.

__module__

__repr__

Attributes

__annotations__

camera_frame

object_frame

class PlaneFrame(self, value: int)

Bases: pybind11_object

Values:

  • object_frame

  • camera_frame

__and__(self, other: object) object
__eq__(self, other: object) bool
__ge__(self, other: object) bool
__getstate__(self) int
__gt__(self, other: object) bool
__hash__(self) int
__index__(self) int
__init__(self, value: int)
__int__(self) int
__invert__(self) object
__le__(self, other: object) bool
__lt__(self, other: object) bool
__ne__(self, other: object) bool
__or__(self, other: object) object
__rand__(self, other: object) object
__ror__(self, other: object) object
__rxor__(self, other: object) object
__setstate__(self, state: int) None
__xor__(self, other: object) object
property name : str
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: visp._visp.core.Plane) -> None

Basic constructor that set the plane parameters A, B, C, D to zero.

  1. __init__(self: visp._visp.core.Plane, P: visp._visp.core.Plane) -> None

Copy constructor.

  1. __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.

  1. __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.

  1. __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:
x: float

Coordinates of a point in the image plane. These coordinates are the one obtained by perspective projection of a 3D point.

y: float

Coordinates of a point in the image plane. These coordinates are the one obtained by perspective projection of a 3D point.

Returns:

Z coordinate in [m] of the corresponding 3D point.

getA(self) float
Returns:

The value of the plane parameter A.

getABCD(self) visp._visp.core.ColVector
Returns:

Return the four dimension vector \([A,B,C,D]^T\) corresponding to the plane parameters.

getB(self) float
Returns:

The value of the plane parameter B.

getC(self) float
Returns:

The value of the plane parameter C.

getD(self) float
Returns:

The value of the plane parameter D.

getIntersection(self, M1: visp._visp.core.ColVector, H: visp._visp.core.ColVector) float
getNormal(*args, **kwargs)

Overloaded function.

  1. 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)

  1. 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.

  1. 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.

  1. 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.

  1. 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
setA(self, a: float) None

Set plane parameter A.

setABCD(self, a: float, b: float, c: float, d: float) None

Set plane parameters A, B, C, D.

setB(self, b: float) None

Set plane parameter B.

setC(self, c: float) None

Set plane parameter C.

setD(self, d: float) None

Set plane parameter D.