Bad result on shape recognition using invariant moments

90 views Asked by At

My project is shape recognition of leaf. I use Invariant Moments to feature extraction and City Block Distance to compute the distance between test image and image in database. Bust the result i get is very bad. I can say the recognition is only get less then 50% of match. for example:

This is test image

enter image description here

But that match with this image:

enter image description here

I convert that image into binary image using otsu threshold, so the image looking good on shape. My question, is this the normal? or Do I have an error in my coding? This is my coding using City Block Distance:

CityBlock[j] = Math.abs(bMom1 - DB.GetBentukMoment1(j)) + Math.abs(bMom2 - DB.GetBentukMoment2(j)) +
                                Math.abs(bMom3 - DB.GetBentukMoment3(j)) + Math.abs(bMom4 - DB.GetBentukMoment4(j)) +
                                Math.abs(bMom5 - DB.GetBentukMoment5(j)) + Math.abs(bMom6 - DB.GetBentukMoment6(j)) +
                                Math.abs(bMom7 - DB.GetBentukMoment7(j));

If i uses the same image on that coding, the result didn't give 0 value. Why? is it because double data type?

1

There are 1 answers

0
gussurya_w On

Finally i know the problem on my application, the double value that i save to database with double data type has change, so i use Text data type to store the double value, then i parse that to double, and then i get the zero value for same image. But i think invariant moments is not good for matching on binary image, its better used on canny image. That because for some matching on binary image i still get the problem like my question.