Indonesian J ournal of Ele c trical Engin eering and  Computer Sci e nce   Vol. 2, No. 2,  May 2016, pp . 426 ~ 430   DOI: 10.115 9 1 /ijeecs.v2.i2.pp42 6-4 3 0        426     Re cei v ed  Jan uary 16, 201 5 ;  Revi sed Ap ril 12, 2016; Accepted Ap ril 26, 2016   Weed Detection Using Fractal-Based Low Cost  Commodity Hardware Raspberry Pi       Mohamad Iq bal Surians y ah* 1 , Heru S u koco 2 , Moh a mad Solah udin 3   1 Departme n t of Computer Sci ence F a cu lt y  of  Natu ral Sci enc e and Math em atics, Pakuan  Univers i t y Indon esi a 2 Departme n t of Computer Sci ence F a cu lt y  of  Natu ral Sci enc e and Math em atics, Bogor Ag ricultura l   Univers i t y , Ind ones ia,     3 Department o f  Mechanic a l a nd Bios ystem  Engi neer in g, F a cult y of Agric u ltura l  Engi ne e r ing a nd  T e chnolog y, B ogor Agr i cultur al Univ ersit y , Indo nesi a ,   addr es, telp/fa x of instituti on/ affiliati on   *Corres p o ndi n g  author, e-ma i l : mohama d .iq bal@ u n pak.ac. id 1 , hsrkom@ip b .ac.id 2 , msoul 9@ ya hoo.com 3,         A b st r a ct   Conv entio na w eed contro l s ystem is  usu a l l y use d  by spr a yin g  her bici d e s un ifor mly th roug hout   the lan d . Excessive use of h e rbici des o n  a n  ong oin g   basi s  can produc e che m ic al w a ste that is harmf ul to   pla n ts and s o il.  T he ap plic atio n of prec isio agric ulture  far m i ng i n  the  det ection  process  in ord e r to co ntro l   w eeds us ing   Co mp uter Vis i on On  Farm  beco m es i n ter e sting,  but it  still h a s s o me  pro b le ms  du e to   computer  si z e   and  pow er  con s umptio n. Ras pberry  Pi  is o n e  of th mi nic o mputer  w i th l o w  price  an l o w   pow er co nsu m ption. H a vi ng  comput i ng  like  a d e sktop c o mp uter w i th th e op en s ourc e  Lin u x o per ati n g   system c an  be  used  for i m ag e proc essi ng  a nd w e e d   fracta l di mensi on  pr ocessi ng  usin g  OpenCV  li brar and  C pr ogr a m mi ng. T h is  re search r e su lts the b e st  fractal  co mput ation  ti me  w hen  perfo rmi ng th e i m ag e   w i th dimens ion  si z e  of 1 28 x  128  pixe ls. It is abo ut  mil l i s econ ds. F u rthermore, the  av erag e spe ed r a ti o   between personal comput er  and Raspberry  Pi is 0.04 times faster . The use of Ras p berry Pi is cost and  pow er consu m ption effici ent c o mpar ed to per sona l co mput e r   Ke y w ords  :  W eeds D e tectio n ,  Comp uter Vis i on, F r actal, Ra spberry Pi         Copy right  ©  2016 In stitu t e o f  Ad van ced  En g i n eerin g and  Scien ce. All  rig h t s reser ve d .       1. Introduc tion  Farm ma nag ement syste m s ba sed o n  informat ion t e ch nolo g y has bee n wid e ly used to   obtain o p timum be nefit, increa se the   efficien cy of agri c ultu ral  manag eme n t [1], protectin g  the   environ ment  [2] and incre a sin g  ag ricult ural p r od ucti vity [3]. Farmers  nee d info rmation from  a   wide  ran ge o f  ICT tools to  identify, analyze, and ma nage info rma t ion in sp atial  and tempo r al  diversity [4] a s  well as th e  spe c ific  cha r acteri st ics of  the land [5], so that the d e ci sion -ma k in g   process to  be more preci s e during soil preparat ion, seed  selection,  fertilizer regulation,  manag eme n t pesti cide s, watering  sched ules  water a n d  wee d  mana gement [6].  The p r o c e ss  of identificati on of weed s in t he field i s  very imp o rt ant to dete r mine the  effective cont rol of this du e  to lack of p r o per  weed  co n t rol will cau s e  improp er u s e of herbi cid e s inefficien cie s   co st, time and energy [7]. Convent io na l weed  control system i s  usu a lly done  by  spraying  herbicid e uniformly throug ho ut the lan d   [8 ], it results in  exce ssive  u s e of  herbici des  will pote n tially generate waste in th e fo rm of c hemi c al re sidu es,  emission s to  air an d soil [9].  Dep end ence  on ch emicals  also h a rm h u m an  health [1 0] and the en vironme n t [11].  The he rbici d es can be re duced by the applicat io n of preci s io n farmin g appli c ation by  spraying on right land by detectin g  we eds on la nd.  Therefore, preci s ion farmi ng is nee ded  to  determi ne th e level of  we ed vegetatio n  in orde r to   control th e co ndition s an need s of th plant  based on the  spe c ific ch a r acte ri stics of the land  [12]. Precisio n farmin g is the  applicatio n of  informatio n tech nolo g y in agri c ultural  manag em e n t system s that allow  rig o rou s  treatm ent  (preci se tre a tment) ag ribu siness chain from upst r eam  (on farm) to downs t ream (off farm) [13].  Comp uter vision a s  one  o f  the p r e c isi o n farm i n g  ap plicatio ns is  very promi s i ng [14]  whi c ca n be  used fo r the   identificatio and  cla s sifi ca tion of pl ants.  Ope n CV i s   a library Pu bl ic  License can  be used to detect the  im age of  weeds.  Weed detecti on in   realtime is  still difficul t  to   impleme n t in the field due  to need a l a rge pla c e a n d  the use  of la rge el ectri c  p o we r. The n e ed  for sp ecifi c ation of minico mputer a nd small pow er consumption has  attr acte d  the attention of  Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 25 02-4 752    IJEECS  Vol.  2, No. 2, May 2016 :  426 –  430   427 some  re sea r che r s to crea te a single b oard  comp ut er and a  cre d it card  size d using the  open  sou r ce Li nux  operating  system whi c h  is  calle d t he  Ra spb e rry Pi [1 5]. The  Ra sp berry Fou nda tion  laun che d  the  latest  Ra sp b e rry Pi  produ ct in  t he fo rm  of Singl e Bo ard  Compute r , a  sm all-sized   comp uter wit h   low po we consumpt ion,  3.5 W  (5 V a n d  0.75 A) [16] . The o r iginal  Ra spb e rry Pi is  based on A R M1176 JZF - 700 M H z p r o c e s sor, Video Core IV GPU, and wa s o r i g inally shi ppe d   with 25 6 me gabytes  of RAM, later  upgrade (m odel s B and  B+) to  512  MB [17]. Th e   developm ent  of a mini compute r  Ra spberry Pi has ope n ed u p  great opp ortunities in th e   comp uting  system to be  a pplied in  a n u mbe r  of   re sea r ch a r ea s [18] and  ca n be o ne of  the  solutions to be implemented  easily as functionally has th e ability like a desktop  computer.      2. Rese arch  Metho d     2.1. Image Acquisition    At this sta ge,  we ed s ima g e  is a c qui red  usi ng a  digit a l came ra. T he d a ta u s ed  in thi s   study i s  a  collectio n of i m age s o b tai ned  we ed  pl ants f r om th e lab o rato ry  of Me ch ani c al  Enginee ring  and Biosy s te ms IPB, Facu lty  of Agricultural Te ch nolo gy IPB.  In this study, the image of wee d whi c is  used is a  wide vari ety of dimensi o n a l image  as can be  see n  in Tab l e 1. The maximum si ze  of 0.3 MB image is a s sumed a s  the  con s cientio us size imag e t o  perfo rm filt ering  proc es s .  Test ca rri e d  out  mainly   on lan d  t h at   has   not  bee n sprayed  by  h e rb icide befo r e planting pe riod (P re Eme r ge ), imag data captu r e d  i s   planting p e rio d  1-4 wee ks t hat is don e b e ca use in tha t  span it is the right time a s  a critical pe riod  of weed  com petition with the main cro p     Table 1. Imag e Dimen s io n   Image  Dimension  (Pixel)  128 x 1 28  256 x 2 56  380 x 3 80  480 x 4 80    512 x 5 12      2.2. Weed s Image Filtrati on  The ima ge  wa s taken  and a nalyze d  to det erm i ne the  colo r of its con s tituent  comp one nts.  Base d on  the colo r co mpone nts  are  then determined param et ers filtratio n  to  sep a rate th backg rou nd i m age of the  staple  crop s i n  bina ry (bla ck  and  white ) . Data array  o f   pixels that sto r e bina ry valu es processe d  image  usi ng  fractal dim e n s ion a nalysi s ,  can be  see n  in   figure 1. Assessment of the huma n  eye is use d   as  a ben chma rk to determine  the accura cy  of  the perfo rma n ce  system  which i s  built.          Figure 1. Image filtering p r oce s s we ed s into binary da ta      2.3. Fractal  Dimension Analy s is   Fra c tal di me nsio n a nalysi s  i s  p e rfo r me d by  fragme n t ation of the  i m age  that h a s  b een  difilterisa s i int o  a re ctang ul ar shape m e asu r ing  s. Th en cal c ul ate the numb e r of  squa re s N  (s)   that contain s  the white co lor (re s ults fil t ration pl a n t). This calculat ion is repe ated with different  values of s a s  much as 1 0  intervals. Th e next step is  to plot the va lue of log N (s) to the valu e of  Evaluation Warning : The document was created with Spire.PDF for Python.
IJEECS   ISSN:  2502-4 752     Wee d  Dete cti on Using F r a c tal-Ba se d Lo w Co st Com m odity Hardware …   (M. Iqbal Suriansy ah)  428 log (1 / s) a nd dete r min e  the sh ape   of the li nea r reg r e ssi on  equatio n y = ax + b. F r a c tal  dimen s ion i s  a value on th e linear  reg r e ssi on eq uatio n.      3. Results a nd Analy s is    3.1. Image Filtering   Comp utation a l image of p r ep ro ce ssi ng  filter is  obtain ed by comp a r ing an d testi ng as  N   = 10 trial s  for  each image o n  the Ra spb e rry Pi and PC, can be seen  in Table 2 an d Table 3.       Table 2. Imag e filtering on  Ra spb e rry Pi  Image Dimension (Pixel)  N Testing (Seco nd)  1 2  4 5  6 7  10  128  1 2 8   0.1  0.1  0.13  0.11 0.11  0.11 0.12  0.12  0.1 0.11  256  2 5 6   0.48 0.49  0.45  0.45 0.43  0.44 0.48  0.45  0.47 0.44  380  3 8 0   0.89 1.09  1.04  0.93 1.18  1.12 1.04  0.98  0.92 0.89  480  4 8 0   1.47 1.79  1.53  1.63 1.78  1.52 1.89  1.56  1.41 1.47  512  5 1 2   1.72 1.98  1.8  2.21 1.65  1.8 1.69  1.81  1.78  1.8      Table 3. Imag e filtering on  PC  Image Dimension (Pixel)  N Testing (Seco nd)  1 2  4 5  6 7  10  128  1 2 8   0.01 0.02  0.01  0.01 0.01  0.01 0.01  0.01  0.02 0.01  256  2 5 6   0.02 0.02  0.02  0.02 0.02  0.01 0.02  0.03  0.02 0.02  380  3 8 0   0.04 0.04  0.04  0.05 0.04  0.04 0.04  0.05  0.04 0.04  480  4 8 0   0.06 0.06  0.05  0.06 0.05  0.05 0.05  0.05  0.06 0.05  512  5 1 2   0.07 0.07  0.06  0.06 0.06  0.07 0.06  0.06  0.06 0.06      From th compa r ison o f  the prep ro ce ssi ng com putation of  i m age proce s with  Ra spb e rry Pi  and the PC can be ge nera t ed averag e value which ca n be se en in  Table 4.       Table 4. The  averag e time of image filtering on Raspb e rry Pi and P C   Image Dimension (Pixel)  Computation (Se c ond)  Raspberry PC  128 x 1 2 8   0.111   0.012   256 x 2 5 6   0.458   0.020   380 x 3 8 0   1.008   0.042   480 x 4 8 0   1.605   0.054   512 x 5 1 2   1.824   0.063             Figure 2. Co mpari s o n  of image filterin g  on Ra spb e rry Pi and PC  Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 25 02-4 752    IJEECS  Vol.  2, No. 2, May 2016 :  426 –  430   429   The  re sults  of the ab ove expe rimen t s u s in g   R a s p be rr y a n d PC   s h ow  th a t  the  comp utationa l time of image prepr ocessing filter i s   worth  polyno m ial that is close to 1  whi c h   mean s that the com puting  time propo rtional to t he si ze of the ima ge, the large r  image is u s ed   more a nd m o re  comp utin g time requi red. In gen e r al, PC co m p utation time  is faster th an   Ra spb e r r y  Pi.    3.2. Fractal  Dimension Analy s is   In the process of comp utin g the fra c tal d i mens i on a n a l ysis  ca rrie d  o u t by the processing   results of  ima ge  filterin g weed s su ch  as bina ry data  i n  ra sp be rry p i , can  be  see n  in T able  5  by  usin g fractal  algorith m s u s ing C.       Table 5. Co m putational results usi ng fra c tal on Raspb e rry Pi and P C   Image Dimension  (Pi x el )   Raspberry PC  Computation   (ms )   Fractal  Computation   (ms )   Fractal  128 x 1 2 8   0,9  0.1  0,9  256 x 2 5 6   12  1,1  0.5  1,1  380 x 3 8 0   37  1,3  2.1  1,3  480 x 4 8 0   74  1,7  4.2  1,7  512 x 5 1 2   93  1,8  1,8      The re se arch  result s in T able 5 shows be st  fractal  computatio n  time in Raspbery Pi  whe n  perfo rm ing the image  with dimen s i on si ze of 12 8 x 128 pixels. It is about 7 millise c on ds.            Figure 3. Co mpari s o n  of computation ti me fractal im age on  Ra sp berry Pi and PC      The re sult s of the above experime n ts show th at the fractal comp u t ational time on a PC  is fast er tha n  the  Ra spb e rry Pi. Fu rt herm o re, th e  avera g sp eed  ratio b e t ween  pe rso nal  comp uter  and  Ra spb e rry Pi is 0.0 4  time s faster.  T he  compa r ison of  the sp ecifi c ati o ns i n  Ta ble  is 4 : 1 and the ratio of the power con s u m ption of  34 : 1 is more effi cient to use Rasp berry Pi.       Table 6. Gen e ral comp ari s on between  Ra spb e rry Pi  and PC  Specification  Raspberry  Pi   PC  Comparison   Processor speed  700 MHz x 1 co re  1,5 GHz  x 2 core   4 : 1  RAM Size  Watts  512 MB  3.5   2 GB   65  4 : 1  16 : 1   Price  Rp 500.000   Rp 4.000.00 0   4 : 1      The averag e rati 4 : 1  Evaluation Warning : The document was created with Spire.PDF for Python.
IJEECS   ISSN:  2502-4 752     Wee d  Dete cti on Using F r a c tal-Ba se d Lo w Co st Com m odity Hardware …   (M. Iqbal Suriansy ah)  430 4. Conclusio n   The  avera g e  ratio  bet wee n  the  sp eed   of t he P C   Rasp berry Pi  and f r actal  p r oce s s i s   0,04 time s fa ster. T he b e st filtering com putation  that  can  be  done   by Ra spb e rry Pi is 5 12 x 5 12  Pixels. The u s e of Ra sp be rry Pi is co st and po we r co nsum ption eff i cient compa r ed to perso n a comp uter       Referen ces   [1]    Blackmor e S. Precisio n F a rm ing: an ov ervi e w .   Agric u ltur al Engi neer . 1 994 ; 49(3): 86-88.   [2]    Kuhar JE. T he  Precisio n-F a rm ing: Guid e for Agricult urist.  Illi nois: Joh n  De e r  Publis hin g .   1997.   [3]    Shibusa w a S,  Anom IM, Sas ao A, S a kai K, Hach e C.  Sa mplin g strate gi esin s o i l  ma ppi ng  w i t h  r eal - time soi l  sp ectroph otometer.  Di d a lam: Inte ll ige n t Co ntrol f o r Agric u ltur al  Appl icatio n.  Pr ocee din g  o f   2nd IF AC-CIGR  W o rkshop o n , Bali Indo nes ia 22- 24 Au gus t 2001. Bali: IF AC-CIGR. 200 1: 40-43.   [4]    Sola hud in  M. Peng emb ang a n  meto de  pe n gen dal ia n g u l m a p ada  p e rtani an  presis berb a sis m u lt i   age n komp uta s ion a l. Diserta si In stitut Pertania n  Bog o r. 20 13.   [5]    Mc Bratne y,  AB, Prongl e,  MJ.  Spatial V a ria b il ity in S o il I m pl ic ati o n  for Precisi o n  Agricu lture Procee din g  Precisio n Agric u lt ure, BIOS  Scientific Publ iser L t d, Oxford. 199 7.  [6]    F ahad S h a hba z Khan, Sa ad  Razza q, Kashi f  Irf an, F ahad  Maqb ool, Ahm ad F a ri d, Inam  Illahi  an d   T auqeer ul am in. Dr.  W heat: A W eb-base d   Expert System for  Diagn osis  of Diseas es a nd Pests i n   Pakistani Wheat . Proceedi ng s of the W o rld Con g ress on E ngi neer in g W C E. 2008; 1.   [7]   Solahudin,  Seminar,  K Astika, W Buono  A.  W eeds an Plants R e cog n i t ion us ing F u zzy Clusteri n g   and  F r actal D i m e n si on M e th ods for A u to matic W eed  Co n t rol . Internati o n a l C onfer ence,  the Qu alit Information for  Comp etitive Ag ricultura l  Ba se d Producti on S y stem a nd Co mmerce. 201 0.  [8]    Kargar BAH, Shirzadifar AM.  Autom a tic Weed Detection System   an d Sma r t Herbicid e Sp rayer Rob o t   for Corn Fields.  Proceeding of the 2013 RSI/ISM Inte rnational Conferenc e on  Robotics and  Mechatro nics, T ehran, Iran. 2013.   [9]    Hon g , Sung M i nza n , Li Z han g, Qin.  Detecti on Syste m  of Smart Spr a yer s : Status, Chal len ges a n d   Perspectiv e s . Int J Agric & Biol Eng. 20 12; 5 ( 3).  [10]    Pimente l  D, McLau ghl in  L, Z epp A, L a kita n B, Kraus T ,  Kleinm an P,  et al.  En vi ronm en ta l  an econ o m ic effec t s of reducing  pestici de us e . Bio Scie nce. 1 991; 41( 6): 402 -409.   [11]    Leac h AW , Mu mford JD.  Pes t icide envir on me ntal acco un ting:  A meth od   for  assessi ng the  extern a l   costs of indivi d ual p e sticid e a pplic atio ns.  En vironme n tal Po llutio n . 20 08; 1 51(1): 13 9-1 4 7 .   [12]    McBratne y AB, Prongl e MJ.  Spatia l Varia b i lit y in Soil I m pl ic ation for Prec is ion Agr i cultur e .  Proceed in Precisio n Agric u lture, BIOS Scient ific Pu blis er Ltd, Oxford. 199 7.  [13]    Semin a r KB. Parad i gma P e nda ya g una an  T e knol ogi Inf o r m asi u n tuk Pe rtania n . Prosid ing S e min a r   Nasio n a l  Semi nar Informatika  Pertania n  Indo nesi a . 201 1: 34-42.   [14]    Ste w a r d, B a n d  L T i an.  Re al -time machi ne vision   w eed d e tection.  ASA E pap er No.  9 830 33 (UIL U- ENG-98-7 006).  1998.   [15]   M Richa dson,  S W a llace. Getting Start ed  w i t h  Rasp berr y  Pi . US: O’Reill y .   201 2.  [16]    Rahm an A, M a rdh ani  R. Hi gh Perform a n c Com putin g  on C l uster  a nd Mu lticore   Architecture.   T E LKOMNIKA Indon esi an Jou r nal of Electric al Eng i ne eri n g .  2015; 1 3 (4): 1 408- 141 3.   [17]    Albert Sa gal a, Deni  Lumb a n t oruan, Ep eli n  M anuru ng, Iroma Situmor a ng, Adi Gu na w a n. Sec u r e d   Commun i cati o n  amo n g  HMI  and  Co ntroll er  usin g RC- 4 A l gorithm  an d R a spb e rr y Pi.  T E LKOMNIKA  Indon esi an Jou r nal of Electric al Eng i ne eri n g .  2015; 1 5 (3): 5 26-5 33.   [18]   Ali, Murat et al T e chnical  De velo p m ent a n d  Socioec on o m i c  im plic ations  of the Rasp be rry Pi as  a   Lear nin g  T o o l  in  Deve lo pin g  co untries 5 t h Proce edi ng s of the IEE E  Comp uter  Scienc e a n d   Electron ic Engi neer ing C o mfe r ence (CEE C). 201 3: 103- 108.   Evaluation Warning : The document was created with Spire.PDF for Python.