State object for calculating various image moments. More...
Public Member Functions | |
float | central_moment (self, int x_order, int y_order, int normalization) |
Gets one of the central image moments. | |
cvb.foundation.HuMoments | hu_moments (self) |
Gets the seven Hu moments of the image. | |
float | spatial_moment (self, int x_order, int y_order, int normalization, Optional[cvb.Point2D] offset) |
Gets one of the spatial image moments. | |
Properties | |
calculation_preference = property | |
int: The preference of speed versus accuracy chosen, when this object was created (see cvb.foundation.MomentsCalculation). | |
State object for calculating various image moments.
Calculate the moments on the input ImagePlane and area of interest.
image_plane : cvb.ImagePlane Plane on which to calculate the moments.
aoi : Optional[cvb.Rect] Area of interest to calculate the moments (default entire plane).
preference : int Speed or accuracy, MomentsCalculation.FavorNone by default.
float central_moment | ( | self, | |
int | x_order, | ||
int | y_order, | ||
int | normalization ) |
Gets one of the central image moments.
x_order : int X-order of the moment to retrieve (see cvb.foundation.MomentsOrder).
y_order : int Y-order of the moment to retrieve (see cvb.foundation.MomentsOrder).
normalization : int Whether or not to normalize (see cvb.foundation.MomentsNormalization).
float The central moment.
cvb.foundation.HuMoments hu_moments | ( | self | ) |
float spatial_moment | ( | self, | |
int | x_order, | ||
int | y_order, | ||
int | normalization, | ||
Optional[cvb.Point2D] | offset ) |
Gets one of the spatial image moments.
x_order : int X-order of the moment to retrieve (see cvb.foundation.MomentsOrder).
y_order : int Y-order of the moment to retrieve (see cvb.foundation.MomentsOrder).
normalization : int Whether or not to normalize (see cvb.foundation.MomentsNormalization).
offset : Optional[cvb.Point2D] Offset of the moments (optional, by default uses the offset used when creating this object).
float The spatial moment.
We use cookies to improve your experience. By using this documentation, you agree to our use of cookies.