FeatureVanishingPoint¶
- class FeatureVanishingPoint(self)¶
Bases:
BasicFeature
Class that defines 2D vanishing point visual features. Various features can be considered:
Either the cartesian coordinates \((x, y)\) of the vanishing point obtained from the intersection of two lines; in that case \({\bf s} = (x, y)\) and the corresponding interaction matrices are:
\[L_x = \left[ \begin{array}{cccccc} 0 & 0 & 0 & x y & -(1 + x^2) & y \end{array} \right] \]\[L_y = \left[ \begin{array}{cccccc} 0 & 0 & 0 & 1 + y * y & -xy & -x \end{array} \right] \]Rather features function of the polar coordinates of the vanishing point obtained themselves from the polar coordinates of the two lines \((\rho_1, \theta_1)\) and \((\rho_2, \theta_2)\) ; in that case \({\bf s} = (\arctan(1/\rho), 1/\rho, \alpha)\) with:
\[1/\rho = \frac{\sin(\theta_1 - \theta_2)}{\sqrt{\rho_1^2 + \rho_2^2 - 2 \rho_1 \rho_2 cos(\theta_1 - \theta_2)}} \]\[\alpha = \frac{\rho_1 \cos \theta_2 - \rho_2 cos \theta_1}{\sqrt{\rho_1^2 + \rho_2^2 - 2 \rho_1 \rho_2 cos(\theta_1 - \theta_2)}} \]
The corresponding interaction matrices are:
\[L_{\arctan(\frac{1}{\rho})} = \left[ \begin{array}{cccccc} 0 & 0 & 0 & - \sin \alpha & \cos \alpha & 0 \end{array} \right] \]\[L_{\frac{1}{\rho}} = \left[ \begin{array}{cccccc} 0 & 0 & 0 & -(1 + \frac{1}{\rho^2}) \sin \alpha & (1 + \frac{1}{\rho^2}) \cos \alpha & 0 \end{array} \right] \]\[L_{\alpha} = \left[ \begin{array}{cccccc} 0 & 0 & 0 & \frac{\cos \alpha}{\rho} & \frac{\sin \alpha}{\rho} & -1 \end{array} \right] \]Default constructor that calls init() .
Methods
Default constructor that calls init() .
Set vanishing point visual feature \({\bf s} = (x, y)\) from cartesian coordinates.
Overloaded function.
Overloaded function.
Get vanishing point feature \(\alpha\) value.
Get vanishing point feature \(\arctan(1/\rho)\) value.
Get vanishing point feature \(1/\rho\) value.
Get vanishing point feature \(x\) value.
Get vanishing point feature \(y\) value.
Vanishing point visual feature initialization.
Compute the interaction matrix from a subset of the possible features.
Print vanishing point features values to stdout.
Select \(s = \theta\) visual feature.
Select visual feature \(s = \arctan(1/\rho)\) .
Select visual feature \(s = 1/\rho\) .
Select visual feature \(s = x\) .
Select visual feature \(s = y\) .
Set vanishing point feature \(\alpha\) value.
Set vanishing point feature \(\arctan(1/\rho)\) value.
Set vanishing point feature \(1/\rho\) value.
Set vanishing point feature \(x\) value.
Set vanishing point visual feature \({\bf s} = (x, y)\) from cartesian coordinates.
Set vanishing point feature \(y\) value.
Inherited Methods
Select all the features.
Indicates who should deallocate the feature.
dim_s
user
Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.
s
FEATURE_ALL
nbParameters
Get the feature vector \(\bf s\) .
Indicates who should deallocate the feature.
deallocate
vpServo
Return the dimension of the feature vector \(\bf s\) .
Get the feature vector dimension.
Operators
__doc__
Default constructor that calls init() .
__module__
Attributes
FEATURE_ALL
__annotations__
deallocate
dim_s
nbParameters
s
user
vpServo
- class BasicFeatureDeallocatorType(self, value: int)¶
Bases:
pybind11_object
Indicates who should deallocate the feature.
Values:
user
vpServo
- class BasicFeatureSelect(self, value: int)¶
Bases:
pybind11_object
Indicates who should deallocate the feature.
Values:
user
vpServo
- buildFrom(self, x: float, y: float) visp.visual_features.FeatureVanishingPoint ¶
Set vanishing point visual feature \({\bf s} = (x, y)\) from cartesian coordinates. Same as set_xy() .
- display(*args, **kwargs)¶
Overloaded function.
display(self: visp._visp.visual_features.FeatureVanishingPoint, cam: visp._visp.core.CameraParameters, I: visp._visp.core.ImageGray, color: visp._visp.core.Color = vpColor::green, thickness: int = 1) -> None
Display vanishing point feature.
- Parameters:
- cam
Camera parameters.
- I
Image.
- color
Color to use for the display.
- thickness
Thickness of the feature representation.
display(self: visp._visp.visual_features.FeatureVanishingPoint, cam: visp._visp.core.CameraParameters, I: visp._visp.core.ImageRGBa, color: visp._visp.core.Color = vpColor::green, thickness: int = 1) -> None
Display vanishing point feature.
- Parameters:
- cam
Camera parameters.
- I
color Image.
- color
Color to use for the display.
- thickness
Thickness of the feature representation.
- error(*args, **kwargs)¶
Overloaded function.
error(self: visp._visp.visual_features.FeatureVanishingPoint, s_star: visp._visp.visual_features.BasicFeature, select: int = (vpFeatureVanishingPoint::selectX()|vpFeatureVanishingPoint::selectY())) -> visp._visp.core.ColVector
Compute the error between two visual features from a subset of the possible features.
- Parameters:
- s_star
Desired visual feature \({\bf s}^*\) .
- select
Feature selector. Value is either selectX() to select x visual feature, selectY() for y visual feature, selectOneOverRho() for \(1/\rho\) , or selectAlpha() for \(\alpha\) visual feature. You can also use a combination like selectX() | selectY() to select x and y visual features.
error(self: visp._visp.visual_features.BasicFeature, s_star: visp._visp.visual_features.BasicFeature, select: int = FEATURE_ALL) -> visp._visp.core.ColVector
Compute the error between two visual features from a subset of the possible features.
- getDeallocate(self) visp.visual_features.BasicFeature.BasicFeatureDeallocatorType ¶
-
get_s(self, select: int =
FEATURE_ALL
) visp.core.ColVector ¶ Get the feature vector \(\bf s\) .
- interaction(self: visp._visp.visual_features.FeatureVanishingPoint, select: int = (vpFeatureVanishingPoint::selectX()|vpFeatureVanishingPoint::selectY())) visp.core.Matrix ¶
Compute the interaction matrix from a subset of the possible features.
- Parameters:
- select
Feature selector. Value is either selectX() to select x visual feature, selectY() for y visual feature, selectOneOverRho() for \(1/\rho\) , or selectAlpha() for \(\alpha\) visual feature. You can also use a combination like selectX() | selectY() to select x and y visual features.
- print(self: visp._visp.visual_features.FeatureVanishingPoint, select: int = (vpFeatureVanishingPoint::selectX()|vpFeatureVanishingPoint::selectY())) None ¶
Print vanishing point features values to stdout.
- Parameters:
- select
Use either selectX() to display x value, selectY() to display y value, select selectOneOverRho() to display \(1/\rho\) value, or selectAlpha() to display \(\alpha\) value. You can also use a combination like selectX() | selectY() to display x and y values.
- setAtanOneOverRho(self, atan_one_over_rho: float) None ¶
Set vanishing point feature \(\arctan(1/\rho)\) value.
- setDeallocate(self, d: visp.visual_features.BasicFeature.BasicFeatureDeallocatorType) None ¶
- setFlags(self) None ¶
Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.
- setOneOverRho(self, one_over_rho: float) None ¶
Set vanishing point feature \(1/\rho\) value.