FeatureMomentCentered¶
- class FeatureMomentCentered¶
Bases:
FeatureMoment
Functionality computation for centered moment feature. Computes the interaction matrix associated with vpMomentCentered .
The interaction matrix for the feature is defined in [42] , equation (17). This vpFeatureMoment , as well as it’s corresponding moment primitive is double-indexed. The interaction matrix \(L_{\mu_{ij}}\) is obtained by calling vpFeatureMomentBasic::interaction (i,j) and is associated to \(\mu_{ij}\) obtained by vpFeatureMomentCentered::get (i,j).
vpFeatureMomentCentered computes interaction matrices all interaction matrices up to vpMomentObject::getOrder() -1.
Warning
The maximum order reached by vpFeatureMomentBasic is NOT the maximum order of the vpMomentObject , it is one unit smaller. For example if you define your vpMomentObject up to order n then vpFeatureMomentBasic will be able to compute interaction matrices up to order n-1 that is \(L_{m_{ij}}\) with \(i+j<=n-1\) .
This feature depends on:
vpFeatureMomentBasic
vpFeatureMomentGravityCenter
vpMomentGravityCenter
Methods
Overloaded function.
Overloaded function.
Associated moment name
Feature name
Inherited Methods
Return the dimension of the feature vector \(\bf s\) .
Links the feature to the feature's database.
vpServo
Indicates who should deallocate the feature.
Overloaded function.
Interface function to display the moments and other interaction matrices on which a particular vpFeatureMoment is dependent upon Not made pure to maintain compatibility Recommended : Types inheriting from vpFeatureMoment should implement this function.
Updates the interaction matrices with the image plane the camera is facing.
Overloaded function.
dim_s
Initialize common parameters for moment features.
deallocate
Indicates who should deallocate the feature.
s
user
nbParameters
FEATURE_ALL
Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.
Get the feature vector \(\bf s\) .
Select all the features.
Compute the error between two visual features from a subset of the possible features.
Outputs the content of the feature: it's corresponding selected moments.
Operators
__doc__
__module__
__repr__
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
- __init__(*args, **kwargs)¶
- compute_interaction(*args, **kwargs)¶
Overloaded function.
compute_interaction(self: visp._visp.visual_features.FeatureMomentCentered) -> None
Interface to the interaction matrix computation for centered moments. Called internally. Calls compute_Lmu_pq() for main computation moments (upto order-1)
Dependencies to moment classes:
vpMomentBasic
Dependencies to interaction matrix classes:
vpMomentGravityCenter
vpFeatureMomentBasic
vpFeatureMomentGravityCenter
compute_interaction(self: visp._visp.visual_features.FeatureMoment) -> None
- display(*args, **kwargs)¶
Overloaded function.
display(self: visp._visp.visual_features.FeatureMoment, cam: visp._visp.core.CameraParameters, I: visp._visp.core.ImageGray, color: visp._visp.core.Color = vpColor::green, thickness: int = 1) -> None
Not implemented since visual representation of a moment doesn’t often make sense.
display(self: visp._visp.visual_features.FeatureMoment, cam: visp._visp.core.CameraParameters, I: visp._visp.core.ImageRGBa, color: visp._visp.core.Color = vpColor::green, thickness: int = 1) -> None
Not implemented since visual representation of a moment doesn’t often make sense.
- error(self, 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._visp.visual_features.BasicFeature.BasicFeatureDeallocatorType ¶
- getDimension(*args, **kwargs)¶
Overloaded function.
getDimension(self: visp._visp.visual_features.FeatureMoment, select: int = FEATURE_ALL) -> int
Feature’s dimension according to selection.
getDimension(self: visp._visp.visual_features.BasicFeature, select: int = FEATURE_ALL) -> int
Get the feature vector dimension.
- get_s(self, select: int = FEATURE_ALL) visp._visp.core.ColVector ¶
Get the feature vector \(\bf s\) .
- interaction(*args, **kwargs)¶
Overloaded function.
interaction(self: visp._visp.visual_features.FeatureMomentCentered, select_one: int, select_two: int) -> visp._visp.core.Matrix
- Parameters:
- select_one
first index (i).
- select_two
second index (j).
- Returns:
Interaction matrix corresponding to the moment.
interaction(self: visp._visp.visual_features.FeatureMoment, select: int = FEATURE_ALL) -> visp._visp.core.Matrix
Retrieves the interaction matrix. No computation is done.
There is no rule about the format of the feature selector. It may be different for different features. For example, for vpFeatureMomentBasic or vpFeatureMomentCentered features, select may refer to the \((i,j)\) couple in the \(j \times order + i\) format, but for vpFeatureMomentCInvariant the selector allows to select couples \((i,j,k,l...)\) in the following format: 1 << i
1 << j + 1 << k + 1 << l.
- Parameters:
- select
Feature selector.
- Returns:
The corresponding interaction matrix.
- linkTo(self, featureMoments: visp._visp.visual_features.FeatureMomentDatabase) None ¶
Links the feature to the feature’s database.
Note
The feature’s database is different from the moment’s database.
- Parameters:
- featureMoments: visp._visp.visual_features.FeatureMomentDatabase¶
database in which the moment features are stored.
- print(self, select: int = FEATURE_ALL) None ¶
Outputs the content of the feature: it’s corresponding selected moments.
- printDependencies(self: visp._visp.visual_features.FeatureMoment, os: std::ostream) None ¶
Interface function to display the moments and other interaction matrices on which a particular vpFeatureMoment is dependent upon Not made pure to maintain compatibility Recommended : Types inheriting from vpFeatureMoment should implement this function.
- setDeallocate(self, d: visp._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.
- update(self, A: float, B: float, C: float) None ¶
Updates the interaction matrices with the image plane the camera is facing. The plane must be in the format: \(\frac{1}{Z}=Ax+By+C\) . The moment primitives MUST be updated before calling this function.
This method also computes the interaction matrix. Therefore, you must call vpFeatureMoment::update before calling vpFeatureMoment::interaction .
Warning
The behaviour of this method is not the same as vpMoment::update which only acknowledges the new object. This method also computes the interaction matrices.