Research Journal of Applied Sciences, Engineering and Technology 5(4): 1284-1289, 2013 ISSN: 2040-7459; e-issn: 2040-7467 Maxwell Scienific Organizaion, 2013 Submied: July 17, 2012 Acceped: Augus 15, 2012 Published: February 01, 2013 A Segmenaion Mehod for Uneven Illuminaion Paricle Images 1 Wang Wen-Cheng and 2 Cui Xiao-Jun 1 Deparmen of Informaion and Conrol, Weifang Universiy, Weifang, 261061, China 2 China Deparmen of Science, Jinan Universiy, Jinan, 250022, China Absrac: To he quesion of paricle images segmenaion wih uneven illuminaion background, a novel mehod is proposed based on homomorphic filering, Top-Ha ransformaion and waershed algorihm in his sudy afer discussing he characerisic of various common segmenaion algorihms. Firsly, homomorphic filering is carried ou on paricle image frequency region space, which weakened low frequency componen and srenghened he high frequency componen appropriaely, o make he whole image evenly. Then, Top-Ha ransformaion is adoped o remove a large area of he arge background and segmen he arge's acive area. Finally, waershed algorihm is used for segmenaion of adhesive paricles. Experimenal resuls show ha he proposed mehod is simple and pracical and can segmen he arges form uneven illuminaion paricle images. Keywords: Homomorphic filering, paricle image, uneven illuminaion, waershed INTRODUCTION Wih he developmen of compuer science and echnology, digial image processing mehod has become an imporan means of paricle deecion. Is purpose is o obain he accurae conour informaion from he granular appearance of paricle image, furher o measure and analyze he characerisic parameers of hose paricles, so as o creae condiions for making proper use of hem and ge beer undersanding of heir properies. The firs sep of paricle analysis is o separae he arge paricles from he background and many mehods for paricle image segmenaion are commonly used, such as he hreshold-based mehod, he region-based mehod, he emplae-based mehod, he clusering-based mehod and a variey of oher algorihms (Zheng e al., 2003). However, in he deecion and analysis sysems based on compuer vision, because of he properies of camera, he impac of camera condiions and he differen absorpion and reflecion properies o ligh sources on parial surface of deeced objecs, i ofen resuls in ha he objecs have uneven exposure o ligh, wih some of he parial surface are brigh and some are dark (Lu and Yan, 2005). I influences he precision of he deecion and analysis of he resuls. Non-uniform ligh field illuminaion in he image generaes background noise which is mixed wih signals ogeher and ha always resuls in weak image conras or dark spos (Wang and Cui, 2010). This no only undermines he real informaion of he images, bu also seriously affecs he visual effecs of he images, wih influence on he following image processing and analysis (Adelmann, 1998). Therefore, o sudy a fas and efficien algorihm o eliminae he impac of he uneven illuminaion, realize he segmenaion of paricles and background and accomplish couning of paricles should be solved in he machine vision inspecion sysem. To his quesion, on he analysis of he common image segmenaion echniques, a novel mehod is proposed based on a homomorphic filer, Top-Ha ransformaion and waershed algorihm. Which will weaken he effecs of uneven illuminaion by homomorphic filering firsly, hen o highligh he arge deails based on morphological mehod and realize he segmenaion of arge and background by using he waershed mehod finally. In pracice, his mehod is simple and effecive and can achieve saisfacory resul for uneven illuminaion image. TRADITIONAL IMAGE SEGMENTATION METHODS Image segmenaion is he process o separae arge from background in order o exrac he arge of ineres and he commonly used gray-scale segmenaion mehod is binary echnology. Suppose he source image is f (, finding a gray value T as he hreshold wih cerain crieria (Zhang and Zhang, 2005). If he value in f ( is larger han T, hen, assigning i wih 1; else assigning i wih 0. Afer hresholding operaion, hen, he binary image g ( will be as follows: Corresponding Auhor: Wang Wen-Cheng, Deparmen of Informaion and Conrol, Weifang Universiy, Weifang, 261061, China 1284
1 T I ( (2) N where, T = The segmenaion hreshold N = The number of image pixels l ( = The gray value of he image Fig. 1: The hisogram of objec and background 1 f ( T g( (1) 0 f ( T In general indusrial applicaions, here is obvious brighness difference beween he objec and he background and which performs wo spikes in he gray disribuion hisogram, as is shown in Fig. 1. Then, i is easy o selec a gray value T beween he wo peaks. By performing binary operaions, he arge and background will be separaed. The commonly used hreshold algorihm including: The average hreshold mehod: The simples image segmenaion hreshold selecion mehod will selec he average image gray value as he hreshold, namely: Osu mehod: This mehod is deduced for he bes hreshold based on he principle of leas squares mehod. Suppose here exiss an original hreshold, which will be used for separaing he arge and background. When he hreshold makes he larges variance of wo ypes, he opimal hreshold = T is deermined, ha is: 2 2 ( T) max{ ( )}, (0 L 1) (3) where, L = The gray level = The original hreshold T = The opimal hreshold Ieraive mehod: Firsly, o choose a hreshold value as he iniial value, hen according o some sraegy o improve he esimaes consanly unil you mee he crieria given. The hreshold deermined from ieraive mehod acs on each pixel 1000 800 600 400 200 0 0 50 100 150 200 250 (a) Source image (b) Hisogram (c) Averae mehod (d) Osu mehod (e) Ieraive mehod (f) Maximum enropy mehod Fig. 2: Example of hreshold segmenaion 1285
of whole image, hus, i will resul in he poor effec even failure o he images which are of sharp grayscale changes. The maximum enropy mehod: Enropy is a characerizaion of he average amoun of informaion, according o informaion heory, he definiion of enropy is: H p ( lg p ( x ) dx (4) adhesion beween he paricles. Thus, he combinaion of hese mehods will be able o obain saisfacory for uneven illuminaion paricle image segmenaion. Homomorphic filering: In general, an image can be regarded as a wo-dimensional funcion of he form f(, If we denoe illuminaion as i( and reflecance as r(, hen an image f( can be expressed as: f ( i( r( where, p( = The probabiliy densiy funcion of random variable x Wha he enropy hreshold is o selec a value so as o make he wo pars have he amoun of firs-order gray level informaion, namely he maximum enropy. Suppose hreshold can separae he objec O from background B in he image, he condiion need o be saisfied is: H ( ) H ( ) H ln P (1 P ) H O B ( ) / P H H /(1 P ) (5) Then, he which makes H() have he maximum value will be he opimal hreshold T o separae he objecs from background. By adoping he above mehods, he segmenaion resuls on an uneven illuminaion paricle image are shown in Fig. 2. From he resuls, i can be seen ha hese mehods are no ideal o uneven illuminaion image, and he brigh or dark areas canno be aken ino accoun a he same ime, so he wrong segmenaion will appear. By analyzing he gray level hisogram of he original image, i can be found ha here are no peaks beween he background and objecs. So, i is no easy o find he righ value relying on his mehod, and he direc hreshold segmenaion mehod canno adap o uneven illuminaion image correc separaion. Thus, a series of gray-scale compensaion or correcion are ofen needed before he segmenaion. ( 0 i ( ;0 r( 1) (6) If we are in line wih he characerisics of inciden and refleced componens in he images o design a suiable filer which can weaken he low-frequency componens and enhance he high-frequency componens. Then we can achieve he goals of overcoming he non-uniform ligh field, compressing dynamic range and enhancing conras, e al., Homomorphic filering is a frequency domain filering process ha can do i (Delac e al., 2006). The specific seps of homomorphic filering are as follows: We could somehow ransform he expression in (6) from muliplicaion o addiion; he problem of high pass filering would become rivial as we could use he muliplicaion or convoluion propery of he Fourier ransformaion. An obvious way o solve his problem is o ake a naural logarihm of boh sides of (6): ln f ( ln i( ln r( (7) By Fourier ransformaion, he image could conver from space domain o frequency domain, ake Fourier ransformaion on boh sides of las equaion: F[ln f ( ] F[ln i( ] F[ln r( ] (8) THE FRAMEWORK OF PROPOSED ALGORITHM The homomorphic filering which based on he lighing reflecion model can ake ino accoun lighing and reflecive properies, and can also consider he high-frequency deails and low-frequency componen of he image; Top-Ha Transformaion is able o aenuae he background highligh he arge; and waershed segmenaion can solve he quesion of 1286 I is abbreviaed as: F( I ( R( (9) In above equaion, F(, L(, and R(, are he Fourier ransformaion of Inf (, Ini ( and Inr (, respecively, where specrum funcion l( mainly cenralize on low frequency and R( mainly cenralize on high frequency.
Fig. 3: The principle of homomorphic filering Now we can high-pass he F( by means of a filer funcion H(, in frequency domain and obain a filered version S( : S( H ( F( H ( I( H ( R( (10) Inverse Fourier ransformaion is convering from frequency domain o he space domain. Supposing h( is he inverse Fourier ransformaion of S(, hen aking an inverse Fourier ransformaion of (10) provides: h( 1 1 (11) F ( H ( I( ) F ( H ( R( ) h ( h ( i r Hence, he enhanced image is sacked by illuminaion i( and reflecion r( componens. Finally, he desired filered (enhanced) image g( can be obained by he exponenial operaion: g( exp h ( exp h ( (12) i r ( f b)( max{ f ( x b( } yb ( f b)( min{ f ( x b( } yb (13) (14) The opening and closing morphological operaions of f( o b( are defined as: ( f b)( [( f b) b]( (15) ( f b)( [( f b) b]( (16) According o he difference of opening and closing operaion, he Top-Ha operaor is divided ino opening Top-Ha and closing Top-Ha. The opening and closing Top-Ha operaors are defined as: OTH f, b ( ( f f b)( (17) CTH f, b ( ( f b f )( (18) Top-Ha operaor has cerain characerisics of he high-pass filer, which means ha he Top-Ha operaor can deec he peak of image gray values and closing Top-Ha operaor can deec he valley of image gray values. Is framework as shown in Fig. 3. Top-ha ransformaion: The main conen of mahemaical morphology is o describe he basic feaures or basic srucure of he image by using a se of ransformaion (Ye and Peng, 2002). The mos fundamenal ransformaions are erosion and dilaion and oher ransformaions are defined by a combinaion of hem. Le f( and b( are wo discree funcions defined on he wo-dimensional discree space F and B, respecively, where f( is a grayscale image, b( is he srucural elemens. Then, he dilaion and erosion of f( o b( are defined as: 1287 Waershed algorihm: The waershed algorihm is a segmenaion mehod based on he opological heory of mahemaical morphology. The principle is described as follows: Firsly, aking an image as a geodesic opological landscape, he gray value of each pixel in he image corresponds o he aliude, he errain and uniform gray value local minima region regarded as he basin and a is lowes poin, he waer slowly immersed in each hole, wih he deepening of he flooding, a local minimum of he domain slowly ouward expansion. When he waer fills he basin, some dams will be buil beween a wo or more basins, each basin will be compleely submerged as he waer level rising and lef some un-submerged dams, each basin dam was
EXPERIMENTAL RESULTS Fig. 4: The simulaion of waershed principle compleely surrounded, so you can ge each dam (i.e., waershed) and each separaed by he dam basin (i.e., he objec) and ulimaely achieve he purpose of division of adhesions objecs (Zou e al., 2005). Obviously, if he gradien of he image is aken as an inpu image, he waershed will be he maximum poin of he firs derivaive, ha is, he image edge poins. The simulaion of waershed principle is shown in Figure 4. The main advanage of he waershed segmenaion mehod is o exrac almos he same objec from he background and i can ge he edge of he region (i.e., waershed) and he number of regions. In order o es he performance of proposed mehod, we use MATLAB o realize he simulaion program. The working process of he algorihm is: Firsly, inpu uneven illuminaion source image and do homomorphic filering o finish gamma correcion. Then, do Top-Ha ransformaion o furher eliminae he uneven background of he source image and generae an appropriae uniform background image. Finally, perform hreshold segmenaion algorihm o segmen image processed and finally ge he ideal image segmenaion resuls. Experimenal resuls are shown in following figures. Figure 5(a) is he four balls image colleced in uneven illuminaion environmen wih he size of 320 320 pixels. Figure 5(b) shows he resul of homomorphic filering, i can be seen ha he overall brighness of uneven illuminaion has been improved o uniform background, he conras of paricles and background has been enhanced o mainain a good arge informaion for furher analysis. Figure 5(c) shows he resuls of he Top-Ha ransformaion and i weakened he paricle image background and highlighs he deails of he paricles. In Fig. 5(d), arges and background have been separaed from he binary image afer local hresholding processing. Figure 5(e) is he (a) Source paricle image (b) Homomorphic filering (c) Top-ha ransformaion (d) Binarizaion 1 4 2 3 (e) Disance ransformaion (f) Waershed segmenaion (g) Paricle conours (h) Cener marking Fig. 5: Experimenal resuls of proposed mehod 1288
disance ransformaion image. Figure 5(f) is waershed segmenaion image, i can be seen from he figure ha he arge paricles are divided ino four regions and o solve he problem of adhesion beween he paricles. Figure 5(g) shows he paricle conours of various arges segmened and in Fig. 5(h), he cener of each paricle is marked using he '+' finally. From above, i can be seen ha we can ge he ideal image segmenaion resuls from uneven illuminaion images. CONCLUSION In machine vision sysems, uneven illuminaion had an impac on he image segmenaion and subsequen paricle analysis. To his quesion, novel mehod is proposed based on homomorphic filering, Top-Ha ransformaion and waershed algorihm in his sudy. By homomorphic filering, i can weaken low frequency componen and srenghen he high frequency componen appropriaely in frequency space, o make he whole image evenly. Then, Top-Ha ransformaion is adoped o remove a large area of he arge background and segmen he arge's acive area. Finally, waershed algorihm is used for segmenaion of adhesive paricles. Experimenal resuls show ha he proposed mehod is simple and effecive, which makes he uneven illuminaion image correcion reached a saisfacory resul. Bu o he severe adhesion paricle images, he algorihm will have limi effec and how o improve he adapabiliy of his algorihm will be he focus of fuure research work. ACKNOWLEDGMENT The auhors wish o hank he helpful commens and suggesions from my eachers and colleagues in Weifang Universiy and Shandong Universiy. And also hank Jinan Universiy o provide par hardware. This sudy has been suppored by Docoral Scienific Research Foundaion of Weifang Universiy (2012BS26) and Technology Developmen Plan of Weifang Ciy (2011119). REFERENCES Adelmann, H.G., 1998. Buerworh equaions for homomorphic filering of images. Compuers in Biology and Medicine, 28(2): 169-181. Delac, K., M. Grgic and T. Kos, 2006. Sub-image homomorphic filering echnique for improving facial idenificaion under difficul illuminaion condiions. Inernaional Conference on Sysems, Signals and Image Processing (IWSSIP 06), pp: 95-98. L Z. and X. Yan, 2005. The prereamen of segmenaion on disribuing uneven background brighness of wear paricle image. Lubricaion Eng., 5: 34-35. Wang, W.C. and X.J. Cui, 2010. A background correcion mehod for paricle image under nonuniform illuminaion condiions. ICSPS 2010, pp: 695-699. Ye, B. and J. Peng, 2002. Small arge deecion mehod based on morphology op-ha operaor. J. Image. Gr., 5(5): 638-642. Zhang, S. and C. Zhang, 2005. Sea surface image enhancemen based on homomorphic filering. Ocean Technol., 26(1): 6-9. Zheng, J., X. Chun-Guang and X. Ding-Guo, 2003. The echnique of digi image's illuminaion uneven eliminaion. Trans. Beijing Insiue Technol., 23(3): 285-289. Zo D., D. H S. Jin and Q. Li 2005. A granular analysis mehod based on waershed. J. Image. Gr., 10(11): 1415-1418. 1289