Internatonal Conference on Logstcs Engneerng, Management and Computer Scence (LEMCS 5) Maxmum Varance Combned wth Adaptve Genetc Algorthm for Infrared Image Segmentaton Huxuan Fu College of Automaton Harbn Engneerng Unversty, Harbn, Chna fuhuxuan@hrbeu.edu.cn Yuchao Wang* College of Automaton Harbn Engneerng Unversty, Harbn, Chna wangyuchao@hrbeu.edu.cn * Correspondng Author Langlang Han College of Automaton Harbn Engneerng Unversty, Harbn, Chna hanlanglang@hrbeu.edu.cn Abstract Maxmum Varance Image Segmentaton method (Otsu) s a popular non-parametrc method n mage segmentaton. However, t s large amount of computaton and poor real-tme qualty have lmted ts further applcaton. To solve these problems, a new approach based on an adaptve genetc algorthm (AGA) and Otsu are proposed, whch usng between-class varance as ftness functon, automatcally adjusts the optmal threshold. The adaptve genetc algorthm selects crossover probablty and mutaton probablty accordng to the ftness values, reduces the convergence tme and mproves the precson of genetc algorthm, nsurng the accuracy of parameter selecton. The expermental results show that the proposed method s better than the orgnal Otsu, the AGA-Otsu can provde better effectveness on experments of nfrared mage segmentaton, decrease processng tme. Keywords- Image segmentaton; Otsu; Adaptve Genetc Algorthm; Infrared mage; Optmal threshold I. INTRODUCTION Image segmentaton s consdered as an mportant basc operaton for meanngful analyss and nterpretaton of mage acqured. Image segmentaton s a process of dvdng an mage nto a number or sub-areas wth dfferent characterstcs and extractng the nterested objects. One of the methods of mage segmentaton s the threshold-based method whch dvdes the mage nto several areas by one or more thresholds and consders the pxels belongng to the same area as a separate object. Threshold-based method s defntely one of the most popular segmentaton approaches to extract objects from mages, and more partcularly n nfrared mages []. The advantages of the threshold-based method are ts smplcty and easy mplementaton whle the dffcultes le n how to select the best threshold to ensure a satsfactory segmentaton result. Many threshold-based methods have been proposed by a lot of scholars. Pun [] proposed an algorthm based on entropy. Maxmum classbetween varance algorthm (also known as the Otsu algorthm) [3], ntroduced a nonparametrc and unsupervsed method for mage segmentaton. The mnmum error algorthm [4,5], Adaptve mnmum error algorthm [6], Fuzzy Cluster [7-9] etc. Maxmum classbetween varance algorthm uses mage hstogram to determne the best segmentaton threshold between the object and background of an mage. It can well pledges the result, whch doesnt need pror knowledge []. However, the soluton of optmzaton threshold s gotten by exhaustve search and the process costs too much tme. Genetc algorthms (GA) are robust search and optmzaton technques whch are fndng applcaton n a number of practcal problems [, ]. The basc operatng prncples of GA are based on the prncples of natural evoluton. The robustness of GA requres lttle knowledge of the problem tself and does not requre that the search space s dfferentable or contnuous. GA for reproducton can provde the soluton for optmzng parameters. Adaptve genetc algorthm (AGA) s a type of GA of whch probabltes of crossover and mutaton are adaptvely adjusted accordng to the ftness values of ndvduals []. In order to avod the shortcomngs of the Otsu algorthm tme-consumng, a new approach based on an adaptve genetc algorthm (AGA) and Otsu s proposed, whch usng between-class varance as ftness functon, automatcally adjusts the optmum threshold, ths method selects crossover probablty and mutaton probablty accordng to the ftness values, nsurng the accuracy of parameter selecton, decrease the processng tme. 5. The authors - Publshed by Atlants Press 64
II. OTSU ALGORITHM The Otsu algorthm s proposed by Nobuyuk Otsu [3], based on the maxmum varance between classes. Accordng to the hstogram of an mage, Otsu method chooses the maxmum between class are varance from the background as the crteron of threshold. Due ts good segmentaton effect, t has become one of the most wdely used threshold-based segmentaton methods. The prncple of the algorthm can be descrbed as follows. Let the pxels of a gven mage be represented n L gray levels. The collecton of all gray values of the mage s G{,,,..., L }. The number of pxels at level s denoted by n, the total number of pxels s: N n () In order to smplfy the dscusson, the gray-level hstogram s normalzed and regarded as a probablty dstrbuton: where P, P. P n / N () Supposng the mage s segmented nto two regons by the threshold whch has the gray value t. The regon contans pxels have the gray value between to t s defned as C, whch represents the background of the mage. The regon contans pxels and have the gray value between t to L- whch s defned as C, whch represents the object n the mage. The probablty of C and C are: t P () t (3) P ( t) (4) t The mean of C and C gray values are: t P P t The average gray value of whole mage s: (5) (6) P (7) C and C class varance by the followng formula: t ( ) P (8) and ( ) P (9) m t Defne class varance T populaton varance as:, between-class varance () ( ) ( ) ( ) () () T In the expresson of and are contaned threshold t, t s possble to ntroduce a soft decson rule: () t (3) T Then the problem s reduced to an optmzaton problem to search for a threshold t that maxmzes one of the object functons (the crteron measures). Ths standpont s motvated by a conjecture that threshold classes wll be separated n gray levels, and conversely, a threshold gvng the best separaton of classes n gray levels wll be the best threshold. It s notced that and are functons of threshold level t, but T s ndependent of t. Therefore, () t s the smplest measure wth respect to t. Thus, adopt () t as the crteron measure to evaluate the threshold at level t. The value n the range of pxels gray levels n mage s t, when the results of () t reaches a maxmum, then take * t as the best threshold: * max ( t) max ( t ) tm III. (4) OTSU COMINED WITH ADAPTIVE GENETIC ALGORITHM Otsu solvng process fnds an optmal soluton n the soluton space, makng the maxmum between-class varance. In order to fnd the varable t whch causes () t to maxmum value, the algorthm calculates a varance for each gray value n the gray level collecton G and thus t s hardly for Otsu to acheve real-tme processng requrements. Smple Genetc Algorthms (SGA) s frstly proposed by John H. from the Mchgan Unversty n Amerca. As a newly developed optmzaton algorthm, the genetc algorthm s derved from the theory of Darwnsm and genetcs. Smple Genetc Algorthm s characterzed by ts current effectveness, strong robustness, and smple mplementaton. ut Smple genetc algorthm has premature convergence problem[3,4]. Therefore, the goals wth adaptve probabltes of crossover and mutaton are to mantan the genetc dversty n the populaton and prevent the genetc algorthms to converge prematurely to local mnma. Adaptve genetc algorthm can get better soluton for the problem by adjustng crossover probablty Pc and the mutaton probablty P m dynamcally accordng to the ndvduals ftness[5]. Adaptve genetc algorthm s used to search for the optmal Otsu parameter, mprove search speed and reduce calculaton. A. Algorthm Desgn )Code and Ftness Functon Use bnary encode. For the gray-level from to 55, ndvdual denoted by chromosome s coded nto 8 bt as a threshold. Ftness functon s a key factor to obtan threshold through GA. Defne between-class varance as the ftness functon. Use Formula () to calculate the ndvdual ftness value. 64
)Selecton Operaton The stochastc tournament selecton s mplemented for the current populaton for reproducton. 3)Crossover and Mutaton Operaton Crossover and Mutaton Operaton, create new offsprng by performng crossover and mutaton operatons. The probabltes of crossover and mutaton can be defned n the followng forms [5]: ( Pc P c ) ft ftavg Pc, ft ftavg Pc ftmax ftavg Pc, ft ftavg (5) ( Pm P m ) ft max ft Pm, ft ftavg Pm ftmax ftavg Pm, ft ftavg (6) where P c s the maxmum probablty of crossover, P c s the mnmum probablty of crossover, ft s the larger ftness value of the two ndvduals selected for crossover, P m s the maxmum probablty of mutaton, Pm s the mnmum probablty of mutaton, ft max s the maxmum ftness value of the current populaton, ft s the average ftness value of the current populaton, and ft s the ftness value of the ndvdual to mutate.. Algorthm Realzaton The Algorthm of nfrared mage segmentaton based on Otsu and adaptve genetc algorthm conssts of the followng steps: Step: Intalzaton populaton, defne the adaptve genetc algorthm s operatonal parameters (the number of varables, search doman of each varable, the number of ndvduals n populaton, maxmum number of evoluton generatons, maxmum and mnmum mutaton probablty, and maxmum and mnmum crossover probablty), teratve tmes k, generate an random ntal populaton. Step: Tranng the ndvdual n populaton, evaluatng ftness. Step3: If the populaton correspondng to the best ndvdual ftness functon value s set to meet the requrements or the number of teratons s reached, then go to step 6. Step4: k k. Step5: Apply selecton, crossover and mutaton operators to generate new populaton, go to step 3. Step6: Select the ndvdual wth largest ftness as the best results, and t s the best threshold to segment the mage. Step7: End. Otsu ntegrated wth AGA flowchart s shown n Fg.. avg adaptve genetc algorthm and Otsu respectvely. Adaptve genetc algorthm parameters settngs are as follows: code length s 8, the number of ndvduals n populaton s, Pc.9, P c.6, Pm., Pm., maxmum number of teratons s. The nfrared mage s then segmentaton usng the Otsu and AGA-Otsu methods for comparson. Image segmentaton results are shown n Fg. 4-Fg. 7. Start Generaton: k= Create ntal populaton and codng Evaluatng ftness Termnaton condton satsfed? Yes Output optmal ndvdual, segment mage End Fgure. Flowchart of AGA-Otsu Fgure. Orgnal nfrared mage Generaton: k=k+ AGA operaton: selecton,crossover, mutaton No IV. EXPERIMENT RESULTS In order to verfy the valdty of proposed algorthm, Otsu algorthm and AGA-Otsu algorthm are carred out smulaton experments. Orgnal nfrared mages are shown n Fg. and Fg. 3. Image segmentaton has made by Otsu based on 643
Fgure 3. Orgnal nfrared mage Fgure 4. Image segmentaton by Otsu for mage Fgure 7. Image segmentaton by AGA-Otsu for mage Fg.4 s Otsu segmentaton results of mage, Fg. 5 s segmentaton results of Otsu for Fg.. Fg. 6 s AGA- Otsu segmentaton results of Fg., Fg. 7 s AGA-Otsu segmentaton results of Fg.. From Fg. 4 and Fg. 6, Fg. 5 and Fg. 7, t can be seen that the segmentaton results of the two methods are smlar. Genetc algorthms exst n the process of computng the convergence problems, leadng to the results of each operaton s dfferent, n order to verfy the relablty of the proposed method, by takng the mean of trals way to get ths algorthm to determne the optmal threshold. Due to lmted space, the paper gves only Fg. tmes experment results by AGA-Otsu method, shown n Table. TALE I. AGA-OTSU METHOD RESULT OF THRESHOLD AND CALCULATION TIME FOR IMAGE Methods Tmes Threshold Tme (ms) Fgure 5. Image segmentaton by Otsu for mage AGA-Otsu 4 3.33 6.6 3 9 5.5 4 4 36.995 5.36 6 4.965 7 8 4.35 8 7 3.6 9.4 4 33.8 Table compares the performance of the Otsu algorthm and AGA-Otsu algorthm. TALE II. TWO METHODS PERFORMANCE AND CALCULATION TIME COMPARISON Fgure 6. Image segmentaton by AGA-Otsu for mage Image Image Methods Threshold Tme (ms) Otsu 8 47.3 AGA-Otsu 5 4.837 Otsu 3 439.599 AGA-Otsu 3.79 Table shows comparson of the proposed algorthm wth the Otsu algorthm computaton tme and 644
segmentaton threshold. From Table, t can be seen that AGA-Otsu algorthm calculate the segmentaton threshold and tradtonal Otsu algorthm calculate threshold are smlar, but n the computaton tme AGA-Otsu algorthm s sgnfcantly better than the tradtonal Otsu algorthm, the tradtonal Otsu algorthm computaton tme s about four tmes of the AGA-Otsu algorthm. V. CONCLUSIONS The Otsu algorthm has the attrbutes of good segmentaton effect and easy mplementaton. ut ts applcaton s lmted by ts shortcomngs lke large amount of computaton and long executon tme. To solve ths problem, a new approach Otsu combned wth adaptve genetc algorthm s proposed. Adaptve genetc algorthm s a type of GA of whch probabltes of crossover and mutaton are adaptvely adjusted accordng to the ftness values of ndvduals, the goals wth adaptve probabltes of crossover and mutaton are to mantan the genetc dversty n the populaton and prevent the genetc algorthms to converge prematurely to local mnma. Expermental results show that the proposed algorthm can obtan segmentaton results smlar to the orgnal Otsu algorthm, better than Otsu but wth hgher effcency and less executon tme. ACKNOWLEDGMENT Ths work s supported by Natonal Natural Scence Foundaton (NNSF) of Chna under Grant 5496, 54964, the Fundamental Research Funds for the Central Unverstes (HEUCF45). REFERENCES [] M. Portes de Albuquerque, I. A. Esquef, A. R. Gesuald Mello, Image thresholdng usng Tsalls entropy, Pattern Recognton Letters, vol. 5, 4, pp. 59-6. [] N. R. Pal and S. K. Pal, A revew on mage segmentaton technques, Pattern Recognton, vol. 6, 993, pp. 77-94. [3] N. Otsu, A threshold selecton method from gray-level hstogram, IEEE Trans Systems Man Cybenet, 979, pp. 6-66. [4] J. Kttler, J. Illngworth, Mnmum Error Thresholdng, Pattern Recognton, vol. 9, 986, pp. 4-47. [5] J. Lu, J. H. Zheng, Q. H. Tang, Mnmum error thresholdng segmentaton algorthm based on 3d grayscale hstogram, Mathematcal Problems n Engneerng, 4, pp. -3. [6] J. W. Long, X. J. Hen, H. P. Chen, Adaptve mnmum error thresholdng algorthm, Acta Automatca Snca, vol. 38,, pp. 34-44. [7] C. L, Y. L, X. Wu, Novel Fuzzy C-Means Segmentaton Algorthm for Image wth the Spatal Neghborhoods, Internatonal Conference onremote Sensng, Envronment and Transportaton Engneerng (RSETE),, pp. -4. [8] W. P. Ma, Y. Y. Huang, H. L, Image Segmentaton ased on Rough Set and Dfferental Immune Fuzzy Clusterng Algorthm, Journal of Software, vol. 5, 4, pp. 675-689. [9] C. H. Dng, L. Jang, F. H. Du, Segmentaton of color mage contour usng fuzzy cluster analyss, Internatonal Conference on Informaton Scences and Interacton Scences,, pp. 43-435. [] Zhang Gu-Me, Chen Shao-Png, Lao Ja-N, Otsu mage segmentaton algorthm based on morphology and wavelet transformaton, Internatonal Conference on Computer Research and Development, vol.,, pp. 79-83. [] Chang, Tsun-We, A GA-based fuzzy recommender system for regon-based mage retreval, Internatonal Journal of Fuzzy Systems, vol. 6, 4, pp. 9-3. [] Fan SuLng, GA optmzaton model for repettve projects wth soft logc, Automaton n Constructon, vol.,, pp. 53-6. [3] D Adler, Genetc algorthms and smulated annelng, A Marrage Proposal In IEEE Confernce on Neural Networks, San Francsco, Calforna, 993, New York: IEEE Neural Networks Coucl, 4-9. [4] J Andre, P Sarry, T Dognon, An mprovement of the standard genetc algorthm fghtng premature convergence n contnuous optmzaton, Advances n Engneerng Software, vol.,, pp. 49-6. [5] M. SRINIVAS, L M. PATNAIK, Adaptve probabltes of crossover and mutaton n genetc algorthm, IEEE Transactons on SMC, vol. 4, 994, pp. 656-667. 645
646