MbtDistanceCircle¶
- class MbtDistanceCircle(self)¶
Bases:
pybind11_object
Manage a circle used in the model-based tracker.
Basic constructor
Methods
Basic constructor
Build a vpMbtDistanceCircle thanks to its center, 3 points (including the center) with coordinates expressed in the object frame and defining the plane that contain the circle and its radius.
Compute the interaction matrix and the error vector corresponding to the point to ellipse algebraic distance.
Overloaded function.
Overloaded function.
Get the camera parameters.
Return a list of features parameters for display.
Get the index of the circle.
Get the mean weight of the circle.
Return a list of ellipse parameters to display the primitive at a given pose and camera parameters.
Get the name of the circle.
Initialize the size of the interaction matrix and the error vector.
Return if the circle is used for tracking.
Check if the circle is visible in the image or not.
Set the camera parameters.
Set the index of the circle.
Set the mean weight of the circle.
Overloaded function.
Set if the circle has to considered during tracking phase.
Set a boolean parameter to indicates if the circle is visible in the image or not.
Track the moving edges in the image.
Update the moving edges internal parameters.
Inherited Methods
Operators
__doc__
Basic constructor
__module__
Attributes
L
Reinit
__annotations__
error
index_polygon
isvisible
nbFeature
radius
- __init__(self)¶
Basic constructor
- buildFrom(self, _p1: visp._visp.core.Point, _p2: visp._visp.core.Point, _p3: visp._visp.core.Point, r: float) None ¶
Build a vpMbtDistanceCircle thanks to its center, 3 points (including the center) with coordinates expressed in the object frame and defining the plane that contain the circle and its radius.
- Parameters:
- _p1: visp._visp.core.Point¶
Center of the circle.
- _p2: visp._visp.core.Point¶
Two points on the plane containing the circle. With the center of the circle we have 3 points defining the plane that contains the circle.
- _p3: visp._visp.core.Point¶
Two points on the plane containing the circle. With the center of the circle we have 3 points defining the plane that contains the circle.
- r: float¶
Radius of the circle.
- computeInteractionMatrixError(self, cMo: visp._visp.core.HomogeneousMatrix) None ¶
Compute the interaction matrix and the error vector corresponding to the point to ellipse algebraic distance.
- display(*args, **kwargs)¶
Overloaded function.
display(self: visp._visp.mbt.MbtDistanceCircle, I: visp._visp.core.ImageGray, cMo: visp._visp.core.HomogeneousMatrix, cam: visp._visp.core.CameraParameters, col: visp._visp.core.Color, thickness: int = 1, displayFullModel: bool = false) -> None
Display the circle. The 3D circle is projected into the image as an ellipse.
- Parameters:
- I
The image.
- cMo
Pose used to project the 3D model into the image.
- col
The desired color.
- thickness
The thickness of the lines.
- displayFullModel
When true, display the circle even if non visible. If false, display the circle only if visible.
display(self: visp._visp.mbt.MbtDistanceCircle, I: visp._visp.core.ImageRGBa, cMo: visp._visp.core.HomogeneousMatrix, cam: visp._visp.core.CameraParameters, col: visp._visp.core.Color, thickness: int = 1, displayFullModel: bool = false) -> None
Display the cylinder. The 3D cylinder is projected into the image.
- Parameters:
- I
The image.
- cMo
Pose used to project the 3D model into the image.
- col
The desired color.
- thickness
The thickness of the lines.
- displayFullModel
When true, display the circle even if non visible. If false, display the circle only if visible.
- displayMovingEdges(*args, **kwargs)¶
Overloaded function.
displayMovingEdges(self: visp._visp.mbt.MbtDistanceCircle, I: visp._visp.core.ImageGray) -> None
Enable to display the points along the ellipse with a color corresponding to their state.
If green : The vpMeSite is a good point.
If blue : The point is removed because of the vpMeSite tracking phase (contrast problem).
If purple : The point is removed because of the vpMeSite tracking phase (threshold problem).
If blue : The point is removed because of the robust method in the virtual visual servoing.
- Parameters:
- I
The image.
displayMovingEdges(self: visp._visp.mbt.MbtDistanceCircle, I: visp._visp.core.ImageRGBa) -> None
- getCameraParameters(self, camera: visp._visp.core.CameraParameters) None ¶
Get the camera parameters.
- Parameters:
- camera: visp._visp.core.CameraParameters¶
The vpCameraParameters used to store the camera parameters.
- getFeaturesForDisplay(self) list[list[float]] ¶
Return a list of features parameters for display.
Parameters are: <feature id (here 0 for ME)> , <pt.i()> , <pt.j()> , <state>
- getMeanWeight(self) float ¶
Get the mean weight of the circle. The mean weight is computed thanks to the weight of each moving edge. Those weights are computed by the robust estimation method used during the virtual visual servoing.
- Returns:
The mean weight of the circle.
- getModelForDisplay(self, cMo: visp._visp.core.HomogeneousMatrix, cam: visp._visp.core.CameraParameters, displayFullModel: bool = false) list[float] ¶
Return a list of ellipse parameters to display the primitive at a given pose and camera parameters.
Parameters are: <primitive id (here 1 for ellipse)> , <pt_center.i()> , <pt_center.j()> , <n20> , <n11> , <n02> which are respectively the ellipse centroid coordinates and second order centered moments of the ellipse normalized by its area (i.e., such that \(n_{ij} = \mu_{ij}/a\) where \(\mu_{ij}\) are the centered moments and a the area).
- Parameters:
- cMo: visp._visp.core.HomogeneousMatrix¶
Pose used to project the 3D model into the image.
- displayFullModel: bool = false¶
If true, the line is displayed even if it is not
- initInteractionMatrixError(self) None ¶
Initialize the size of the interaction matrix and the error vector.
- isTracked(self) bool ¶
Return if the circle is used for tracking.
- Returns:
True if it is used, False otherwise.
- isVisible(self) bool ¶
Check if the circle is visible in the image or not.
- Returns:
Return true if the circle is visible
- setCameraParameters(self, camera: visp._visp.core.CameraParameters) None ¶
Set the camera parameters.
- Parameters:
- camera: visp._visp.core.CameraParameters¶
The camera parameters.
- setName(*args, **kwargs)¶
Overloaded function.
setName(self: visp._visp.mbt.MbtDistanceCircle, circle_name: str) -> None
Set the name of the circle.
- Parameters:
- circle_name
The name of the circle.
setName(self: visp._visp.mbt.MbtDistanceCircle, circle_name: str) -> None
Set the name of the circle.
- Parameters:
- circle_name
The name of the circle.
- setVisible(self, _isvisible: bool) None ¶
Set a boolean parameter to indicates if the circle is visible in the image or not.
- trackMovingEdge(self, I: visp._visp.core.ImageGray, cMo: visp._visp.core.HomogeneousMatrix) None ¶
Track the moving edges in the image.
- Parameters:
- I: visp._visp.core.ImageGray¶
the image.
- cMo: visp._visp.core.HomogeneousMatrix¶
The pose of the camera.
- updateMovingEdge(self, I: visp._visp.core.ImageGray, cMo: visp._visp.core.HomogeneousMatrix) None ¶
Update the moving edges internal parameters.
Warning
: Not implemented.
- Parameters:
- I: visp._visp.core.ImageGray¶
the image.
- cMo: visp._visp.core.HomogeneousMatrix¶
The pose of the camera.