TELKOM NIKA , Vol. 11, No. 6, June 20 13, pp. 3445  ~   3 450   e-ISSN: 2087 -278X           3445      Re cei v ed  Jan uary 25, 201 3 ;  Revi sed Ap ril 21, 2013; Accepted Ap ril 29, 2013   Cotton Pests and Diseases Detection based o n  Image  Processing      Qinghai He 1 , B e n x ue  M a * 1 , Duan y a ng  Qu 1 , Qiang Zhang 1 ,Xinmin Hou 2 ,Jing Zhao 3   1 Colle ge of Me chan ical a nd El ectrical En gin e erin g, Shih ezi Univers i t y ,   Sh i hezi 8 3 2 003,C h in a     2 T he  T eaching Office of the U n iver sit y  of the  Broadc ast and  T e levision  in Xinjiang, Shi hez i 832000,China  3 School of el ec trical an d electr onic e ngi ne erin g, Shand on g U n iversit y  of T e chno log y , Z i b o  255 04 9, Chin a   *Corres p o ndi n g  author, e-ma i l : mbx_s h z@ 1 63.com       A b st r a ct   Extract the d a m a g e d  i m age  form the c o tton  i m ag i n   orde r to  meas ure  the  da ma ge r a t i o of t h e   co tto n  l e a f  wh ich  ca u s e d   b y   th e  d i se a s e s  or p e s ts. Se ve ra l  al g o r i t hm s like  im ag e   e n h a n c eme n t, im age  filterin g w h ich suit for cotton leaf  process i n g  w e re explore d  in this pap er. T h ree differe nt color mod e ls fo r   extracting th da ma ged  i m a g e  from cotton  l eaf i m a ges  w e re i m pl e m e n te d, na me ly RG B color  mod e l,  HSI  color  mo del, a nd YCb C r col o r mo de l. T he ratio of da ma ge ( γ ) w a s chosen as fe atur e to me asure  th e   degr ee of d a m a ge w h ic h cause d  by dis e ases or p e st s. T h is pap er al so show s the  comparis on  of the   results o b tain e d  by the i m ple m e n tin g  in  different  co lor  mo dels, the c o mparis on of res u lts show s go o d   accuracy i n  bot h color  mo dels  and YCb C r co lor spac e is co nsid ered as th e best color  mode l for extracting   the da ma ge d i m a ge.     Ke y w ords : cotton pests an d dise ases, color  mod e l,  i m a ge  process i ng, rati o of da mag e .     Copy right  ©  2013 Un ive r sita s Ah mad  Dah l an . All rig h t s r ese rved .       1. Introduc tion  There a r e m any ha rmful  biologi cal  ha zard s like di seases, p e st and oth e rs h appe ned  throug hout th e crop  gro w i ng pe riod which  ca used  nume r ou s lo sse s  ea ch  yea r , so th correct  identificatio and a c cu rate  analysi s  of  h a rm  wa s t he  first thing i n  t he p r o c e ssin g  of preventi o n   and control in  orde r to achi eve real -tim e, accurate p r e d iction a nd control.   The leaf i s  th e vital orga ns of crop p hot osynthe s i s , a nd al so the  pl ace  wh ere th e pe sts  and di sea s e s  occur fre que ntly. Yutaka Sasa kin jud g ed the ca use  of crop s thro ugh the an alysis  of the refle c ti on spe c tral  curve of the  n o rmal  pa rt an d the di se ase s  pot  part [1,  2]. Chen  Ji aj uan  detecte d the   cotton l eave s  hole  a nd  da maged  e dge s ba sed  o n  th e comp uter vision,  whi c h   can   automatically determi ne the  extent of  cotton pe sts from  the surfa c e [ 3 ].  In contra st to the approa ches  me ntion above, this re sea r ch attem p ts to focuse d on the  cotton im age  whi c h d a ma ged by the  d i sea s e s  o r  p e sts, the  Ma chin e Visio n   techni que s a nd  Image Proce ssi ng m e thod were expl ored in  this p a p e r in  o r de r to  the autom atically dete c tion  of  the cotton im age.       2. Image Preproces sing   The  effect o f  image  seg m entation  di rectly  affects  the perfo rmance of  th target  recognition [4]. Before the image processing, At  first the damaged  image shoul d be cut off, th is   prep ro ce ssin g ca n redu ce  the influen ce  made  by  the  backg ro und.  A polygon th at simila r to t he  edge s of the leaves  wa s u s ed to cut the dam ag ed i m age. The  seco nd prep ro ce ssi ng is im age  enha ncement  whi c h ma de  the image  more  suitabl e for ba ckground  sep a rated and fe atu r e   extract, mean while it ca n el iminate the in fl uence whi c h  made by the outsid e  factors [5].  Image enh an ceme nt app ro ach e s fall int o  two bro ad categori e s: sp atial domain  method and frequ en cy domain  me thods [6]. T h e term  sp atia l domai n refe rs to  the ima ge pla ne it se lf,  and  app roa c hes in thi s   category  are  based  on  direct m anipul a t ion of pixel s  in a n  im ag e.  Freq uen cy d o main p r o c e s sing te chni qu es are ba sed  on modifying the Fouri e r transfo rm of  an   image. T here  is  no  gen eral  theory  of ima ge e nha ncem ent. As fo r th e imag e p r o c essing  ma chi ne  perceptio n, the be st ima ge p r o c e ssi n g  meth o d  would b e  the  yielding th e  best  machi ne  recognitio n  re sults.         Evaluation Warning : The document was created with Spire.PDF for Python.
                               e-ISSN: 2 087-278X   TELKOM NIKA  Vol. 11, No . 6, June 201 3 :  3445 – 34 50   3446 As indi cate d  previously,  the term  spa t ia l domai refers to th aggregate  of  pixels  comp osi ng  a n  imag e. Sp atial dom ain  method s a r e  pro c e dures  that ope rate  dire ctly on th ese  pixels. Spatia l domain p r o c esse s w ill be  denote d  by the expre ssi on:        y , x f T y , x g                                                                                                                                (1)    Whe r e f(x,y) is the input im age, g(x,y) is  the pro c e s se d image a nd  T is an op era t or on f,  defined  over som e  n e igh borh ood  of  (x,y). T he cotton imag e af ter en han ce ment is sho w n i n   Figure 1, it easy to se pa rate and extraction th e foliage shap e a fter the pro c essing of im age   enha ncement  (gray-scal e  t r an sform a tion ), but a lo t of  informatio about the  col o r of di sea s e s   and pe sts  we re lost.       Gra y  image     Enhancement image    Figure 1. The  Cotton Leaf Image after E nhan cem ent       Histo g ra ms  are th e ba si s techniq u e s  fo r the n u m ero u sp atial dom ain p r oce s sing.  Histo g ra ms  manipul ation  is ve ry pop ular i n  ima g e  enh an cem ent. It provi de u s eful im age   statistics  abo ut image, m e anwhile it’s u s eful  in  othe r image  proce ssi ng a ppli c a t ions,  such a s   image com p ression and segmentatio n.  In  Figure  2,   the origi nal i m age  cont ra st is hi ghe r, the  distin ction b e t ween th e pro s pe ct an d the  backg rou nd i m age i s  la rge r , it’s ea sy to segm entation ,   and it p r ovid e the th re sh old for se gm entation.  Ima ge hi stog ram  equali z atio n  pro c e s sing  wa use d  in this  pape r to increase the con t rast  of the i m age, streng then  the ed g e s of ba ckground  image be ca u s e the ed ge o f  backgro und  image is d a rker.         The original imag Image after  histogram  equalization process  Histogram of the  original  image  Histogram of the  image after  histogram equalization  process  Figure 2. Image after Hi sto g ram Equ a lization Pro c e s     Spatial linear filte r ing  Space nonlinear  filter ing  Freque nc y  doma i n filtering  Color filtering  Figure 3. Image after Filtered     Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   e-ISSN:  2087 -278X       Cotton Pest and Di se ases Detectio n ba sed o n  Im age Proce s sing (Qingh ai He 3447 Whe n   we g o t the ima g e s, d ue to t he influe nce  of light inte nsity an d th e sen s or  temperature   and  other factors, th e ima g e  was affe cte d  by n o ise p o llution  whi c made it  ha rd  for  segm entation ,  so the pro c ess of  filtering wa s use d  in this pape to eliminate the influen ce  of  noise. The Fi ltering g ene ral incl ude  sp atial filter ing  and fre que ncy domain filte r ing.  We cho o se   different filter for different image s,but for t he leaf cotton image s which d a ma ged by pest s  or   dise ases, th e  experi m ent  shows  better  result s after spatial linear filteri ng, b u t it  also  lo st a lot  of  details; Spa c e nonli nea filter is a b le  to ac hi eve  better result while  prese r ving the  ba sic  cha r a c teri stics of inform ation, and  conv enient.  Fre q u ency do main  filtering ca n  achieve  better  visual effects, however, fo r machi ne proce s sing  can t achieve a better re sult, for colo r ima ges  colo r filter al so ca n obtain  a better visua l  effect s a nd  machi ne p r o c essing  re sults, poor d e tails  in  the spa c e  no nlinea r filteri n g. In  summ a r y, sp ace n o n linea r filteri n g o r  oth e r m e thod can  be   sele cted to  e x tract the p e s t and  disea s cha r a c teri stics, the sp ace  of linea r filtering, spa c e   nonlin ear filte r ing, col o r filtering  can b e  sele cted  to extract of the whole  le af characte ri stics.  Spatial linear filtering is si mple and fea s ible an d the  result s are g ood. The ima ges after filte r ed  were sh own in Figure 3.      3. Comparis on of the  Col o r Model   3.1. RGB  Col o r Model   The RGB  col o r mod e l is a n y additive color mo del b a se d on the  RGB col o r m odel.  particula RG B col o mod e l is defin ed  by the th re e   chromati cities of the  re d,  gree n, a nd  bl ue  additive p r im arie s, an d can p r od uce  any ch rom a ticity that is t he tria ngle  d e fined by th ose   primary colors.  The thre e compon ent im age nam ely R com pon en t image, G comp one nt image, B  comp one nt image were  shown in Figure 4, we c an d r aw a con c lu sion that the three  comp on ent  have a little  e ffect by the ill umination  of t he light.  T he  White  point of  the ima ge h a s  little effect  on   image p r o c e s sing, the influ ence of the White poi nt  can eliminate i n  later imag e  pro c e ssin g . And   the G comp o nent imag e was u s e d  to th e se gment ati on of the di sease or pe st  image fo rm t h e   origin al imag e.          R component im age  G component im age  B component image    Figure 4. Co mpone nt Image in RGB M odel     3.2. HSI Color Model  The HSI  colo r mod e l [7, 8, 9] is very importa nt and  attractive co lor mo del for image   pro c e ssi ng  a pplication s  b e ca use it re pre s ent col o rs simil a rly  how th e h u m an eye  se nse s   colo rs. T he HSI color m o d e l rep r e s ent s every col o with thre e co mpone nts: hu e (H), sat u rat i on  (S), intensity (I). The equ a t ions u s ed fo r conv e r ting i m age from  RGB colo r spa c e to HSI col o r   s p ac e  ar e :     G B 360 G B H                     ( 2 )     1/2 B)] G)(G (R 2 G) [(R B)] (R G) (1/2)[(R arccos θ                                                                 (3)  Evaluation Warning : The document was created with Spire.PDF for Python.
                               e-ISSN: 2 087-278X   TELKOM NIKA  Vol. 11, No . 6, June 201 3 :  3445 – 34 50   3448 )] , , [min( 3 1 B G R B G R S                                                                                               (4)    3 B G R I                                                                                                                                                     (5 )     As sho w n th e comp one nt image in HSI color mo del in Figure  5, we can  dra w  a   con c lu sio n  th at the differe nce  between  the dise a s e  spot a nd b a ckgroun d is very larg e i n  I  comp one nt i m age. M ean while  I comp onent  ca n eff e ct ively supp ress the  influe nce  which  ca use d   by the noise and strong lig ht. So I comp onent wa u s ed to the seg m entation  of the dise ase spot  image an d the backg rou n d  image.           H component im age    S component image  I component ima ge    Figure 5. Co mpone nt Image in HSI Mo del       3.3. YCbCr  Color Model   The Y C b C color  model  [1 0, 11] h a be en d e fined i n  re spo n se to  increa sing  de mand for digital alg o rithm s  in ha ndling vide o informatio n, and ha s sin c become a  wi dely use d  mo del  in a digital video. It belon gs to the fam ily of television tran smi ssi on col o r mo d e ls. The s color   model s sepa rate RGB (Re d -G ree n -Blu e )  into lumina nce a nd  chro minan ce info rmation an d a r e   useful i n  com p re ssi on a ppl ication s  h o we ver the sp e c ification  of col o rs is  som e what  unintuitiv e The equ ation s  used for  co nverting ima g e  from RGB  color mo del to YCbCr color  model a r e:     B G R 214 . 18 786 . 93 00 . 112 00 . 112 203 . 74 797 . 37 966 . 24 553 . 128 481 . 65 128 128 16 Cr Cb Y                                             (6)    After the Colo r model tran sforme d, the co mpone nts im age were  sh o w ed in the Fi gure  6.  The Y comp onent ima ge  wa s cho s en  as  segm entat ion imag e, b e ca use the d i sea s sp ot a nd  backg rou nd b ound ary is cl ear in this  co mpone nt ima ge and it’s h a s  little affected by light.          Y  compone nt image  Cb omponent  image  Cr ompon ent ima ge  Figure 6. Co mpone nt Image in YCb C Model         Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   e-ISSN:  2087 -278X       Cotton Pest and Di se ases Detectio n ba sed o n  Im age Proce s sing (Qingh ai He 3449 4. Featur e Selection   From  the  abo ve re sea r ch t he b e st  co mp onent im age   were d e termi ned fo r th e e x traction   of disea s e s  o r  pe sts imag e  form  origi nal  image.  The  ratio of da mag e  ( γ ) wa s   c hos e n  as  fe a t ure   in order to m easure  the d egre e  of d a m age  whi c ca use d  by di se ase s  o r   pest s . The featu r wa also  u s ed  to  comp are the   extraction  re sult in  ea ch   colo r m odel   we  don e b e fore  at the  sa me   time. The formula for mea s ure the ratio  of damage  was:     ) % 100 t A A                                                                                                                                      (7)    In this form ula A me an s th e a r ea  of  cotton le af which  ca used  by th e di sea s e s   or pe sts,   and At mean s the total are a  of cotton le af.      5. Experimental Re sults   In the expe ri mental resea r ch, th e d a m age  cotton  pl ant whi c h  ca use d  by the   dise ases   and p e st s we re u s ed to te st the re sult in different  co lor spa c e m o dels. Th e co mputer  we  used   in this pa pe wa DELL  co mputer,  whi c h the  OS i s   Wind ows XP;  the P r o c e s sor i s  Intel  core i5 - 2410M,  2.3G Hz; th e me mory i s  4GB  of sy stem  RAM. The  software  we  use d  is MAT L AB  R20 11a. The  extraction  re sults image a r e sho w n in Fi gure 7 a nd Fi gure 8.          The original imag Extraction in R G model  Extraction in HSI   model  Extraction in  Y C bCr  mode   Total area o f  cotton  leaf  Figure 7. The  Results of Extraction Di se ase s  Cotton Image in Th re e Colo r Mod e l           The original imag Extraction in R G model  Extraction in HSI   model  Extraction in  Y C bCr  odel  Total area o f  cotton  leaf  Figure 8. The  Results of Extraction Da maged  Cotto n Image whi c h cau s e d  by Pests in Th re e Colo Model       The compa r i s on of resul t s sho w s go od accu ra cy  in both col o r mod e ls,  nd the   comp ari s o n  o f  the results i n  the th re color mod e were  showed  in the  Tabl 1. The  dam a ge  ratio ( γ d, ca u s ed by the di sea s e s ) of e a ch  colo r mo dels a r e RG B color mo d e l (81.60% ). HSI  colo r mo del (43.15%), YCbCr  col o m o del (5 8.40%).  The da mag e  ratio ( γ p,  ca use d  by pe st s) of  each color  m odel s are RG B colo r mod e l  (5.29%).  HS I color  mod e l (4.90%), Y C b C colo r mo d e (5.93%). And  every color  model ha s th eir ow n adva n tage s and d i sadva n tage s, such a s  RGB  model is ove r  segme n ted, the are a  of  the image di se ase s  is too la rge.        Evaluation Warning : The document was created with Spire.PDF for Python.
                               e-ISSN: 2 087-278X   TELKOM NIKA  Vol. 11, No . 6, June 201 3 :  3445 – 34 50   3450 Table 1. The  Comp ari s o n  of the Results in the Three  Colo r Mod e ls  Damage r a tio  RGB model   HSI model  Y C b C r mod e γ d 81.60%   43.15%   58.40%   γ p 5.29%   4.90%   5.93%       6. Conclusio n s   In this pape r, a method to measure the damag ratio  of the cotton leaf whi c h ca use d  by  the disea s e s   or p e st s ba sed on  ma chi ne visio n  an d  image  pro c e ssi ng  wa s p r ese n t. The  re sult  sho w s the im age e nha nce m ent an d im age filteri ng  we u s e d  in t h is p ape ca n get a  dam aged   image with  strong featu r e s It sho w goo d accu ra cy in  extractin g  th e dam age d i m age fo rm th e cotto n imag e in three   different col o r model (RGB 、、 HSI Y Cb Cr), and the  co mpari s o n  sh o w s that Ycb c r color m odel i s   the best color model for extractin g  in this paper. Th e ratio of damag e ( γ ) we  cho o se is  reliabl e.  The re sult s i s  just fro m  indoo r expe ri ment, whe n  it come into  real u s e, du e to the  rand om noi se  interfere n ce  and cotto n leaf shado ws e x ist, the accu racy to mea s ure the de gre e   of dama ge m a y slo w  d o wn, so th e fu rther  re sea r ch  need fo cu se d  on the  alg o ri thm to imp r o v the accuracy  and sta b ility to  measure the degree of d a mage.       Akno w l e dge ment  This study was by  su ppo rted  by  th e Nation al Und e rg rad uate T r ainin g  Programs fo Innovation an d Entreprene urship of Chi na (No. 1110 7591 6).       Referen ces   [1]  Sasaki Y, Oka m oto T .  Auto matic dia g n o si s of pla n t dis ease  2 reco gn ition  bet w e en  hea lth y  an d   dise ased l eaf.  Journ a l of the  Society of Agri cultura l  Machi n ery.  61(2): 119 -126.   [2]  Serna Jr DG, Pinto F A C, Que i roz DM, Vi ana   PA.  F a ll Arm y   w o rm d a mag e d  maiz e p l a n t i dentific atio n   usin g dig i tal im ages.  Biosystem s Engineering . 2003; 8 5 : 44 9-45 4.  [3]  Che n  Jia j u an,  Ji Sho u w e n,  Li Ju an, Z h a o  X ued u. Auto matic Meas ure m ent of Da ng er De gree  of   Cotton Ins e ct Pests Usin g C o mputer V i si o n T r ansactio n s  of the C h i n ese Soc i ety of  Agricu ltura l   Engi neer in g.  2001; 02: 1 57-1 60.   [4]  Jun Sun, Yan  W ang, Xi ao ho ng W u , Xia o d ong Z h a ng, H ong ya n Gao. A Ne w  Ima ge  Segme n tatio n   Algorit hm and I t s Applicati on i n   Lettuce Obj e ct Segmentati o n.  TELKOMNIKA.  2012; 10( 3 ) : 557-56 3.  [5]  Hans han  Li, Z h i y o ng L e i. Re search o n  Infra r ed Sp ecia l F a cula Vi e w  Me a s ureme n t Meth od Bas ed o n   Image Proc es sing T e chn o lo g y T E LKOMN I KA Indon esia n Jour na l of E l ectrical  Eng i n eeri n g . 20 12;  10(6): 14 22- 14 29.   [6]  Gonzal ez R C , W ood  RE. D i gital  Imag e P r ocessi ng. T h ird Ed ition.  Bei J ing: P ubis h i n g H ouse   o f   Electron ics Ind u st y .  20 10.   [7]  Doutre  C,  Nasi opo ulos  P, K o n s tantinos  N  Pla t ani oti. A  F a st  Demos a icki ng  Method  Dir ectl Prod uci n g   YCbCr 4:2:0 O u tpu.  IEEE Transactions on Consumer Electr onics.  20 07; 53 (2).  [8]  Sanj a y  Kr, Si n gh  DS, Ch au h an, Ma ya nk V a tsa, Ric ha S i ngh. A  Ro bust  Skin  Co lor B a sed  F a c e   Detectio n Alg o r ithm.  T a mkan g Journ a l of Sc ienc e an d Engi neer ing.  2 003;  6(4): 227- 23 4.   [9]  Nabi ye v V, G üna A. Pro b l e ms   of C y ber netics an Inf o rmatics.  In V .  Nabiyev (E d.).  To w a r d a   biom etric purp o se ima ge filter  acco rdi ng to skin detecti on. 2 008; 10- 12.   [10]  Sun H u i- xi an,  Z hang Y u -h ua,  Luo F e i-lu. C o lo edg e d e te ction b a se d on  HSI color s p a c e.  Optical  T e chni que.  2 0 09; 35(2).   [11]  Kekre HB, S u d eep  D, T hepad e,  Parkar A. P e rformanc e An al ysis  of Kekre ' s Media n  F a st Search.  In  H. B. Kekre ( E d.).  Kekre' s Centro id F a st Search an d Exh austiv e  Se arch Use d  for Colori ng   a   Gra y sca le Ima ge. 201 0.   Evaluation Warning : The document was created with Spire.PDF for Python.