TemplateTrackerWarpHomographySL3

class TemplateTrackerWarpHomographySL3(self)

Bases: TemplateTrackerWarp

Construct an homography SL3 model with 8 parameters initialized to zero.

Methods

__init__

Construct an homography SL3 model with 8 parameters initialized to zero.

computeCoeff

Compute the exponential of the homography matrix defined by the given parameters.

computeDenom

Compute the projection denominator (Z) used in x = X/Z and y = Y/Z.

dWarp

Compute the derivative matrix of the warping function at point \(X=(u,v)\) according to the model parameters:

getHomography

return:

Corresponding homography.

getParamInverse

Compute inverse of the warping transformation.

getParamPyramidDown

Get the parameters of the warping function one level down where image size is divided by two along the lines and the columns.

getParamPyramidUp

Get the parameters of the warping function one level up where image size is multiplied by two along the lines and the columns.

isESMcompatible

return:

true. Homography SL3 model is compatible with ESM.

pRondp

Compute the transformation resulting from the composition of two other transformations.

warpX

Overloaded function.

Inherited Methods

warpTriangle

Warp a triangle and store the result in a new zone.

setNbParam

Set the number of parameters of the warping function.

getDistanceBetweenZoneAndWarpedZone

Compute the distance between a zone and its associated warped zone.

getNbParam

Get the number of parameters of the warping function.

warpZone

Warp a zone and store the result in a new zone.

Operators

__doc__

__init__

Construct an homography SL3 model with 8 parameters initialized to zero.

__module__

Attributes

__annotations__

__init__(self)

Construct an homography SL3 model with 8 parameters initialized to zero.

computeCoeff(self, p: visp._visp.core.ColVector) None

Compute the exponential of the homography matrix defined by the given parameters.

Parameters:
p: visp._visp.core.ColVector

Parameters of the SL3 homography warping function.

computeDenom(self, X: visp._visp.core.ColVector, arg1: visp._visp.core.ColVector) None

Compute the projection denominator (Z) used in x = X/Z and y = Y/Z.

Note

See warpX(const vpColVector &, vpColVector &, const vpColVector &)

Note

See warpX(const int &, const int &, double &, double &, const vpColVector &)

Note

See dWarp() , dWarpCompo()

Parameters:
X: visp._visp.core.ColVector

Point with coordinates (u, v) to consider.

dWarp(self, X1: visp._visp.core.ColVector, X2: visp._visp.core.ColVector, arg2: visp._visp.core.ColVector, dW: visp._visp.core.Matrix) None

Compute the derivative matrix of the warping function at point \(X=(u,v)\) according to the model parameters:

\[\frac{\partial M}{\partial p}(X, p) \]

Note

See computeDenom()

Parameters:
X1: visp._visp.core.ColVector

2-dim vector corresponding to the coordinates \((u_1, v_1)\) of the point to consider in the derivative computation.

X2: visp._visp.core.ColVector

2-dim vector corresponding to the coordinates \((u_2, v_2)\) of the point to consider in the derivative computation.

getDistanceBetweenZoneAndWarpedZone(self, Z: visp._visp.tt.TemplateTrackerZone, p: visp._visp.core.ColVector) float

Compute the distance between a zone and its associated warped zone.

Parameters:
Z: visp._visp.tt.TemplateTrackerZone

Zone to consider.

p: visp._visp.core.ColVector

Parameters of the warping function.

getHomography(self) visp._visp.vision.Homography
Returns:

Corresponding homography.

getNbParam(self) int

Get the number of parameters of the warping function.

Returns:

Number of parameters.

getParamInverse(self, p: visp._visp.core.ColVector, p_inv: visp._visp.core.ColVector) None

Compute inverse of the warping transformation.

Parameters:
p: visp._visp.core.ColVector

8-dim vector that contains the parameters corresponding to the transformation to inverse.

p_inv: visp._visp.core.ColVector

8-dim vector that contains the parameters of the inverse transformation \({M(p)}^{-1}\) .

getParamPyramidDown(self, p: visp._visp.core.ColVector, p_down: visp._visp.core.ColVector) None

