Ask Your Question

Revision history [back]

Solved it myself! It turns out that the contours for two of the shapes were doubling back on themselves, effectively making a long, thin perimeter instead of a large squarish blob. The solution was to apply a bilateral filter to the grayscale image before thresholding, edge detection and contour extraction. This gives similar Hu moments for all the images.