Reputation: 300
Image moments can be used as descriptors for image. I have two questions.Can we use them for both gray scale and binary images. Can we use it for image with hole?
Upvotes: 0
Views: 105
Reputation: 16811
To quote the Wikipedia article :
Adapting this to scalar (greyscale) image with pixel intensities I(x,y), raw image moments Mij are calculated by
Where I(x,y)
is the (greyscale) value of the pixel. So the answer to your first question is yes, you can use image moments quite easily on greyscale images, but if you want to treat different objects separately you have to have some way of distinguishing them.
For your second question, I'm not exactly sure what you're asking. The moment can certainly be calculated for an object that has a hole in it, but specific cases would have to be considered to figure out what the differences in those moments would be.
Upvotes: 1