Is there a function or a toolbox which allows for computation of Image Moment?
http://en.wikipedia.org/wiki/Image_moment
The type of data on which I want to apply this function is binary. It is basically a matrix filled with 0 and 1.
Data =
1 0 0 0 0 0
1 1 1 0 1 1
0 1 1 1 1 0
1 0 1 1 0 0
0 1 1 0 0 0
1 1 0 0 0 0
0 0 0 0 0 0
1 0 0 1 0 0
And I want to apply image moments on this type of data. Is there any optimal Matlab implementation for this type of data?
In a previous answer of mine, I had written an implementation for a subset of the
regionpropsfunction. The goal was to find image orientation, which was derived from the image moments. Here is the part relevant to you:The code follows the equations from the Wikipedia article, so no additional explanation is needed..