NMT EE 552 - Simple Pattern Recognition via Image Moments

Unformatted text preview:

Simple Pattern Recognitionvia Image MomentsMatthew [email protected] [email protected] April, 2011Electrical Engineering DepartmentNew Mexico Institute of Mining and Technologyi1AbstractThis report discusses a mathematicalmethod that uses image moments to detectfeatures and patterns. The method con-sidered will be implemented on a generalpurpose graphics processing unit in orderto understand the limitations of this spacificprocess. We take this method one step fur-ther, using a pattern mask correlated with alarger image, to detect feature locations inan image.1 IntroductionDigital Image Processing uses many mathe-matical methods of analysing and filteringdigital images to produce desired effects.This report considers the method of imagemoments to detect patterns or features ina large image. In the body of the text mo-ments will be discussed in some detail. Sev-eral variants are considered and the variantthat provided the best results is discussedfurther. Finally results and a conclusion willbe at the end.There are many methods used in patternrecognition. Figure 1 shows one applicationof pattern recogntion in which ants are iden-tified, highlighted and tracked in an area. Inmany cases an image is split up into a treedescription of the image (shown in Fig.2).This can be done by analysing the colors as-sociated with certian parts of the photo andassociating those colors to things like water,grass, streets, and so on. This is useful if ageneral description of an image is all that isFigure 1: Antsneeded.Figure 2: tree descriptionThe banking industry uses pattern recog-nition when reading checks. This system in-corporates a specially designed numberingfont (MIRC font, shown in Fig.3) and a cam-era to read checks, money orders, etc [1].This recognition method breaks down thetwo dimensional image into a one dimen-sional description of the same image to re-duce complexity in the recognition method.The applications of feature or patternrecognition has improved some of the hightech imaging systems in use today. Featuredetection is used in image stabilization forunstable environments that introduce shak-ing. Object identification is still in its in-2Figure 3: MICR fontfancy but aids security and tracking sys-tems. A lot of the time, stabilization, inden-tification, and tracking are used all at once,news copters is just one example.Figure 4: OJ2 Project ScopeFor the course of this project we imple-mented and tested the method of simplefeature recognition via image moments ona general purpose graphics processing unit(GPGPU). This process starts usually startswith reducing the image complexity by con-verting an image to greyscale if necessary,then using a mask such as a Sobel Maskto detect edges to create a boundary edgemap of the pattern of interest. We chose tostart with binary images and goes straightto the image moment calculations to reducethe size of the project. It is assumed that pat-terns or features are not overlapping or tooclose together in order to reduce the com-plexity of the problem.3 Method of MomentsThis basis of this project was to calculate im-age moments from 2D binary images. Animage moment is a particular order of theimage pixel intensities weighted average.The moments can be invariant to scaling,translation, and rotation. One such set ofthese invariant moments are the Hu set[2],a commonly used set for applictations suchlike this one. We followed a procedure out-lined in a paper by Mercimek, Gulez andMumcu[3] that uses this set to detect 3D ob-jects. We were able to get very good resultsfrom the first 6 of the 7 moment invariantsin the Hu set that were invariant to trans-lation and rotation. Scale however did notseem to be working so we kept exploring.3We found a procedure by (insert name here)that used complex version of the momentsthat we were using [4]. Using this set, wewere able to detect our desired feature evenwith scaling. . A feature or simple patternmask can be correlated with a larger im-age to detect the locations of features. Mo-ments of an image are found via the follow-ing equation,Muv=M−1Xx=0N−1Xy=0xuyvf(x, y)Where M is a particular moment indi-cated by the subscripts u and v of a binaryimage f(x,y). The components of the cen-troid and it’s area can be found from fun-damental moments as follows.¯x =M10M00, ¯y =M01M00A =M−1Xx=0N−1Xy=0f(x, y)The complex central moment equationcomes from a book that was published in2009 by Flusser, Suk, and Zitova[5]. Com-pared to the other moment equations thatwere found for this project, the complex mo-ments showed the best results when the pat-tern was scaled in size. Rotation and trans-lation didn’t give us any problems.µuv=M−1Xx=0N−1Xy=0((x − ¯x) + i(y − ¯y))u((x − ¯x) − i(y − ¯y))vf(x, y)The scale invariant moments are foundfrom the complex central moments and thefeature area.s11=µ11A2, s20=µ20A2, s21=µ21A2.5,s12=µ12A2.5, s30=µ30A2.5Finally, we get 6 rotation invariant mo-ments from the scale invariant moments.r1= real(s11)r2= 1, 000 ∗ real(s21∗ s12)r3= 10, 000 ∗ real(s20∗ s212)r4= 10, 000 ∗ imag(s20∗ s212)r5= 100, 000 ∗ real(s30∗ s312)r6= 100, 000 ∗ imag(s30∗ s312)These three equations can be combinedand compared with a mask to detect thepresence of a feature from an image win-dow. This method of feature detection is in-variant to translation, scaling, and rotation.4 ResultsThe results that we obtained were much bet-ter than expected. The following figuresshow all of the results that we obtained ina single window. Figures 5-10 show the re-sults we got from single window results.The later figures then show the result thatwe obtained from parsing through a largerimage. Figure 5 shows the result we ob-tained from translating our original image(left) to the lower right of the corner (right).4We were able to show by comparing the mo-ment statistics of the two images a match ofover 99%.Figure 5: left: orginal image, right: trans-lated image. Result: 99.175 Percent MatchFigure 6 shows the result that we ob-tained from rotating the image. Again wewere able to obtain a match of over 99%.In all of these single window cases we usedimages that were 300x300 pixels and used5 of the complex moments discussed ear-lier. Figure 7 shows a 92% match when wescaled the image down by 75%Figure 6: 99.937 Percent MatchFigure 8 shows the result when we alteredthe image by all of the previous methods:translation, rotation and scaling. In this casewe sacled the image


View Full Document

NMT EE 552 - Simple Pattern Recognition via Image Moments

Download Simple Pattern Recognition via Image Moments
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Simple Pattern Recognition via Image Moments and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Simple Pattern Recognition via Image Moments 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?