190 likes | 313 Views
Shape Recognition by Invariant Moments. Image Processing Fundamentals Term Project 2004-2005 Autumn. Prepared by. Asım Güneş 040020606 Fuat Kılıç 040000103 Çağrı Ergül 040000115 Ercan Zer 040000074. What is Invariant Moments ?.
E N D
Shape Recognition by Invariant Moments Image Processing Fundamentals Term Project 2004-2005 Autumn
Prepared by • Asım Güneş 040020606 • Fuat Kılıç 040000103 • Çağrı Ergül 040000115 • Ercan Zer 040000074
What is Invariant Moments ? • For a 2-D continuous function f(x,y), the moment of order (p+q) is defined as
Rotating • For rotating we use the central moments:
Normalized Central Moments • These moments are stable for shifting and scaling.
Seven Invariant Moments of HU - 1 • In 1962 Hu was described seven moments for shifting, scaling and rotating.
Problem • Normally these invariant moments do not change. • But we are studying in digital medium so there are some quantization errors. • When we rotate or change the size of the image these errors occur. • These errors are maximum in (45+k∏/2) degrees and minimum in (k∏/2) degrees.
Finding Rotating Error Error =
Our aim is MINIMIZING THE ERRORS • Solution is Rotating the image for 5 degrees intervals between the 0-45 degrees and sampling the image. We save invariant moments of these samples. Then we compare these values of invariant moments with the invariant moments of other images, we get the samples which has minimum difference. By this way we recognize the image.
Reading Configuration File Bird;shape/bird.bmp; Dolphin;shape/dolphin.bmp; Flag;shape/flag.bmp; Anchor;shape/anchor.bmp; .... Importing sample images Sampling images in every 5 degrees shapes.conf Calculating invariant moments of every sample Invariant Moment Database Saving calculations to database dbInitialize
Reading image Calculating Invariant Moment of image Invariant Moment Database Comparing Invariant Moment from DB Result compareImage(filename)