Journal of Emergng Trends n Computng and Informaton Scences 009-03 CIS Journal. All rghts reserved. http://www.csjournal.org Unhealthy Detecton n Lvestock Texture Images usng Subsampled Contourlet Transform and SVM Reza Javdan, Al Reza Mollae Asstt Prof., Computer Engneerng Department, Beyza Branch, Islamc Azad Unversty, Beyza, Fars, Iran Veternaran Department, Beyza Branch, Islamc Azad Unversty, Beyza, Fars, Iran ABSTRACT In ths paper a new splt and merge algorthm based on Contourlet transform and Support Vector Machne (SVM) s presented for automatc segmentaton and classfcaton of unhealthy n Lvestock Texture Images. We focused on the lver textural mages of lvestock to verfy f there s any unhealthy on ts textural mage. The Contourlet transform s used because t allows analyss of mages wth varous resoluton levels and drectons. It effectvely captures smooth contours that are domnant features n textural mages. In addton, we have used SVM classfer to classfy the texture features. The proposed method provdes a fast algorthm wth enough accuracy that can be mplemented n a parallel structure for realtme processng. The smulaton results show the effectveness of the new proposed algorthm. Keywords: Lvestock, Texture, Image, Unhealthy, lver, Contourlet, SVM. INTRODUCTION There are many knds of popular dseases n poultres and lvestock s whch carred on slaughter houses. For the safety and health reasons, these knds of nfected lvestock s should be recognzed and omtted from the slaughter lne. In a tradtonal method, an nspector, usually a veternaran or hs/her assstant, nspects vsually the lne of slaughter, and omts the poultres whch look to be unhealthy due to ther thn body or unusual skn color. Even ths method may look to be enough safe, but ncreasng demand on daly and fresh meat n the market, drect us to enhance the nspecton method by usng an automated machne vson system. Substtuton of human nspecton wth a machne has many benefts ncludng: decreasng the overall payment cost, ncreasng safety and qualty of the meat producton process and fnally, applyng a fast and consstent nspecton rule over all the slaughter houses of the country. The nspecton system should be desgned to be an effcent composton of human ntellgence and experence along wth the fastness of a machne.. CONTOURLET TRANSFORM The Contourlet transform s a new twodmensonal extenson of the wavelet transform proposed by Do and Vetterl []. Fgure shows the fundamental structure of ths transform. The contourlet expanson s composed of bass In ths paper, the problem of automatc segmentaton and classfcaton of the lvestock textural mages usng Contourlet transform and SVM s dscussed. Here we used the lver mages of each lvestock to verfy the healthy. It means that we focus on the lver texture and determne f there s any unhealthy on t. We would lke the classfcaton task to be computatonally nexpensve and enough fast to be appled n a real-tme envronment. The organzaton of the paper s as follows: In Secton Cotourlet transform brefly explaned. In Secton 3 SVM algorthm s dscussed. The proposed approach for automatc unhealthy detecton based on Contourlet transform and SVM s dscussed n Secton 4. In Secton 5 the expermental results are outlned. Fnally the concluson s the subject of Secton 6. Fg : Contourlet Transform 0
Journal of Emergng Trends n Computng and Informaton Scences 009-03 CIS Journal. All rghts reserved. mages orented at varous drectons n multple scales, wth flexble aspect rato that could effectvely capture smooth contours of seabed mages. Ths transform employs multscale and drectonal flter banks wth crtcal downsamplng operaton, shearng operaton, and coeffcent rearrangement. Contourlets can represent a smooth contour wth fewer coeffcents than that of the wavelets. The Contourlet transform, as llustrated n Fgure, employs an effcent tree structured mplementaton, whch s an terated combnaton of the Laplacan Pyramd (LP) [], to capture the pont dscontnutes, and the Drectonal Flter Bank (DFB) [3], to gather the nearby bass functons and to lnk pont dscontnutes nto lnear structures. Snce the DFB was desgned to capture the hgh frequency drectonalty of the nput mage and t s poor n handlng low frequency content, the DFB s combned wth the LP, where the low frequences of the nput mage s removed before applyng DFB. Fgure shows the resultng frequency dvson, where the whole spectrum s dvded both angularly and radally and the number of drectons s ncreased wth frequency. It was shown that the dscrete contourlet transform acheves perfect reconstructon and has a redundancy rato that s less than 4/3. It has been shown that the dscrete Contourlet transform s shft varant, and acheves perfect reconstructon [4]. http://www.csjournal.org where w s the normal vector of the hyper plane, b s the dstance from the orgn to the hyper plane. If we suppose the tranng data satsfy w. x b f y w. x b f y () The nonsubsampled contourlet transform [5] s a redundant expanson of the contourlet transform to allow practcal processng on square-sze drectonal sub-bands. The redundancy s acheved by dscardng any downsamplng operaton n the Laplacan pyramd scheme. We modfed ths transform by dong down-samplng at each scale to have the chance of multresoluton analyss on square-sze drectonal sub-bands. We can magne that the subsampled contourlet transform s smlar to the standard contourlet transform wthout usng shearng operator and coeffcent re-arrangement. Fgure dsplays an overvew of the proposed subsampled contourlet transform [6]. 3. THE SUPPORT VECTORE MACHINE Support vector machne (SVM) [7] has been developed ntally for the supervsed classfcaton. Because of ts excellent performance n nonlnear and hgh dmensonal pattern recognton wth small samples, SVM s regarded a powerful machne learnng tool that has been wdely appled n texture segmentaton and other applcatons of machne learnng ncludng functon approxmaton and probablty estmaton. Suppose the tranng set s: (x,y ),,(x m,,y m ), x R n, y {-,} where n s the dmenson of the nput vector, m s the number of samples, and y ndcates whch class x belongs to. The SVM attempts to obtan a good separatng hyper plane between the two classes. If the data are lnear separable, the desred optmal hyper plane can be defned by w. x b 0 () Fg : The Subsampled Contourlet Transform [6] the mnmum dstance from the tranng vector to the hyper plane s w. x b mn (3) w w Thus, the support vectors can be approached va solvng the followng quadratc convex programmng T mn w w. w (4) s. t. y ( w. x b) =,...,m (5) Practcally, the tranng set may not be lnear separable. Therefore, we should ntroduce the slack varable 0,,.., m to relax the separable constrans (5) as follows y ( w. x b) (6) The objectve functon (4) should be changed accordngly to mn w w. w C (7) where C s a penalty parameter to control the relaxaton. Usually, the quadratc convex programmng (7) T m
Journal of Emergng Trends n Computng and Informaton Scences 009-03 CIS Journal. All rghts reserved. s reformulated wth Lagrange multpler method and solved numercally by quadratc programmng. The general schema of SVM s llustrated n Fgure 3. 4. THE PROPOSED APPROACH 4. The Methodology In ths secton a new splt and merge algorthm based on subsampled Contourlet transform and Support Vector Machne (SVM) s presented for automatc segmentaton and classfcaton of unhealthy n the lver Texture Image of http://www.csjournal.org background of our camera s black, we used a smple threshold to dscrmnate the object from the background. The resulted texture mages are s decomposed usng three levels of subsampled contourlet transform. Then features obtaned from drectonal band pass subband coeffcents (8 at level 3, at level, at level, and at level 0). Let S 0, 0 be the low pass sub-band and S,, S, - S,, and S 3, S 3, 8 be band pass drectonal subbands at the frst, second, and thrd decomposton levels, respectvely. Snce S 0, 0 and S, have the same resoluton sze, we use them together to construct the hghest resoluton segmented mage. On the other hand, S, S, and S 3, S 3, 8 are used to construct the segmented mage wth medum and lowest resoluton, respectvely. Fg 3: General schema of SVM Lvestock. The archtecture of our approach s llustrated n Fgure 4. A dgtal camera takes a pcture from the lver of lvestock. After preprocessng ncludng contrast stretchng, the mage should be segmented nto the object and background. Segmentaton s a challengng problem n the feld of computer vson. However, snce the Fg 4: Block dagram of the proposed method Followng the block dagram of Fgure 4, each decomposed level mage splt nto M M blocks. In ths work M s chosen to be 4 based on the resoluton of the acqured mages. The energy of each block s calculated and each block s classfed usng traned SVM classfer. Fnally, the classfed blocks on the boundares of the segmented mage are refned and merged to produce the fnal segmented mage. Squared root of average energy of the subsampled contourlet coeffcents of the block on each sub-band s calculated as: E u, v ( x, y) x M y M x j y S M u, v (, j) (8) 4. SVM Block Classfcaton Support Vector Machne classfer that s used n ths stage s pre-traned usng M M parts of predctable textures. The calculated features from each block are mported to a polynomal SVM as an nput vector, and ths classfer s determned class of each block. In ths paper many dfferent kernels are tested and fnally 3rd degree polynomal kernel showed that produces better results. 4.3 Merge and Refnement Snce dfferent textures are revealed at dfferent scales the herarchy composed of three coarse segmented mages obtaned from three-level subsampled contourlet decomposton should be merged and the boundares between classfed regons must be refned. To do ths, the followng algorthm, orgnally presented by Javdan n [6],
Journal of Emergng Trends n Computng and Informaton Scences 009-03 CIS Journal. All rghts reserved. wth some mnor modfcatons s used. Ths modfed algorthm s another contrbuton of ths paper snce t gves good results for the subsampled contourlet decomposton as well. a. Block refnement The man purpose of ths part s to compare the class label of a block wth the labels of ts neghbors and modfy t f necessary. At ths pont, block refnement s performed on each of three segmented mages of the herarchy, separately. Consder each non-overlappng block n any of the segmented mages. Agan M s chosen to be 4 as the same value as consdered prevously. Lke a major vote system, f the block's class label s dentcal to that of the all four-connected block neghbors, do nothng. Otherwse, f all four-connected neghborhood blocks or at least three of them have the same class label, replace the class label of centered block wth the class label of ts major neghbors. Ths process should be done block-wse n a raster scan fashon, from top left corner of the mage. b. Image sze expanson Because of the decmated (down samplng) property of the subsampled contourlet decomposton, the sze (dmenson) of the segmented mage of level three of the decomposton s one quarter of the sze of the segmented mage at level one and the level two s one half of the sze of the level one as well. As a result, the level three and level two must be expanded to the sze of level one before mergng. Remember that the sze of the segmented mage obtaned from level one of the decomposton s equal to the sze of the orgnal mage. http://www.csjournal.org obtaned from level one of the subsampled contourlet transform (because t contans detal nformaton of the regons). Otherwse, leave the class label of the new constructed mage to be the same as the class label of that pont of the merged mage. e. Deletng dsconnected slands The solated regons wth small area should be deleted from the merged mage obtaned n prevous part. Dscard any dsconnected regon whch has area less than a known threshold by replacng t wth ts neghbors. Ths threshold relates to the sonar mage resoluton. 5. EXPERIMENTAL RESULTS For testng the proposed approach, mages coverng both healthy and unhealthy lvestock acqured from a modern slaughter house. The mages are from the lver ncludng healthy and unhealthy lvestock. Fgure 5 shows two samples of these mages. Fgure 5 shows a healthy lver whle Fgure 5 shows an unhealthy lver. For gettng better results, the background at the magng pont covered wth a black screen. After preprocessng of the acqured mages, ncludng contrast stretchng and color level adjustment, the mages were segmented usng a smple threshold. Just as an example, Fgure 6 shows a real sample mage and the segmented results. For better understandng of the proposed method, the ntermedate results are outlned. As another example Fgure 7 shows another lver texture mage and the fnal segmented results as an unhealthy tssue c. Mergng of three segmented mages Followng dmenson expanson, scan all pxels (ponts) of the three segmented mages smultaneously from top left corner to the bottom rght corner n a raster scan form. For each pont of the new constructed mage assgn a class label that exsts n the correspondng ponts of at least two mages of the three segmented mages. Otherwse, select the class label of the correspondng pont of the lowest resoluton segmented mage obtaned from level two of the subsampled contourlet decomposton. In other words, n cases of no agreement between fner segmentaton results obtaned from level one and level two (.e. there are dfferences between detals of regons of the mage under segmentaton), the coarser segmentaton obtaned from level 3 whch contans less detals, gves the most dscrmnate. d. Boundary pxel refnement Scan all ponts of the resulted mage obtaned n prevous part from top left corner n raster scan form. Consder the pxels of boundares of adjacent texture regons and test to see f they are smlar wth all 4- connected neghbors. If any pont on the boundary (edge) s evaluated to be of dfferent class label from at least one of ts 4-connected neghbors, the class label of that pont n the new constructed mage should be changed. Ths change should be based on the equvalent class label of the correspondng pont n the orgnal fne segmented mage 6. CONCLUSION In ths paper a new splt and merge algorthm based on the concept of subsampled Contourlet transform and SVM classfer for automatc classfcaton of the lvestock mages n slaughter houses s ntroduced. In a tradtonal method, an nspector, usually a veternaran or hs/her assstant, nspects Fg 5: a healthy lver an unhealthy lver 3
Journal of Emergng Trends n Computng and Informaton Scences 009-03 CIS Journal. All rghts reserved. http://www.csjournal.org fdelty of the proposed approach wth accuracy rate of %9. (b REFERENCES (c) (d) [] Mnh N. Do and Martn Vetterl, The contourlet transform: an effcent drectonal multresoluton mage representaton", IEEE Transactons on Image Processng, vol. 4, no., pp. 09-06, Dec. 005. [] P. J. Burt, and E. H. Adelson, "The Laplacan pyramd as a compact mage code", IEEE Transactons on Communcaton, vol. 3, no. 4, pp. 53-540, 983. Fg 6: Orgnal mages., (c) after preprocessng (d) Fnal unhealthy detecton [3] R. H. Bamberger, and M. J. T. Smth, "A flter bank for the drectonal decomposton of mages: theory and desgn", IEEE Transactons on Sgnal Processng, 40, pp. 88-893, 99. [4] Duncan D.-Y. Po and Mnh N. Do, "Drectonal Multscale Modelng of Images usng the Contourlet Transform", IEEE Transactons on Image Processng., vol. 5, no. 6, pp. 60-60, June 006. [5] Cunha Arthur L., Zhou Janpng, Do Mnh N. The Nonsubsampled Contourlet Transform: Theory, Desgn, and Applcatons. IEEE Transactons on Image Processng, 005. Fg 7: Orgnal mage of an unhealthy lver Fnal Detecton vsually the lne of slaughter, and omts the carcass whch look to be unhealthy. Substtuton of human nspecton wth a machne has many benefts ncludng: decreasng the overall payment cost, ncreasng safety and qualty of the meat producton process and fnally, applyng a fast and consstent nspecton rule over all the slaughter houses of the country. The subsampled contourlet transform appears to be a sutable tool for ths task and best parameters for ths transform are obtaned. The energy of each contourlet sub band coeffcent s used to construct the texture feature vector. SVM s selected as an excellent nonlnear classfer, and best parameters for ths classfer are obtaned. The post processng performance reles on refnement approach has been demonstrated to be able to enhance contourlet crsp segmentaton and gave better results than other well known technques. The man advantage of the proposed method s a relatvely small vector of features, whch s suffcent for texture classfcaton. In addton, t was fast enough to be appled for real tme analyss n a new automatc texture segmentaton system. Expermental results on real sample mages from both healthy and unhealthy mages, showed the [6] Reza Javdan, M. A. Masnad-Shraz, and Zohreh Azmfar, "Contourlet-Based Acoustc Seabed Segmentaton and Classfcaton", Internatonal Journal on Communcatons Antenna and Propagaton (IRECAP), Vol., No. 4, August 0. [7] C. W. Hsu, C. C. Chang and C. J. Ln, A Practcal Gude to Support Vector Classfcaton, Techncal Report, Department of Computer Scence and Informaton Engneerng, Unversty of Natonal Tawan, Tape, 00, AUTHOR PROFILES Reza Javdan receved the B.Sc degree n Computer Engneerng (hardware) from Isfahan Unversty n 993. He receved M.Sc. and Ph.D. degree n Computer Scence and Engneerng (Artfcal Intellgence) from Shraz Unversty n 996 and 007, respectvely. Hs research nterests nclude Pattern Recognton, Image Processng, Artfcal Intellgence and Computer Vson. Alreza Mollae receved Professonal Doctoral n the veternaran feld from Kazeroun Branch, Islamc Azad Unversty. He s now the vce chancellor of Beyza Branch, Islamc Azad Unversty. 4