CentralCamera.H#
- CentralCamera.H(T: SE3, n: float | int | list[float | int] | tuple[float | int, ...] | ndarray, d: float) ndarray[source]#
Compute homography from plane and camera pose
- Parameters:
T (
SE3) – relative camera motionn (array_like(3)) – plane normal with respect to world frame
d (float) – plane offset from world frame origin
- Returns:
homography matrix
- Return type:
ndarray(3,3)
Computes the homography matrix for the camera observing points on a plane from two viewpoints. The first view is from the current camera pose (
self.pose), and the second is after a relative motion represented by the rigid-body motionT. The plane has normalnand at distancedwith respect to the world frame.Example:
>>> from machinevisiontoolbox import CentralCamera >>> from spatialmath import SE3 >>> camera = CentralCamera.Default(name='camera1') # looking along z-axis >>> plane = [0, 1, 1] >>> H = camera.H(SE3.Tx(0.2), plane, 5) >>> H array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
- Seealso: