I nd o ne s ia n J o urna l o f   E lect rica l En g ineering   a nd   Co m p u t er   Science   Vo l.   17 ,   No .   2 Feb r u ar y   20 20 ,   p p .   7 9 3 ~ 8 0 3   I SS N:  2 5 0 2 - 4 7 5 2 ,   DOI : 1 0 . 1 1 5 9 1 /i j ee cs.v 1 7 .i 2 . p p 7 9 3 - 8 0 3          793       J o ur na l ho m ep a g e h ttp : / / ijee cs.ia esco r e. co m   A per for m a n ce a na ly sis  f o r re a l - ti m e  f lo o m o nitori ng  using   i m a g e - ba sed  pro c ess ing       Q ia ny Z ha ng ,   Na t t ha   J ind a pet ch,   Ra kk rit   D ua ng s o it h o ng Duj do w   B ura na pa nichk it   De p a rtme n o f   El e c tri c a En g in e e rin g ,   P ri n c e   o f   S o n g k la Un iv e rsity ,   T h a il a n d       Art icle  I nfo     AB ST RAC T     A r ticle  his to r y:   R ec eiv ed   Ju n   1 ,   2 0 1 9   R ev i s ed   A u g   3 ,   2 0 1 9   A cc ep ted   A u g   1 7 ,   2 0 1 9       No w a d a y s,  v a rio u ima g e - b a s e d   m e th o d h a v e   b e e n   u se d   in   th e   a re a   o m o n it o rin g .   W h e re a th e   p re c i sio n   o f   d e tec ti o n   o b jec ts  a n d   re a l - ti m e   p ro c e ss in g   a re   th e   k e y   issu e s   f o m a n y   a p p li c a ti o n s.  C o n si d e rin g   th e   li m it a ti o n   o f   th e   w o rk in g   e n v ir o n m e n t,   th e   h ig h e c o rre c tn e ss   a n d   f a ste r   o p e ra ti n g   ti m e   c a n   g u a ra n tee   th e   w o rk   e ff icie n c y .   In   th is   p a p e r,   th e   im a g e - b a se d   m e th o d h a v e   b e e n   stu d ie d   to   m o n it o rin g   t h e   sta te  o f   th e   flo o d   in   th e   re a l - ti m e   s y ste m .   T h e   p e rf o r m a n c e   o f   e a c h   i m a g e   p ro c e ss in g   tec h n i q u e   h a s   b e e n   e v a lu a ted   b a se d   o n   a c c u ra c y   a n d   p ro c e ss in g   ti m e .   In   th e   f lo o d   m o n it o rin g   sy ste m ,   th e   v a ri a ti o n   o f   im p o rtan p a ra m e ters   c a n   c a u se   th e   c h a n g e   o f   p e r f o rm a n c e   a n d   th e   e ffe c o f   th e   v a riab le  p a ra m e ters   h a b e e n   d e m o n stra ted   f ro m   th e   e x p e ri m e n re su lt s.  Af ter   c o m p a rin g   to   th e   o th e im a g e - b a s e d   tec h n i q u e s,  c a n n y   e d g e   d e tec ti o n   p re se n ts  t h e   b e st  o n e ,   w h ich   a lso   h a b e tt e re p e a tab il it y   w it h   th e   so u rc e   im a g e   f ro m   d iff e re n t   lo c a ti o n s.   Co n se q u e n tl y ,   th e   im p ro v e d   c a n n y   e d g e   d e te c ti o n   m e th o d   h a b e e n   p ro v e d   th a c a n   w o rk   v e r y   w e ll   o n   th e   re a h a rd w a re   in   th e   o u t d o o e n v iro n m e n t .   K ey w o r d s :   E d g d etec tio n   I m ag s e g m e n tatio n   Mo n ito r in g   s y s te m   No r m a lized   cu ts   R eg io n   g r o w i n g   Co p y rig h ©   2 0 2 0   In stit u te o A d v a n c e d   E n g i n e e rin g   a n d   S c ien c e .     Al rig h ts  re se rv e d .   C o r r e s p o nd ing   A uth o r :   Du j d o w   B u r an ap an ich k it,    Dep ar t m en t o f   E lectr ical  E n g i n ee r in g ,   P r in ce   o f   So n g k la  U n i v er s it y ,   Hat y ai,   So n g k h la  9 0 1 1 2 ,   T h ai lan d .   E m ail: d u j d o w . b @ p s u . ac . t h       1.   I NT RO D UCT I O N     As  w all  k n o w ,   f lo o d s   h a v h u g in f l u e n ce   o n   p eo p le‟ s   d ail y   li f e.   T h f lo o d   o f ten   ca u s es  lo s s   o f   lif e.   A d d itio n all y ,   it  w ill  d estro y   th b u ild i n g s ,   p o llu te   th d r in k i n g   w ater ,   an d   d a m ag t h p o w er   tr an s m is s io n .   I t s   v ital  to   m o n ito r   th s tate  o f   t h f lo o d   f o r   s av i n g   lif a n d   m i n i m izi n g   th lo s s es.  T h er ar m an y   m eth o d s   ca n   b u s ed   f o r   th f lo o d   m o n ito r i n g ,   b u i n   th liter at u r r ev ie w   f r o m   t h r ef er en ce   [ 1 - 9 ] ,     th i m a g e - b a s ed   m et h o d s r e g io n   g r o w i n g ,   ca n n y   ed g d e tectio n   a n d   n o r m alize d   cu ts   ar b etter   th an   t h e   o th er s   b ased   o n   t h ac h iev ab i lit y   a n d   ti m el in e s s .   T h ese   i m ag e - b ased   m et h o d s   w i ll  b m ad s i m u latio n   o n   MA T L A B   in   t h b eg i n n i n g   an d   th m et h o d   w h ic h   h as  t h b est  p er f o r m an ce   w ill  b k ep an d   i m p r o v ed .     T h i m p r o v ed   m eth o d   i s   o u r   p r o p o s ed   m et h o d ,   w h ich   w il b i m p le m e n ted   i n   th e   r ea e m b ed d ed   s y s te m .     I n   th is   p ap er ,   co n s id er i n g   th e   f ast   s p ee d   o f   t h f lo o d in g ,   t h e   p r o p o s ed   m et h o d   ca n   d etec t h f lo o d   ar ea   w i th   th i m ag e - b ased   m e th o d   in   r ea l ti m b ased   o n   t h e m b ed d ed   s y s te m .   I n   th r ef er e n ce ,   th r elate d   p ap er s   ar [ 1 5 ]   an d   [ 7 ] .   P a p e r   [ 1 ]   p r o p o s ed   m eth o d   ca n   d etec th e   f las h   f lo o d   w i th   t h f ast   p r o ce s s i n g   s p ee d   b ased   o n   th s tati o n a r y   s u r v ei llan ce   ca m er as,  wh ich   ca n   b u s ed   to   th u r b an   ar ea s .   T h p r o ce s s   o f   d etec tio n   i n cl u d es  t h b ac k g r o u n d   s u b tr ac tio n ,   m o r p h o l o g ical  clo s i n g ,   an d   ca n n y   ed g d etec tio n ,   i n   w h i ch   th ca n n y   ed g d etec tio n   h as  g r ea e f f ec ts   o n   d is ti n g u i s h i n g   th f lo o d   ar ea   w it h   t h o th er s   b ased   o n   th ed g d en s it y .   P ap er   [ 5 ]   ca n   m o n ito r   an d   id en tify   th f lo o d   au to m atica ll y   w it h   th p r o p o s ed   m et h o d   b ased   o n   r ea l - ti m v id eo   i m a g es.  T h e   i m ag e s   ar ca p tu r ed   f r o m   th d ig ital  ca m er a.     T h p r o p o s ed   m et h o d   in cl u d e s   m ea n - s h i f t   an d   r e g io n   g r o w i n g ,   w h ich   ca n   b u s ed   i n   b ad   w ea th er   co n d itio n   s u c h   a s   r ai n y .   T h r eg io n   g r o w i n g   m et h o d   ca n   p ar titi o n   th p ix el s   i n to   m ea n in g f u p ar ts   b ased   o n   th e   s ee d   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  17 ,   No .   2 Feb r u ar y   20 20  :   7 9 3   -   8 0 3   794   p o in ts   a n d   g r o w   r u les.  P ap er   [ 7 ]   aim ed   to   m o n ito r   th e   f lo o d   w it h   a   s p ec i f ic  ar ea   a u to m a tic all y .   T h i m a g e s   ar ca p tu r ed   f r o m   th C C T an d   in f r ar ed   ca m er a.   T h p r o p o s ed   m i n i m al  s p an n i n g   tr ee   m et h o d   b elo n g s   to   th g r ap h - b ased   s e g m e n tatio n   m e th o d ,   w h ic h   ca n   b u s e d   to   d etec th f lo o d   ar ea   w ith   s ca le  an d   w it h     n o   s ca le.   T h r o u g h   th s t u d y   o f   t h r e lated   p ap er s ,   th C an n y   ed g d etec tio n ,   r eg io n   g r o w i n g   m et h o d ,     an d   g r ap h - b ased   m eth o d   ar s u itab le  f o r   th e   f lo o d   m o n ito r in g ,   w h ic h   b elo n g   to   t h i m a g e - b a s ed   m et h o d s .   T h ed g d etec tio n   m et h o d s   u s u all y   f in d   t h p lace s   o f   th e   ed g es  t h r o u g h   t h ab r u p ch an g e s   o f   t h p ix e l   in te n s it y   [ 10 11 ] ,   w h ich   h as  t h p o ten tial  to   f in d   th b o u n d ar ies  o f   th w a ter   ar ea .   W h ile  th r eg io n   g r o w i n g   m et h o d   ca n   g r o u p   th p ix el s   in to   d if f er en p ar ts   ac co r d in g   to   th s i m ilar it y   o f   th e m ,   w h i ch   is   b ased   o n   th e   s ee d   p o in an d   g r o w   r u le s .   T h g r ap h - b a s ed   s eg m e n tatio n   is   p o p u lar   tr en d   in   th i m a g s eg m e n tatio n   ar ea   f o r   r ec en y ea r s ,   w h ic h   ca n   p a r titi o n   o n e   g r ap h   i n to   m an y   s u b - g r ap h s   t h at  ea c h   g r ap h   r ep r esen t s   t h i n ter este d   m ea n in g f u o b j ec [ 7 ] .   I n   o r d e r   to   f i n d   t h m o s s u itab le  m et h o d   f o r   f lo o d   m o n i to r in g ,   t h th r ee   i m a g e - b ased   m et h o d s   w ill  b co m p ar ed   o n   th M A T L A B .   A cc o r d in g   to   th co m p ar i s o n   s tan d ar d ,   th e   m et h o d   w h ic h   h a s   th b est  p er f o r m an ce   w ill  b s elec ted   an d   i m p r o v ed .   T h im p r o v ed   m et h o d   is   o u r   p r o p o s ed   m et h o d ,   w h ic h   h as  b ee n   i m p le m en ted   o n   th e   r ea h ar d w ar f o r   test i n g .   I n   th is   p ap er ,   th p r o p o s ed   m et h o d   ca n   ac h iev t h g o al  o f   d etec ti n g   f lo o d   b ased   o n   th e m b ed d ed   s y s te m   w it h   t h li m it  m e m o r y   i n   th r ea o u td o o r   en v ir o n m e n t.   T h r em a in d er   o f   th is   p ap er   i s   as  f o llo w s .   T h i m a g e - b ase d   tech n iq u es   h a v b ee n   i n tr o d u ce d   in   t h s ec o n d   p ar t,  w h ich   i n cl u d ed   t h r ee   s u b - s ec tio n s   ab o u t h r eg io n   g r o w i n g ,   ca n n y   ed g d etec tio n   a n d   g r ap h - b ased   m et h o d s .   I n   th th ir d   p ar t,  th ex p er i m en o f   th th r ee   m e th o d s   w ill  b m ad o n   MA T L A B   b ased   o n   t h co m p ar i s o n   s tan d ar d   w it h   th ac c u r ac y   an d   p r o ce s s i n g   ti m e.   T h m et h o d   th at   h a s   t h b est  p er f o r m a n ce   f r o m   t h th ir d   p ar w ill  b e   i m p r o v ed   an d   i m p le m e n ted   o n   th r ea e m b ed d ed   s y s t e m   i n   th o u td o o r   en v ir o n m e n i n   th f o u r t h   p ar t.  L ast  b u n o least,  t h d is cu s s io n   w h ic h   p r esen ted   in   th last   p ar w a s   s u m m ar ized .       2.   S T UDY   OF   I M AG E   P RO C E SS I N G   T E CH NI Q U E S   Fro m   th s t u d y   o f   r elate d   w o r k ,   th th r ee   i m a g e - b ased   m et h o d s   ar in ter esti n g   a n d   m ea n in g f u l,   w h ic h   ar s u i tab le  f o r   f lo o d   m o n ito r in g   b ased   o n   th f ea s ib il it y   a n d   ti m el in e s s .   T h f lo o d   m o n ito r i n g   w i ll  b e   i m p le m en ted   o n   t h e m b ed d ed   s y s te m   i n   t h r ea o u td o o r   en v ir o n m e n t.  I n   th i s   s t u d y ,   t h e   v ital  p ar a m eter   o f   ea ch   m et h o d   is   also   n o ticed   f o r   ac h iev i n g   b etter   m o n ito r i n g .     2 . 1     Re g io G ro w ing   T h r eg io n   g r o w i n g   a l g o r ith m   o p er ates  t h r o u g h   g r o u p i n g   t h p ix e ls   i n to   t h d i f f er e n r eg io n s ,     w h ic h   is   b ased   o n   th p r ed ef in ed   g r o w   cr iter io n   [ 12 - 14 ] .   T h s ee d   p o in is   s et  in it iall y   at  th p lace   o f   th e   in ter esti n g   o b j ec b y   o u r s e lv e s .   Af ter   p laci n g   th s ee d   p o in t,  th g r o w t h   w il s tar f r o m   t h s ee d   p o in to   it s   n eig h b o r h o o d   f o r   g ath er i n g   th h o m o g e n eo u s   r e g io n s .   W h en   ap p l y i n g   t h r eg io n   g r o w i n g   w it h   f lo o d   m o n ito r i n g ,   t h p r o ce s s   is   s h o w n   as  f o llo w s .     I n   Fi g u r 1 ,   t h R GB   i m a g w il b c h a n g ed   to   th e   g r a y s c ale  i m ag e   in   t h b e g in n i n g   t h r o u g h   s u m   th w eig h o f   t h th r ee   co lo r   co m p o n e n t s .   T h f o r m u la  is   i n   ( 1 ) .   T h s ee d   p o in w ill  b p lace d   in   th f lo o d   ar ea   in   th i m a g f o r   g etti n g   t h p ix el  i n te n s it y .   A cc o r d in g   to   th g r o w   cr iter io n ,   i f   t h d i s tan ce   b et w ee n   t h s ee d   p o in an d   it s   n ei g h b o r h o o d   is   lo w er   t h an   t h m a x i m u m   i n ten s it y   d is ta n ce   ( Mid ) ,   th n eig h b o r h o o d   p ix el   w il b g r o u p   in to   th s a m r e g io n   w it h   t h s ee d   p o in t.  I f   n o t,  th n eig h b o r h o o d   p ix el  w i ll  n o b co n tain ed .   T h Mid   is   th e   v ar iab le  o f   t h e   r eg io n   g r o w in g   m et h o d ,   w h ic h   d ef i n e s   t h p ix el   s i m ilar it y .   T h ch an g es  i n   th e   v ar iab le  w ill  a f f ec t h r es u lt  o f   th e   r eg io n   g r o w i n g   m e th o d .   I n   th e   en d ,   t h f lo o d   ar ea   w i ll  b th s eg m e n ted   r eg io n   w it h   t h s ee d   p o in t.  T h g r o w i n g   p r o ce s s   is   iter ati v t h at  all  t h p ix el s   in   t h i m ag w il l b ca lcu lated .       .         R    .           .               ( 1 )           Fig u r 1 .   P r o ce s s   s tep s   o f   th r eg io n   g r o w i n g   m et h o d         R G B   t o   H S V   c o nv er s i o n   I np ut   i m ag e   S el ec t i ng   t he   s eed   po i n t     S et t i ng   t h m a di s t a nc   O ut pu t   i m ag e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       A   p erfo r ma n ce   a n a lysi s   fo r   r e a l - time  flo o d   mo n ito r in g   u s in g   ima g e - b a s ed   p r o ce s s in g   ( Qia n yu   Zh a n g )   795   2 . 2 .     Ca nn y   E dg Det ec t io n   T h ed g d etec tio n   is   co m m o n l y   u s ed   m et h o d   f o r   im a g s eg m en tat io n ,   w h ic h   o p er ates  th r o u g h   f i n d in g   th s u d d en   c h a n g e s   b et w ee n   t h p ix el  i n te n s it y .   Am o n g   t h d if f er en ed g d etec tio n   m e th o d s   [ 10 - 1 6 ] ca n n y   ed g d etec tio n   h as  ad v an ta g e s   i n   t h a s p ec ts   o f   l o w   er r o r   r ate,   w ell   p o s itio n i n g   an d   s i n g le  ed g e   r esp o n s e,   w h ic h   ca n   b u s ed   to   f in d   th ed g o f   th w ar ar ea   in   th is   r esear c h .   T h p r o ce s s   o f   ca n n y   d etec tio n   m et h o d   is   s h o w n   i n   Fi g u r 2.   Fro m   Fi g u r e   2 ,   t h i n p u t   i m ag w ill  b tr an s f o r m ed   in to   th e   g r a y s ca le  i m a g e.   T h Ga u s s i an   f ilter   i s   u s ed   f o r   r e m o v in g   t h n o is e   an d   s m o o th i n g   t h i m a g e.   T h g r ad ien t   r ep r esen ts   t h d if f e r en ce s   b et w ee n   t h e   p ix el  in te n s it y   a n d   th ed g ca n   b f o u n d   b y   s ea r ch i n g   th m ax i m a g r ad ien o f   th i m a g e.   T h d ir ec tio n   an d   m ag n it u d o f   t h p i x el  ca n   b g o b y   ca lc u lati n g   t h f i n it e - d if f er en ce   o f   t h f ir s t - o r d er   p ar tial  d er iv ati v es.   T h en   th n o n - m ax i m s u p p r ess io n   w ill  b ap p lied   o n   th g r ad ien a m p lit u d f o r   f in d i n g   th co r r ec l o ca tio n   o f   ed g es.  T h v ar iab le  i n   t h C an n y   ed g d etec tio n   m e th o d   is   th e   th r e s h o ld ,   w h ich   w ill  a f f ec t h f in a r esu lt.  I n   o r d er   to   r em ai n   t h m ea n i n g f u ed g es,  t h d o u b le  th r es h o ld s   ar u s ed .   T h er is   th r esh o ld   w it h   h i g h er   v alu e   an d   a n o th er   is   w it h   lo we r   v alu e,   b u b o th   o f   th e m   ar e   in   t h r an g f r o m       to     .   A c co r d in g   to   C a n n y s   s u g g e s tio n ,   t h r atio   b et w ee n   t h t w o   th r e s h o ld s   is   ab o u t 3 :1   an d   2 :1 .   T h er ef o r e,   th e   d ef a u lt   r atio   is   0 . 4   in   th is   p ap er .   W h en   th in te n s it y   o f   t h ed g is   h i g h er   th a n   th h ig h   th r es h o ld ,   th ed g w il b k ep t.  I f   n o t,  th ed g w il b d is ca r d ed   w h e n   its   i n t en s it y   is   s m aller   th a n   t h lo w   th r es h o ld .   I f   th ed g v alu i s   b et w ee n   th d o u b le  th r es h o ld ,   th ed g w ill o n l y   r e m ai n   w h e n   it c o n n ec ted   to   r e m ai n ed   h i g h - i n te n s it y   ed g e.           Fig u r 2 .   P r o ce s s   s tep s   o f   th ca n n y   ed g d etec tio n   m et h o d       2 . 3     N o r m a lized  Cut s   T h n o r m alize d   c u t s   m et h o d   is   d ev elo p ed   f r o m   t h m i n i m u m   c u t,  w h ic h   b elo n g s   to   t h e   g r ap h - b ased   m et h o d   in   th f ield   o f   i m a g p r o ce s s in g   [ 1 7 - 19] .   Usu all y ,   t h g r ap h   i s   r ep r esen ted   a s                 ,   w h er e       r ef er s   to   t h s et  o f   v er tices  w h ile       is   d e f in ed   a s   th e   s et  o f   ed g es  th a co n n ec ts   t h v er tices.  I n   t h g r ap h ,   ea c h   p ix el  is   r eg ar d ed   as  v er tice.   T h im a g s eg m e n tatio n   o p er ates  b y   s u itab le  c u t ti n g   ed g e s   in   th g r ap h   f o r   d iv id in g   th d ata  i n to   d is j o in s u b r eg io n s .   T h i m a g s e g m en tatio n   i s   ass o ciate d   w it h   th cu cr iter io n   in   f o r m u la  ( 2 ) ,   w h ic h   w ill  m i n i m ize  th g r ap h   cu t                  .   B u th m i n i m al  cu te n d s   to   p r o d u ce   th s m all  an d   is o lated   co m p o n e n ts .   I n   o r d er   to   s o l v t h is   p r o b le m ,   t h n o r m alize d   c u ts   w ill   o p er ate  b y   f i x i n g   t h b ias   o f   m i n   cu th r o u g h   n o r m alizi n g   th s ize  o f   s eg m e n ts .   T h f o r m u la  o f   n o r m alize d   cu ts   is   i n   ( 3 ) ,   w h er e               r ep r esen ts   all  th co n n ec tio n s   o f   th e   v er tice s   i n   t h e   s et                 h a s   th s a m m ea n i n g   w it h   t h s et     .   W h e n   th n o r m alize d   c u ts   m et h o d   o p er ates,  th g en er alize d   ei g e n v alu e s   ca n   b u s ed   as  th ap p r o x i m ate  s o lu t io n s .   T h p r o ce s s   is   d e m o n s tr ated   in   Fi g u r 3 .   I n   th b eg i n n i n g ,   t h i m ag w i ll  b r eg ar d ed   as  th w e ig h ted   g r ap h     .   T h en   d ef in w   as  t h a d j ac en cy   m atr i x   o f   th g r ap h   an d   let       b th d iag o n a m a tr ix   w i th   d ia g o n a l   en tr ies  in   f o r m u la   ( 4 ) .   T h co s o f   n o r m alize d   c u t s   ca n   b w r i tten   in   ( 5 ) .         is   t h i n d ica to r   v ec to r ,   w h er e             if   th n o d e       i s   in   s et       an d   o th er w i s e,             .                                                    ( 2 )                                                                                ( 3 )                               j     ( 4 )                                                     ( 5 )         Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  17 ,   No .   2 Feb r u ar y   20 20  :   7 9 3   -   8 0 3   796       Fig u r 3 .   A l g o r ith m   o f   n o r m al ized   cu ts   m eth o d       3.   E XP E R I M E NT A L   RE SUL T     R ea l - ti m m o n ito r i n g   s y s te m   u s i n g   i m a g e - b ased   p r o ce s s i n g   o p er ates  w it h   m an y   m et h o d s   f o r   ex a m p le   b ac k g r o u n d   s u b tr ac ti o n ,   ed g d etec tio n ,   i m a g s eg m en tatio n ,   etc.   T h s y s te m s   u s in g   t h h ar d w ar e   p latf o r m   f o r   m u lti m ed ia  p r o ce s s i n g   r eq u ir th h ig h   p er f o r m an ce   f o r   th p r o ce s s o r   an d   t h p r o p er   r eso lu tio n   f o r   th ca m er a.   W in v es tig ated   o n   th co m p u ter   w ith   p r o ce s s o r ,   I n tel( R )   C o r e( T M)   i5 - 8 2 5 0 C P @   1 . 6 0 GHz ,   R A 8 GB .   W h er ea s   th i m a g r eso lu tio n   is   6 0 0 x 1 0 2 4   p ix els  f o r   all  i m ag e s   in   th ex p er i m en t.    T h ca p tu r ed   i m a g es   h av e   b ee n   s tu d ied   f r o m   t h s a m e   a r ea   b u t h d i f f er en t   v ie w s   o f   t h r ea o u ts id en v ir o n m e n t.   I n   o r d er   to   s tu d y   t h s u itab le  i m a g e - b ased   te ch n iq u es,   w co n s id er   t h co m p ar i s o n   f o r   e n tire   m et h o d s   in   M A T L A B .     3 . 1 .       P er f o rm a nce  M et rics   T h s tu d y   o n   t h i m ag p r o ce s s in g   m et h o d s   h a s   b ee n   i m p le m en ted   u s in g   co m p u ter   w it h   s o f t w ar e   to o l.  T h i m p o r tan t h in g s   to   ev alu a te  th e f f icie n c y   o f   th i m a g e - b ased   p r o ce s s i n g   ap p li ca tio n s   ar b o th   th e   ac cu r ac y   a n d   th e   p r o ce s s in g   ti m e.   W b eliev ed   t h ese  t w o   k e y s   w o u ld   b af f ec ted   t h r ea s y s te m   in   o r d er   to   m ak e   it  ea s ier   f o r   i m p le m e n tatio n   o n   th e   r ea h ar d w ar s u c h   as   th e   e m b ed d ed   s y s te m .   T h e y   h a v b ee n   co n s id er ed   f o r   th r ea l o u td o o r s   en v ir o n m e n f o r   th f u t u r o f   w o r k .   Ou r   ex p er i m e n tal  r es u lt s   h a v b ee n   m ad co m p ar is o n   w it h   t h g r o u n d   tr u t h   i m a g in   o r d er   to   ev alu a te  th ac c u r ac y   o f   t h p r ed icted   w a ter   ar ea   f o r   ea ch   m et h o d .   B ased   o n   th co n f u s i o n   m atr i x   as  s h o wn   in   Fig u r     h as   b ee n   u s ed   f o r   th ac c u r ac y s   ca lc u latio n   [ 2 0 21] .   W h er ea s   th g r o u n d   tr u th   i m ag e   ca n   b g ain ed   f r o m   t h ex p er b y   o b s er v ed   th o r ig i n al  i m a g e.   A   s tan d ar d   m et h o d   to   ev alu ate  t h ac cu r ac y   is   t h e   co n f u s io n   m atr i x   w h ich   co n s i s ts   o f   t h m atr i x   o f   r o w s   r ep r esen ted   t h n u m b er   o f   t h ac t u al  d ata  w h ic h   h as   b o th   p o s itiv a n d   n e g at i v an d   th m atr ix   o f   co lu m n s   r ep r ese n ted   th n u m b er   o f   th p r ed ict ed   d ata  w h ich   al s o   h av t w o   ca te g o r ies as sa m t h h o r izo n tal  m atr i x .           Fig u r 4 .   A   m atr ix   f o r   ca lcu lat in g   t h ac c u r ac y       I n   th e s ex p er i m en ts ,   w id e n t if y   th co n f u s io n   m atr i x   i n to   f o u r   t y p es.  T h r esu l h a s   b ee n   p r ed icted   co r r ec tly   f o r   th w a ter   ar ea   r ep r esen ted   in   t h f ir s m atr i x   w h ic h   is   tr u p o s iti v w h ile  t h p r ed ictio n   o f   t h at   ar ea   s h o w s   p o s itiv b u th r e al  d ata  is   th o th er   o b j ec t   r ep r esen ted   th f alse  p o s iti v e.   T h e   o th er s   m en t io n   th at   th ac tu al  i n f o r m atio n   is   n e g at iv e.   FN  in d icate s   th p r ed ictio n   is   w r o n g   b ec au s t h is   d ata  is   ac tu all y   t h w ater   ar ea .   Fin all y ,   t h p r ed ictio n   i s   co r r ec b ec au s t h is   ar ea   i s   n o th e   in ter esti n g   o b j ec r ep r esen ted   th tr u n eg at iv e.   T h ca lcu lat io n   o f   t h ac cu r ac y   h a s   b ee n   o b tain ed   u s i n g   ( 6 ) .     A cc u r ac y   T P   T N T P   F P   F T N              ( 6 )     Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       A   p erfo r ma n ce   a n a lysi s   fo r   r e a l - time  flo o d   mo n ito r in g   u s in g   ima g e - b a s ed   p r o ce s s in g   ( Qia n yu   Zh a n g )   797   An o th er   f ac to r   is   also   an   i m p o r tan th i n g   t h at  w h av c o n s id er ed   in   p er f o r m a n ce   ev alu atio n   f o r   i m a g p r o ce s s i n g   i n   t h r ea l - ti m f lo o d in g   m o n ito r i n g   s y s te m .   T h p r o ce s s i n g   ti m h as   b ee n   ca lc u lated   w i t h   th co m m o n   f u n ctio n   tic - to c‟   in   a   s ta n d ar d   to o l.  T h tic‟   f u n ct io n   s tar ts   th ti m er   to   m e asu r t h o p er atio n   ti m f o r   p r o g r am .   T h in ter n al  ti m h as  b ee n   co u n ted   w h en   t h co m m an d   w as  ex ec u t ed .   T h en ,   th to c   f u n ctio n   s to p s   t h r ec o r d   an d   s h o w s   t h f i n al  ti m i n   u n it o f   s ec o n d .   Fro m   n o w   o n ,   w d e m o n s tr ated   th m et h o d o lo g y   f o r   s tu d y   t h e x p er i m e n in   ea ch   i m ag e   p r o ce s s in g   tech n iq u es   s u c h   as   r eg io n   g r o w i n g ,   ca n n y   ed g e   d etec tio n   an d   t h n o r m al ized   cu r es p ec tiv el y .   T h f ir s t   m et h o d   h as  s h o w n   i n   Fi g u r 5   af ter   ca p tu r in g   th i n p u i m a g th e n   t h s ee d   p o in h a s   b ee n   s elec ted   an d   t h e   Mid   h as   b ee n   s et  u p .   T h o u t p u i m ag e   af ter   p er f o r m i n g   t h r eg io n   g r o w in g   i s   r ep r ese n ted   i n   Fi g u r 5 ( c) .     As  s ee n   in   Fig u r 5 ( d ) ,   w co n v er ted   t h is   r es u lt  to   b lack   a n d   w h ite  co lo r   u s i n g   t h t h r es h o ld in g .   Af t er   th at,   th ac cu r ac y   h a s   b ee n   ca lcu lat ed   b y   co m p ar in g   t h g r o u n d   tr u th   i m a g i n   Fi g u r 5 ( e) .           Fig u r 5 .   An   ex a m p le  o f   t h ex p er i m e n tal  p r o ce s s   f o r   p er f o r m an ce   e v al u atio n   o f   th r e g io n   g r o w i n g   tech n iq u w h en   Mid   is   0 . 1       T h ex p er im e n tal  r es u lt  as  s h o w n   in   Fi g u r 6 ( b )   h as  b ee n   r e p r esen ted   th i m a g e - b ased   p r o ce s s i n g   o f   th ca n n y   ed g d etec tio n   w h il th n o r m alize d   cu m e th o d   h as  p r esen ted   t h o u tp u i m ag as  d e m o n s tr ated   i n   Fig u r 7 ( b ) .   Fo r   th ca n n y   e d g d etec tio n ,   th t h r esh o ld   is   an   i m p o r ta n p ar a m ete r   to   s tu d y   i n   t h n e x t   s u b s ec tio n .   Af ter   p r o ce s s in g   o f   th clo s in g   m o r p h o lo g y ,   th o u tp u i m a g h a s   b ee n   o b ta in ed   in   Fi g u r 6 ( c) ,   th en   t h co m p ar is o n   w i th   t h e   s a m g r o u n d   tr u t h   i m a g in   Fig u r 5 ( e)   h as  b ee n   ev alu at ed   th ac cu r ac y   o f     th is   i m a g e.           Fig u r 6 .   An   ex a m p le  o f   t h an al y tic  p r o ce s s   f o r   p er f o r m an c ev alu at io n   o f   t h ca n n y   ed g e   d etec tio n   w h e n   th r es h o ld   is   0 . 2 .           Fig u r 7 .   An   ex a m p le  o f   t h v er if icatio n   p r o ce s s   f o r   ef f icie n c y   ass e s s m e n t o f   t h n o r m a liz ed   cu w h e n   th s eg m e n t n u m b er   i s   3 .       Fo r   th n o r m al ized   cu t,   th e   b i n ar y   i m a g o f   t h i s   m et h o d   h as   b ee n   s ep ar ated   i n to   3   p ar ts   a s   s h o w n   i n   Fig u r 7 ( c) .   T h er ef o r e,   th s u itab le  p ar in   th s q u ar b o x   h as  b ee n   s elec ted   f o r   f u r th er   co m p ar is o n .     T h s eg m e n n u m b er   f o r   th i s   m et h o d   ca n   b s et  u p   w it h o u t l i m itat io n .     3 . 2 .      P er f o rm a nce  E v a lua t io n   I n   o u r   ex p er i m e n t,  w h a v b ee n   s t u d ied   f o r   th th r ee   ca teg o r ies  o f   en v ir o n m e n esp ec iall y   o n l y   t h e   d ay t i m e,   n o at  n ig h t,  f o r   ex a m p le  th r ain y   i m ag e,   s u n n y   a n d   h ea v y   r ain   r esp ec ti v el y .   W b eliev th ese   ca p tu r ed   im a g e s   w ill  co v er   ev er y   co n d itio n   in   t h r e al  s itu at io n .   T h R ain y   I m a g r ep r esen ts   t h n o is o f   t h e         Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  17 ,   No .   2 Feb r u ar y   20 20  :   7 9 3   -   8 0 3   798   i m a g w h ile  t h S u n n y   I m ag e   s h o w s   t h p r o b lem   ab o u th e   s h ad o w   f r o m   th m o u n tai n .   W h er ea s   th Hea v y   R ain   I m ag p r ese n ts   t h b lu r r e d   im a g b ec au s o f   h ea v y   r ain f all  w it h   s o m f o g .   W b eg in   w i th   th e   e x p er i m en t al  r esu l o f   th r e g io n   g r o w i n g   m et h o d .   T h is   tech n iq u is   b as ed   o n   th e   s i m ilar it y   o f   th i n te n s it y   o f   t h p ix els  f o r   m a k in g   t h s e g m en tatio n   i n   ter m   o f   th g r ap h .   T h Mid   is   th k e y   v ar iab le  to   s t u d y   i n   t h r eg i o n   g r o w i n g .   W h e n   t h m a x i m u m   d i s ta n c o f   i n ten s it y   h as  b ee n   c h a n g ed ,     th r es u lt o f   th p r ed icted   w at er   ar ea   h as a ls o   f l u ctu ated .   Ho w e v er ,   w f o u n d   t h at  t h ac c u r ac y   is   s ig n i f ica n tl y   s tab le  w h e n   th Mid   h as  b ee n   s et  u p   u n ti s o m v a lu s u c h   as  0 . 5   f o r   all  test .   W h er ea s   th p r o ce s s in g   ti m is   v er y   h ig h   f o r   th w h o le  e x p er im en t e s p ec iall y   th ca s o f   th e   Su n n y   I m a g e.   T h r ep o r t o f   th ac cu r ac y   an d   th p r o ce s s in g   f o r   th ca n n y   ed g d etec tio n   h as  b ee n   d em o n s tr ated   in   Fig u r 9 .   T h i m p o r tan v ar i ab le  to   s t u d y   f o r   t h i s   tec h n i q u is   t h t h r es h o ld   v a l u e.   I t   ca n   d eter m i n t h e   r e m ain ed   ed g i n   th e   i m ag e.   T h co m p u tatio n al  co m p lex i t y   d escr ib es  th e   a m o u n o f   ti m e   w h e n   t h al g o r ith m   r u n s .   I ca n   b es ti m a ted   b y   ca lcu lati n g   t h b asic   o p er atio n s   o f   t h al g o r it h m .   Fo r   ca n n y   ed g d etec tio n ,     th o p er atin g   s tep s   ar all  i m p le m en ted   b ased   o n   th e   co n v o lu tio n s   o f   t h i m a g w it h   a   f i x ed   s ize  k er n el.   T h er ef o r e,   th w h o le  ti m f o r   th co m p lex it y   o f   th is   m et h o d   is                                 .   Fro m   t h r esu lt s ,     th p r o ce s s in g   ti m is   v er y   f as w h e n   co m p ar ed   w it h   t h ca s o f   r eg io n   g r o w i n g .           Fig u r 8 .   A cc u r ac y   [ an d   p r o ce s s i n g   t i m e]   u n d er   th r eg io n   g r o w i n g   tech n iq u w i t h   th d i f f er e n ce   m ax i m u m   i n ten s it y   d is ta n ce   f o r   th r ee   i m ag e s       Fig u r 9 .   A cc u r ac y   [ an d   p r o ce s s i n g   t i m e]   o f   t h ca n n y   ed g d etec tio n   w it h   v ar ied   th r esh o l d   f o r   d iv er s en v ir o n m e n tal  i m a g es           Fig u r 1 0 .   Acc u r ac y   [ an d   p r o ce s s i n g   ti m e]   o f   t h n o r m alize d   cu w it h   d if f er en s eg m e n t n u m b er   f o r   v ar io u s   en v ir o n m e n tal  i m a g es       T h ex p er i m en ta r es u lt  o f   th n o r m alize d   c u m eth o d   is   r ep r esen ted   in   Fig u r 1 0 .   T h s ig n i f ica n t   v ar iab le  is   th s e g m e n n u m b er   h as  b ee n   s t u d ied   t h v ar iati o n .   T h is   v ar iab le  p r ese n t s   t h e   d esire d   n u m b er   o f   th s e g m en p ar o f   t h i m a g e .   T h ac cu r ac y   h as  o s cilla ted   f o r   all  test .   W f o u n d   th at  t h e   ac cu r ac y   ch a n g es   d r am at icall y   w h e n   t h s e g m e n n u m b er   is   t h lo w   v al u f r o m   t h o u tco m e.   Ne v er t h eles s ,   th ac cu r ac y   s ee m s   co n s ta n t f o r   th h i g h er   v alu o f   th s eg m e n t n u m b er .   Ou r   s y s te m   d esire s   to   ac h ie v h i g h   ac cu r ac y   a n d   lo w   p r o ce s s in g   ti m in   o r d er   to   b ab le  to   i m p le m en i n   th r ea h ar d war s u ch   as  t h e m b ed d ed   s y s te m .   T h co m p ar is o n   o f   t w o   m e tr ics  w h ich   ar e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       A   p erfo r ma n ce   a n a lysi s   fo r   r e a l - time  flo o d   mo n ito r in g   u s in g   ima g e - b a s ed   p r o ce s s in g   ( Qia n yu   Zh a n g )   799   ac cu r ac y   an d   p r o ce s s in g   ti m h av b ee n   s t u d ied   in   th d ev ia tio n   tech n iq u e s   an d   th ad ap tab ilit y   en v ir o n m e n t   i m a g es a s   s h o w n   in   T ab le  1 .       T ab le  1 .   R esu lts   f o r   E ac h   T ec h n iq u in   Div er s E n v ir o n m e n tal  I m a g es  u n d er     C o n s id er in g   t h B est  A cc u r ac y   an d   P r o ce s s in g   T i m e   A c c u r a c y   ( %)    [ P r o c e ssi n g   T i me   ( s) ]   R a i n y   I mag e   S u n n y   I mag e   H e a v y R a i n   I mag e   R e g i o n   g r o w i n g   9 1 . 1 7   [ 1 2 . 5 2 ]   6 2 . 3 4   [ 5 1 . 5 6 ]   7 6 . 0 5   [ 2 9 . 5 6 ]   C a n n y   e d g e   d e t e c t i o n   9 7 . 4 0   [ 2 . 1 5 ]   9 6 . 0 5   [ 2 . 1 2 ]   9 8 . 7 7   [ 1 . 9 5 ]   N o r mal i z e d   C u t   9 6 . 4 3   [ 3 . 3 5 ]   8 4 . 0 8   [ 2 . 8 5 ]   6 6 . 9 7   [ 4 . 7 2 ]       As  d e m o n s tr ated   t h s u m m ar y   o f   t h e x p er i m e n tal  r es u lt  i n   T ab le  1 ,   th ca n n y   ed g d et ec tio n   ca n   g ain   t h h i g h   ac cu r ac y   a n d   th lo w   o p er atin g   ti m w h en   co m p ar i n g   to   th o th er   tec h n i q u es.  Nev er t h eles s ,     th t h r esh o ld   p ar a m eter   f o r   th is   m e th o d   ar all  d if f er e n v al u s u ch   a s   0 . 2 ,   0 . 3   an d   0 . 2   f o r   th R ai n y   I m a g e,   Su n n y   I m ag a n d   Hea v y R ain   I m ag r esp ec ti v el y .   F u r th er m o r e,   t h r es u lts   ap p ea r   o b v i o u s l y   th p r o ce s s i n g   ti m o f   t h C a n n y   ed g d etec tio n   is   th b est  o n f o r   all  s ch e m e s .   it‟s  ex p lici tl y   s h o w n   t h at  th p r ec is io n   o f   C an n y   ed g d etec tio n   an d   r eg io n   g r o w i n g   k ee p s   s tead y   w h e n   th t h r esh o ld   an d   t h m ax i m u m   i n ten s it y   d is tan ce   h a v b ee n   c h an g ed   m o r e   th a n   li m ited   v alu e.   W h e r ea s   th e   co r r ec tn es s   o f   n o r m al ized   cu ar e   u n s tab le   w it h   th e   c h an g o f   t h e   s e g m e n n u m b er   p ar a m eter .   I n   ad d itio n ,   t h ac c u r ac y   o f   C a n n y   m eth o d   is   m o r th a n   9 5 an d   also   h i g h er   th a n   o t h er s .   B esid es,  th p r o ce s s i n g   ti m o f   C a n n y   m an n er   i s   th f astes t i m a n d   n o t   ex ce s s   m o r th a n   2 . 2   s ec o n d s   f o r   all  th ti m es.   C o n s id er in g   t h r ep ea tab ilit y   o f   th ca n n y   m eth o d ,   w s til l   test   o u r   all  m e th o d s   w it h   t h e   o th er   s ix   i m a g es.  I n   t h s i x   i m a g es,  R 1   to   R 4   h av e   b ee n   o b tai n ed   f r o m   t h s a m p lace   b u w i th   d if f er en t   lo ca tio n s   a n d   L 1   to   L 2   h a v b ee n   ca p tu r ed   f r o m   a n o th er   la k e.   T h s ix   o r ig in al  i m ag e s   ar s h o w n   as i Fi g u r 11.   Af ter   t h e   ex p er i m en t s   h a v b ee n   r ep ea ted   f o r   all  t h o t h er   i m a g es,  w h av e   ac q u ir ed   t h e   r esu l ts   as   illu s tr ated   i n   T ab le  2   th at   ca n n y   ed g e   d etec tio n   is   t h b est   o n co m p ar in g   to   th e   o th er   m e th o d   f o r   th e   m aj o r it y   o f   i m a g es.  I n   o r d er   to   d etec ti o n   th f lo o d   lev el  i n   th r ea l   en v ir o n m e n t,  w w i ll  test   t h is   m et h o d   o n   r ea l   h ar d w ar e.   Fo r   th ca s s tu d y ,   w u s t h e m b ed d ed   s y s te m ,   R asp b er r y   P i.  I h as  b ee n   ex p lain ed   in   th n e x t   s ec tio n .   Ne v er th e less ,   ca n n y   m et h o d   h as  s till   b ee n   t h b est  tech n iq u f o r   t h r ea l - ti m f lo o d   m o n i to r in g   s y s te m   i n   ter m   o f   th s tab ilit y   o f   th p r o ce s s i n g   ti m e.   T h ex p er i m en tal  r esu lt  h a s   b ee n   m ea s u r ed   f o r   th e   r eliab ilit y   o f   t h b est s elec tio n .           Fig u r 1 1 .   T h d if f er e n t i m ag es f o r   test i n g   t h r ep ea tab ilit y   o f   ca n n y   ed g d etec tio n   m et h o d       T ab le  2 .   R esu lts   u n d er   C o n s id er in g   t h Hi g h e s A cc u r ac y   w i th   P r o ce s s in g   T im i n   t h B r ac k let  f o r   ea ch   I m ag P r o ce s s i n g   m et h o d   in   m o r Di f f er en t I m a g es   A c c u r a c y   ( %)    [ P r o c e ssi n g   T i me   ( s) ]   R e g i o n   g r o w i n g   C a n n y   e d g e   d e t e c t i o n   N o r mal i z e d   C u t   P i c t u r e   R 1   7 6 . 1 1   [ 9 . 9 6 ]   5 6 . 0 5   [ 3 . 8 4 ]   7 2 . 6 4   [ 4 . 8 0 ]   P i c t u r e   R 2   7 2 . 9 0   [ 1 . 6 5 ]   9 0 . 6 4   [ 2 . 3 1 ]   7 6 . 5 6   [ 4 . 4 2 ]   P i c t u r e   R 3   8 8 . 6 5   [ 2 3 . 3 6 ]   9 6 . 7 2   [ 2 . 1 9 ]   7 1 . 2 7   [ 4 . 0 1 ]   P i c t u r e   R 4   8 0 . 8 6   [ 4 7 . 0 9 ]   9 4 . 9 2   [ 2 . 3 1 ]   9 0 . 3 0   [ 3 . 9 7 ]   P i c t u r e   L 1   6 2 . 4 9   [ 4 5 . 9 7 ]   7 6 . 1 5   [ 2 . 2 1 ]   7 0 . 2 2   [ 4 . 5 6 ]   P i c t u r e   L 2   6 4 . 0 8   [ 1 . 6 5 ]   6 4 . 0 8   [ 2 . 3 3 ]   7 3 . 9 5   [ 3 . 6 9 ]           R1   R2   R3   R4   L1   L2   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  17 ,   No .   2 Feb r u ar y   20 20  :   7 9 3   -   8 0 3   800   4.   I M P L E M E NT AT I O   I n   o u r   e x p er i m e n t,  t h i n p u i m ag e s   s till   ar th e   s a m w it h   th s o u r ce   i m a g i n   p r ev io u s   t est,  w h ich   is   ca p tu r ed   b y   t h p ca m er w it h   t h 6 0 0 x 1 0 2 4   p ix els  r eso lu tio n .   T h p r o ce s s   o f   d etec tin g   th f lo o d   ar ea   w ill   b co m p leted   i n   t h R a s p b er r y   P i,  w h o s t y p i s   t h ir d - g en er atio n   R a s p b er r y   P w i t h   m o d el  B   a n d   th e   p r o ce s s o r   is   Qu ad   C o r 1 . 2 G Hz  B r o ad c o m   B C M2 8 3 7   6 4 b i t CP U,   R A 1 GB .   Ho w e v er ,   s o m f u n ctio n s   in   p y th o n   o n   R asp b er r y   P ar d i f f er en t   w it h   t h e   ex p er i m en t   i n   MA T L A B   o n   th co m p u ter   w h ic h   h as  b ee n   ch a n g ed   an d   i m p r o v ed   th p r o ce s s   s tep   f r o m   Fi g u r 2   to   d etec th f lo o d   ar ea   in   th r ea w o r ld   i m p le m e n tatio n ,   w h ic h   is   s h o w n   as i n   Fig u r 12.           Fig u r 1 2 .   T h i m p r o v ed   p r o c ess   o f   ca n n y   ed g d etec tio n   o n   R asp b er r y   p i       I n   Fi g u r 1 2 ,   co m p ar i n g   w i th   t h p r ev io u s   p r o ce s s   in   t h e x p er i m e n t,  w ad d ed   th s tep   o f   s h ar p en i n g   an d   Ots u s   t h r es h o ld in g   b ef o r ca n n y   ed g d e tectio n ,   th e n   ad d ed   m o r p h o lo g y   d ilatio n   b ef o r clo s in g .   I n   th e   s tep   o f   d etec ti n g   t h f lo o d   ar ea ,   w e   ch a n g t h s elec tio n   o f   lar g e s p ar as   t h w a ter   ar ea   to   t h d etec tio n   b ased   o n   s ee d   p o in ts .   I n   th i s   p r o ce s s ,   s h ar p en in g   is   u s ed   to   s h o w   m o r d etails  o f   th i m a g e,   w h ic h   in cr ea s th e   co n tr ast   o f   ed g e s .   Ots u s   th r e s h o ld i n g   is   a   m et h o d   ca n   d etec t   t h t h r es h o ld   o f   ea c h   i m a g e   au to m at icall y   [ 2 2 ,   2 3 ] .   I is   ass u m ed   t h at  th er ar t w o   c lass es  i n   t h i m a g e:  f o r eg r o u n d   an d   b ac k g r o u n d     [ 24 2 5 ] .   Fo r eg r o u n d   r ep r esen ts   th e   ar ea   o f   t h f lo o d ,   w h i le   th b ac k g r o u n d   s ta n d s   f o r   th o th er   o b j ec t s   lik m o u n tai n ,   p la n ts ,   a n d   r i v er b an k .   W ca n   m a x i m ize   th e   v a r ian ce   b et w ee n   t h t w o   clas s es  o r   m in i m u m   t h e   v ar ian ce   i n   t h cla s s   to   f i n d   th s u itab le  t h r es h o ld   f o r   s e g m en tin g   t h i m a g [ 26 - 30 ] .   T h en   th ca n n y   ed g e   d etec tio n   w il l d etec th e   ed g es   in   t h i m a g e.   P r ev io u s l y ,   w j u s t   i m p le m e n t   th e   m o r p h o lo g y   clo s in g   f o r   f illi n g   th h o les   b et w ee n   th e   ed g e s   to   s ep ar ate  th e   i m ag e   i n to   s e v er al  b lo ck s .   Her w e   i m p r o v ed   t h m et h o d   as   ad d in g   t h m o r p h o lo g y   d ilat io n   b ef o r m o r p h o lo g y   clo s i n g   to   m a k t h ed g e   o f   t h e   i m a g t h ic k er   f o r   estab lis h in g   th e   li n co m p let el y .   L ater ,   t h clo s i n g   h as  f i lled   th g ap s   b et w ee n   th e   ed g es.  I n   t h s tep   o f   d etec tin g   t h f lo o d   ar ea ,   w d etec th f lo o d   ar ea   b ased   o n   th s ee d   p o in ts .   T h p o s itio n s   o f   th s ee d   p o in ts   h av b ee n   c h o s e n   b ased   o n   th ce n tr al  o f   f o r eg r o u n d   an d   b ac k g r o u n d   i n   th g r o u n d   tr u th   i m a g [ 2 9 ] .     T h ar ea   w h o   co n tai n s   t h e   f o r eg r o u n d   s ee d   p o in ts   w il p r esen w h ite  co lo r   w h ile   th ar ea   w it h   th e   b ac k g r o u n d   s ee d   p o in ts   w i ll  p r esen b lack   co lo r .   I n   th o u tp u i m ag e,   t h p lace s   s h o w   w h ite  i s   t h d etec ted   f lo o d   ar ea .           Fig u r 1 3 .   T h ex a m p le  o f   r ai n y   i m a g w it h   i m p r o v ed   ca n n y   ed g d etec tio n   o n   e m b ed d ed   s y s te m       Fig u r 1 3   is   an   ex a m p le  o f   t h i m p r o v ed   p r o ce s s   w it h   th r ain y   i m a g as  th i n p u o n e.   T h im a g e   f r o m   ( a)   to   ( i)   co r r esp o n d ed   to   ea ch   s tep   i n   Fi g u r 1 2 .   Fig u r e   1 3   ( a)   is   th in p u i m a g a n d   ( b )   is   th g r a y s ca le   i m a g o f   ( a) .   Fig u r 1 3   ( c)   s h o w s   t h r esu l o f   s h ar p e n in g ,   w h ile  ( d )   is   th r esu l af ter   O ts u s   t h r es h o ld in g ,   w h er th w h ite  p lace   is   t h f o r eg r o u n d   an d   t h b lack   ar ea   b elo n g s   to   th b ac k g r o u n d .   Fi g u r 1 3   ( e)   illu s tr ates  th r es u lt  a f ter   ca n n y   ed g d etec tio n ,   w h ic h   ca n   d etec th ed g w ith   t h au to m a tic  t h r es h o ld   w h ic h       Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       A   p erfo r ma n ce   a n a lysi s   fo r   r e a l - time  flo o d   mo n ito r in g   u s in g   ima g e - b a s ed   p r o ce s s in g   ( Qia n yu   Zh a n g )   801   h as  b ee n   o b tain ed   f r o m   O ts u s   th r es h o ld in g .   Fi g u r 1 3   ( f )   m ak e s   th ed g es  th ick er   t h r o u g h   t h m o r p h o lo g y   d ilatio n ,   w h ic h   w i ll  also   co n n ec th s ep ar ate  s h o r ed g es  i n to   lin e s .   Fi g u r 1 3   ( g )   d em o n s tr ate s   th b lo ck s   af ter   t h m o r p h o lo g y   clo s i n g .   Fig u r 1 3   ( h )   i s   t h r es u lt  o f   th d etec ted   w ater   ar ea   b ased   o n   t h s ee d   p o in t s   w h ic h   h a v b ee n   s elec ted   th p o s itio n   f r o m   t h g r o u n d   tr u th   i m ag i n   Fi g u r 1 3   ( i) .   T h s ee d   p o in ts   in   Fi g u r 1 3   ( i)   a r th ce n ter   o f   th f o r eg r o u n d   ( w ater   ar ea )   an d   b ac k g r o u n d   ( n o w ater   ar ea ) .   W i m p le m e n ted   th b e s t i m a g e - b a s ed   tech n iq u i n   t h r ea l h ar d w ar w h ic h   is   t h e m b ed d ed   s y s te m   u s i n g   p y t h o n .   T h ex p er i m en t   h as   b ee n   m ad to   m ea s u r th m etr ic s   w h ic h   ar t h ac c u r ac y   a n d   p r o ce s s in g   ti m i n   t h r ea w o r ld   i m p le m en ta tio n .   T h er ef o r e,   w ca n   c o m p ar t h r es u lts   w it h   t h te s u s i n g   M A T L A B   in   th p r ev io u s   s ec tio n   i n   ter m   o f   th ese  t w o   m etr ics  f o r   th d i f f er en t i m a g es a s   s h o w n   in   T ab le  3 .       T ab le  3 .   R esu lts   u n d er   C o n s id er in g   t h Hi g h e s A cc u r ac y   w i th   P r o ce s s in g   T im e   b et w ee n   E x p er i m e n an d   I m p le m e n tatio n   R e s u lt s   I mag e   A c c u r a c y   ( %)     [ P r o c e ssi n g   T i me   ( s) ]   G r o u n d   T r u t h   I mag e   M A TL A B   O u t p u t   I mag e   p y t h o n   O u t p u t   I mag e     R a i n y   9 7 . 4 0 %   [ 2 . 1 5 ]     9 2 . 6 0 %   [ 1 . 3 0 ]       S u n n y   9 6 . 0 5 %   [ 2 . 1 2 ]     7 9 . 2 5 %   [ 2 . 5 0 ]         H e a v y   R a i n   9 8 . 7 7 %   [ 1 . 9 5 ]     9 4 . 3 4 %   [ 1 .   8 7 ]       R2   9 0 . 6 4 %   [ 2 . 3 1 ]     7 8 . 8 6 %   [ 1 . 5 2 ]       R4   9 4 . 9 2 %   [ 2 . 3 1 ]     7 7 . 1 7 %   [ 2 . 7 5 ]       L1   7 6 . 1 5 %   [ 2 . 2 1 ]     8 1 . 3 0 %   [ 2 . 9 0 ]           Fro m   t h r es u lt,  w ca n   f in d   t h at  t h p r o ce s s i n g   ti m o f   M A T L A B   d e m o n s tr at io n   a n d   R asp b er r y   P i   i m p le m en ta tio n   ar s i m ilar .   As  all   t h p r o ce s s i n g   ti m e   in   i m p le m e n tatio n   o n   p y t h o n   a r n o m o r t h an   3   s ec o n d s ,   w h ic h   i s   m u c h   f aster   th an   t h s p ee d   o f   f lo o d in g ,   w e   ca n   co n s id er   th at   t h p r o ce s s   o f   m o n ito r i n g   is   i n   r ea l - ti m e.   Fo r   ac cu r ac y ,   t h c h an g es  i n   p r o g r a m m i n g   lan g u ag an d   p r o ce s s   s tep   m a k t h d if f er e n ce   r esu l ts   b et w ee n   MA T L A B   an d   p y t h o n .   T h b ig g es d if f er e n ce   o f   ac cu r ac y   is   1 7 . 7 5 f r o m   im ag R 4 ,   w h ile  th e   m i n i m u m   d if f er e n ce   is   4 . 4 3 f r o m   i m ag h ea v y   r ain y .   Ho w e v er ,   th tr en d   o f   t h ac cu r a c y   o f   M A T L A B   an d   p y t h o n   ar t h s a m e.   I n   t h is   p ap er ,   th i m p r o v ed   f lo o d   m o n ito r in g   s y s te m   ca n   b i m p ele m en ted   o n   t h r ea l   e m b ed d ed   s y s te m .   T h is   s y s te m   d o es n li k t h o t h er   p ap er s   th a o n l y   m a k s i m u la tio n   o n   t h co m p u ter ,   w h ic h   w ill e n s u r th f ea s ib ili t y   o f   t h f lo o d   m o n ito r in g   w o r k .       5.   CO NCLU SI O   Fro m   th r ee   i m a g p r o ce s s in g   tech n iq u es  h a v b ee n   s t u d ied   an d   co m p ar ed   in   ter m s   o f   t h e   ac cu r ac y   an d   p r o ce s s in g   ti m w it h   d i f f er en p ar a m eter s   s e tti n g s .   Fo r   th i m p le m e n tat io n   o f   t h b est  m e th o d   o n   t h e   ac tu al  ap p licatio n   i n   th d if f e r en en v ir o n m en o f   th m o n it o r in g   s y s te m ,   t h ca n n y   ed g d etec tio n   h as  b o t h   h ig h   p r ec is o n   a n d   lo w   o p er a tin g   ti m e.   Fu th er m o r e,   d iv er s i m ag e s   w ith   d if f er e n p la ce s   h av e   also   b ee n   test ed ,   w h ich   p r o v es   th a t h ca n n y   ed g d etec tio n   i s   t h e   o p ti m u m   s o l u tio n   co m p ar i n g   t o   th o t h er   m et h o d s .   On   th r ea h ar d w ar e,   th i s   m eth o d   h as  b ee n   i m p r o v ed   p r o ce d u r f o r   th i m a g e - b ased   p r o ce s s in g   is   ab le  to   d etec th f lo o d   ar ea   au to m a ticall y .   T h ese  t w o   m etr ics  h a v b ee n   d e m o n s tr ated   f o r   b o th   ex p er i m e n a n d   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  17 ,   No .   2 Feb r u ar y   20 20  :   7 9 3   -   8 0 3   802   i m p le m en t.  I s tated   th at  t h r es u lt s   h a v b ee n   s h o w n   t h s a m tr en d .   T h er ef o r th i s   en h a n ce d   m et h o d   ca n   b u s ed   in   o u td o o r   en v ir o n m en t f o r   th r ea l - ti m f lo o d   m o n ito r in g .       ACK NO WL E D G E M E NT   T h r esear ch   w as  s u p p o r ted   b y   t h E lectr ical  E n g in ee r i n g   Dep ar tm e n in   Fac u lt y   o f   E n g i n ee r i n g ,   Pr in ce   o f   So n g k la   U n iv er s it y .   T h au t h o r   w o u ld   lik e   to   t h a n k   all  th e   co lleag u es   f r o m   t h i s   d ep ar t m e n w h o   ass is ted   th r esear ch .       RE F E R E NC E   [1 ]   A .   F il o n e n k o ,   D.  C.   He rn á n d e z ,   D.  S e o ,   a n d   K. - H.  J o ,   Rea l - ti me   fl o o d   d e tec ti o n   fo r vid e o   su rv e il la n c e ,   in   IECON   20 15 - 4 1 st A n n u a Co n f e re n c e   o f   th e   IEE I n d u strial  E lec tro n ics   S o c iety ,   p p .   0 0 4 0 8 2 - 0 0 4 0 8 5 ,   2 0 1 5 .     [2 ]   S .   Zaf a r,   H.  S .   A z h a r,   a n d   A .   T a h ir,   GI S   B a se d   Hy d r o lo g ica l   M o d e fo r   Ri v e W a ter   L e v e De tec ti o n   &   Fl o o d   Pre d ictio n   fea tu ri n g   mo rp h o lo g i c a o p e ra ti o n s ,   i n   2 0 1 8   I n tern a t io n a Co n f e re n c e   o n   A rti f icia l   L i f e   a n d   Ro b o ti c (ICA ROB2 0 1 8 ) ,   2 0 1 8 .     [3 ]   A .   L .   S u m a lan ,   D.  A .   N.  P o p e s c u ,   a n d   L .   Ic h i m ,   F lo o d e d   a re a d e tec ti o n   b a se d   o n   L  P   f ro m   UA V   i m a g e s,”   Rec e n Ad v a n c e o n   S y ste ms ,   S ig n a ls,   C o n tr o l,   Co mm u n ica ti o n a n d   Co mp u ter s;  W S EA S   Pre ss Bu d a p e st ,   Hu n g a ry p p .   1 8 6 - 1 9 1 ,   2 0 1 5 .   [4 ]   P .   M a tg e n ,   R.   Ho sta c h e ,   G .   S c h u m a n n ,   L .   P f ister,  L .   Ho ffm a n n ,   a n d   H.  H.  G .   S a v e n ij e ,   T o w a r d a n   a u to m a ted   S A R - b a se d   f lo o d   m o n it o rin g   sy st e m Les so n lea rn e d   f ro m   t w o   c a se   stu d ies     P h y s c a n d   C h e st ry   o th e   Ea rt h ,   Pa rts A/ B/ C ,   v o l.   3 6 ,   n o .   7 - 8 ,   p p .   2 4 1 - 2 5 2 ,   2 0 1 1 .     [5 ]   W .   J y h - Ho rn g ,   T .   Ch ien - Ha o ,   C.   L u n - Ch i,   L .   S h i - W e i,   a n d   L .   F a n g - P a n g ,   A u to ma ted   im a g e   i d e n ti fi c a ti o n   me t h o d   fo fl o o d   d isa ste mo n it o ri n g   i n   riv e rin e   e n v iro n me n ts:  a   c a s e   stu d y   in   T a iw a n ,   i n   AA S RI  In tern a ti o n a Co n f e re n c e   o n   In d u str ial  El e c tro n ics   a n d   A p p li c a ti o n s   (IE A   2 0 1 5 ),   2 0 1 5 .   [6 ]   S. - W .   L o ,   J. - H.  W u ,   F . - P .   L in ,   a n d   C. - H.  Hs u ,   Cy b e su rv e il lan c e   f o f lo o d   d isa ste rs,”  S e n so rs ,   v o l.   1 5 ,   n o .   2 ,     p p .   2 3 6 9 - 2 3 8 7 ,   2 0 1 5 .     [7 ]   S. - W .   L o ,   J. - H.  W u ,   F . - P .   L in ,   a n d   C. - H.  Hs u ,   V is u a se n sin g   f o u rb a n   f lo o d   m o n it o ri n g ,   S e n so rs ,   v o l.   1 5 ,   n o .   8 ,   p p .   2 0 0 0 6 - 2 0 0 2 9 ,   2 0 1 5 .   [8 ]   K.  Hiro a n d   N.  Ka w a g u c h i,   F l o o d Ey e R e a l - ti m e   f l a sh   f lo o d   p r e d ictio n   sy ste m   f o u rb a n   c o m p lex   wa ter  f lo w ,     in   2 0 1 6   IE EE   S ENS OR S ,   p p .   1 - 3 ,   2 0 1 6 .   [9 ]   K.  P .   M e n o n   a n d   L .   Ka la,  Vi d e o   su rv e il la n c e   sy ste fo re a lt ime   fl o o d   d e tec ti o n   a n d   mo b il e   a p p   f o fl o o d   a ler t ,   in   2 0 1 7   I n tern a ti o n a C o n f e re n c e   o n   C o m p u ti n g   M e t h o d o l o g ies   a n d   Co m m u n ica ti o n   (ICCM C) ,   p p .   5 1 5 - 5 1 9 ,   2 0 1 7 .   [1 0 ]   M .   S a h a   a n d   C.   P a n d a ,   A   Re v iew   o n   V a rio u Im a g e   S e g m e n tatio n   T e c h n iq u e f o  ra in   T u m o De t e c ti o n ,   S c ien ti fi c   Res e a rc h   in   2 0 1 8   IJ S R CS EIT ,   v o l.   3 ,   2 0 1 8 .     [1 1 ]   N.  M a h m o o d ,   A .   S h a h ,   A .   W a q a s,  A .   A b u b a k a r,   S .   Ka m r a n ,   a n d   S .    .   Zaid i,   Im a g e   se g m e n tatio n   m e th o d a n d   e d g e   d e tec ti o n A n   a p p li c a ti o n   t o   k n e e   jo in a rti c u lar  c a rti lag e   e d g e   d e tec ti o n ,   J o u rn a o T h e o re ti c a a n d   Ap p li e d   In fo rm a t io n   T e c h n o l o g y ,   v o l.   7 1 ,   n o .   1 ,   p p .   8 7 - 9 6 ,   2 0 1 5 .     [1 2 ]   V .   R.     o rg e s,  M .   C.   F .   d e   Oliv e ira,  T .   G .   S il v a ,   A .   A .   H.  V ieira ,   a n d    .   Ha m a n n ,   Re g io n   g ro w in g   f o se g m e n ti n g   g re e n   m i c ro a lg a e   i m a g e s,”  IEE E/ ACM   T ra n s a c ti o n o n   C o mp u ta ti o n a Bi o l o g y   a n d   Bi o i n f o rm a ti c ( T CBB ) ,   v o l.   1 5 ,   n o .   1 ,   p p .   2 5 7 - 2 7 0 ,   2 0 1 8 .   [1 3 ]   K.  S o m a su n d a ra m ,   J.  H.  M e rc in a ,   S .   M a g e sh ,   a n d   T .   Ka lais e lv i,    ra in   P o rti o n   Ex trac ti o n   S c h e m e   u sin g   Re g io n   G ro w in g   a n d   M o r p h o l o g ica Op e ra ti o n   f ro m   M RI  o f   Hu m a n   He a d   S c a n s,”         .     [1 4 ]   Y.  L e i,   L .   Zh e n g ,   a n d   Z .   L y u ,   L u n g   T u mo S e g me n t a ti o n   a n d   3 D   Rec o n stru c ti o n   Ba se d   o n   Re g io n   Gr o win g   a n d   Co rr e la ti o n ,   i n   Jo u rn a o f   P h y sic s: Co n f e re n c e   S e ries ,   v o l.   1 1 6 8 ,   p .   0 6 2 0 1 8 ,   2 0 1 9 .   [1 5 ]   N.  M a h m o o d ,   A .   S h a h ,   A .   W a q a s,  A .   A b u b a k a r,   S .   Ka m r a n ,   a n d   S .    .   Zaid i,   Im a g e   se g m e n tatio n   m e th o d a n d   e d g e   d e tec ti o n A n   a p p li c a ti o n   t o   k n e e   jo in a rti c u lar  c a rti lag e   e d g e   d e tec ti o n ,   J o u rn a o T h e o re ti c a a n d   Ap p li e d   In fo rm a t io n   T e c h n o l o g y ,   v o l.   7 1 ,   n o .   1 ,   p p .   8 7 - 9 6 ,   2 0 1 5 .   [1 6 ]   N.  M a n a sa ,   G .   M o u n ica ,   a n d    .   D.  T e jas w i,    ra in   tu m o d e tec ti o n   b a se d   o n   c a n n y   e d g e   d e tec ti o n   a lg o rit h m   a n d   it ‟s are a   c a lcu latio n ,   Bra in ,   v o l.   5 ,   p p .   1 0 - 1 3 ,   2 0 1 6 .   [1 7 ]   X   W a n g ,   G r a p h   b a se d   a p p r o a c h e f o i m a g e   se g m e n tatio n   a n d   o b j e c trac k in g ,   Do c to ra d isse rta ti o n ,   Ecu ll y ,   Eco le ce n tra le  d e   L y o n .   2 0 1 5 .     [1 8 ]   S .   L e e ,   G .   L e e ,   Y.  Ho n g ,   a n d   J.  Kim ,   A   stu d y   o n   th e   i m p ro v e d   n o rm a li z e d   c u a lg o rit h m   u sin g   a   b il a tera f il ter  f o r   e ff ici e n o b jec e x trac ti o n   f ro m   i m a g e ,   W ire les s P e rs o n a C o mm u n ica ti o n s ,   v o l.   8 6 ,   n o .   1 ,   p p .   7 7 - 9 0 ,   2 0 1 6 .   [1 9 ]   A .   Du tt a ,   J.  En g e ls,   a n d   M .   Ha h n ,   S e g m e n tatio n   o f   L a s e P o in t   C lo u d in   Urb a n   A re a b y   a   M o d if ied   No rm a li z e d   Cu M e t h o d ,   IEE E   tra n sa c ti o n o n   p a t ter n   a n a lys is  a n d   ma c h in e   i n telli g e n c e ,   2 0 1 8 .     [2 0 ]   X .   De n g ,   Q.  L iu ,   Y.  De n g ,   a n d   S .   M a h a d e v a n ,   A n   i m p ro v e d   m e th o d   t o   c o n str u c b a sic   p ro b a b il it y   a ss ig n m e n t   b a se d   o n   th e   c o n f u sio n   m a tri x   f o c las sif ic a ti o n   p r o b lem ,   In fo rm a t io n   S c ien c e s ,   v o l.   3 4 0 ,   p p .   2 5 0 - 2 6 1 ,   2 0 1 6 .   [2 1 ]   J.  G a rc í a - Ba lb o a ,   M .   A lb a - F e rn á n d e z ,   F .   A riza - L ó p e z ,   a n d   J.   Ro d ríg u e z - Av i,   A n a l y sis  o f   T h e m a ti c   S im il a rit y   Us in g   Co n f u sio n   M a tri c e s,”   IS PR S   In ter n a ti o n a J o u rn a o Ge o - I n fo rm a ti o n ,   v o l.   7 ,   n o .   6 ,   p .   2 3 3 ,   2 0 1 8 .   [2 2 ]   Q.  Zh a n g ,   N.  Jin d a p e tch ,   R.   Du a n g so it h o n g ,   a n d   D.   u ra n a p a n i c h k it ,   In v e stig a ti o n   o Ima g e   Pro c e ss in g   b a se d   Rea l - ti me   Fl o o d   M o n it o rin g ,   in   2 0 1 8   IEE 5 t h   In ter n a ti o n a Co n f e r e n c e   o n   S m a rt  In stru m e n tatio n ,   M e a su re m e n a n d   A p p li c a ti o n   (ICS I M A ) ,   p p .   1 - 4 ,   2 0 1 8 .     Evaluation Warning : The document was created with Spire.PDF for Python.