3
$\begingroup$

There are other shape properties scale-rotation invariant except HuMoment? There are example that show me how can i implement them? I find this example in c++ https://stackoverflow.com/questions/8675878/opencvc-calculating-moments-from-contour but i prefer working in python

Which is the difference between WeightedNormalizedMoments, WeightedHuMoments and HuMoments? (http://scikit-image.org/docs/0.6/api/skimage.measure.html)

$\endgroup$

1 Answer 1

1
$\begingroup$

The Wikipedia page on image moments is worth reading. It clarifies what moments mean in image processing, and show the difference between moments, central moments, normalized central moments, and Hu moments.

  • Central moments are the moments computed by setting the origin of the coordinate system to the centroid. The centroid is the first order moments. The centroid and the central moments can be computed at the same time, with one pass through the image. These moments are translation-invariant because the centroid moves with the object if the object moves.
  • Normalized central moments are the central moments normalized by the zeroth order moment, which encodes size. These moments are both translation and scaling invariant.
  • The Hu moments are seven different combinations of second and third order normalized central moments. The combinations are defined such that they are rotation-invariant. Because they’re based on normalized central moments, they are of course also scaling and translation invariant.

Another well-known set of invariant features are the Podczeck shape features. They are unitless ratios of rotation and translation invariant measurements of size. By making these size ratios unitless, they are guaranteed to be scale-invariant.

Other object properties that are similarly ratios of size measurements include roundness, circularity, ellipse variance, eccentricity, and other such ratios you can invent — you could for example take the ratio of the largest to the smallest Feret diameters as a measure of elongation. The DIPlib documentation has a description of these features — and you can use DIPlib to easily compute them too. [Disclaimer: I’m an author of DIPlib.]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.