Get the parameters of the warping function one level down where image size is divided by two along the lines and the columns.

Parameters:
p: visp._visp.core.ColVector

8-dim vector that contains the current parameters of the warping function.

p_down: visp._visp.core.ColVector

8-dim vector that contains the resulting parameters one level down.

getParamPyramidUp(self, p: visp._visp.core.ColVector, p_up: visp._visp.core.ColVector) None

Get the parameters of the warping function one level up where image size is multiplied by two along the lines and the columns.

Parameters:
p: visp._visp.core.ColVector

8-dim vector that contains the current parameters of the warping function.

p_up: visp._visp.core.ColVector

8-dim vector that contains the resulting parameters one level up.

isESMcompatible(self) bool
Returns:

true. Homography SL3 model is compatible with ESM.

pRondp(self, p1: visp._visp.core.ColVector, p2: visp._visp.core.ColVector, p12: visp._visp.core.ColVector) None

Compute the transformation resulting from the composition of two other transformations.

Parameters:
p1: visp._visp.core.ColVector

8-dim vector that contains the parameters corresponding to first transformation.

p2: visp._visp.core.ColVector

8-dim vector that contains the parameters corresponding to second transformation.

p12: visp._visp.core.ColVector

8-dim vector that contains the resulting transformation \(p_{12} = p_1 \circ p_2\) .

setNbParam(self, nb: int) None

Set the number of parameters of the warping function.

Parameters:
nb: int

New number of parameters.

warpTriangle(self: visp._visp.tt.TemplateTrackerWarp, in: visp._visp.tt.TemplateTrackerTriangle, p: visp._visp.core.ColVector, out: visp._visp.tt.TemplateTrackerTriangle) None

Warp a triangle and store the result in a new zone.

Parameters:
in

Triangle to warp.

p

Parameters of the warping function. These parameters are estimated by the template tracker and returned using vpTemplateTracker::getp() .

out

Resulting triangle.

warpX(*args, **kwargs)

Overloaded function.

  1. warpX(self: visp._visp.tt.TemplateTrackerWarpHomographySL3, X1: visp._visp.core.ColVector, X2: visp._visp.core.ColVector, arg2: visp._visp.core.ColVector) -> None

Warp point \(X_1=(u_1,v_1)\) using the transformation model.

\[X_2 = {^2}M_1(p) * X_1\]

Note

See computeDenom()

Parameters:
X1

2-dim vector corresponding to the coordinates \((u_1, v_1)\) of the point to warp.

X2

2-dim vector corresponding to the coordinates \((u_2, v_2)\) of the warped point.

  1. warpX(self: visp._visp.tt.TemplateTrackerWarpHomographySL3, v1: int, u1: int, v2: float, u2: float, arg4: visp._visp.core.ColVector) -> tuple[float, float]

Warp point \(X_1=(u_1,v_1)\) using the transformation model with parameters \(p\) .

\[X_2 = {^2}M_1(p) * X_1\]

Note

See computeDenom()

Parameters:
v1

Coordinate (along the image rows axis) of the point \(X_1=(u_1,v_1)\) to warp.

u1

Coordinate (along the image columns axis) of the point \(X_1=(u_1,v_1)\) to warp.

v2

Coordinate of the warped point \(X_2=(u_2,v_2)\) along the image rows axis.

u2

Coordinate of the warped point \(X_2=(u_2,v_2)\) along the image column axis.

Returns:

A tuple containing:

  • v2: Coordinate of the warped point \(X_2=(u_2,v_2)\) along the image rows axis.

  • u2: Coordinate of the warped point \(X_2=(u_2,v_2)\) along the image column axis.

warpZone(self: visp._visp.tt.TemplateTrackerWarp, in: visp._visp.tt.TemplateTrackerZone, p: visp._visp.core.ColVector, out: visp._visp.tt.TemplateTrackerZone) None

Warp a zone and store the result in a new zone.

Parameters:
in

Zone to warp.

p

Parameters of the warping function. These parameters are estimated by the template tracker and returned using vpTemplateTracker::getp() .

out

Resulting zone.