I n d on e s i an   Jo u r n al   o El e c t r i c al   En gi n e e r i n g   an d   C o m p u te r   S c i e n c e   V o l .   22 ,   N o .   2 M a y   202 1 pp .   818 ~ 8 2 5   IS S N :   25 0 2 - 4752 ,   D O I :   10. 1 1591 / i j e e c s . v 22 .i 2 . pp 818 - 825             818       Jou r n al   h o m e pa ge ht t p: / / i j e e c s . i a e s c or e . c om   IS OD A T A   S OPC - FPGA   i m p l e m e n t a t i o n   o f   i m a g e   se g m e n t a t i o n   u si n g   N IOS - II   p r o c e sso r       R ad jah   F ayç a l 1 ,   Z i e Lah c e n e 2 ,   Be n o u d ji N ab i l 3   1 , 2 L E P C I - L a bo r a t o r y   E c t r o ni c s   D e pa r t m e nt ,   F e r ha t   A bba s   S e t i f - U ni v e r s i t y ,   S e t i f ,   A l g e r i a   3 L a b o r a t o i r e   d' A ut o m a t i que   A v a nc é e   e t   d' A na l y s e   de s   S y s t è m e s ,   E l e c t r o ni c s   D e pa r t m e nt ,   ba t na - 2   U n i v e r s i t y ,   B a t na ,   A l g e r i a       A r ti c l e   I n fo     A B S TR A C T     Ar t i c l e   h i s t or y :   R e c e i v e d   A ug   7 ,   202 0   R e v i s e M a 26 ,   20 21   A c c e pt e A p r   2 ,   2021       T hi s   p a pe r   p r e s e n t s   a F P G A   i m a g e   s e g m e nt a t i o n - bi n a r i z a t i o s y s t e m   ba s e o i t e r a t i v e   s e l f   o r g a ni z i ng   D A T A   ( I S O D A T A )   t hr e s ho l us i ng   hi s t o g r a m   a na l y s i s   f o r   e m be d de d   s y s t e m s .   T h e   h i s t o g r a m   m o dul e   c o m put e s   p i xe l s   l e v e l s   s t a t i s t i c s   w h i c a r e   u s e by   t he   I S O D A T A   a l g o r i t hm   m o dul e   t o   de t e r m i ne   t he   s e g m e nt a t i o t h r e s ho l d.   I o ur   c a s e ,   t h i s   t hr e s ho l b i na r i z e s   a   g r a y - s c a l e   i m a g e   i nt o   t w o   v a l ue s   o r   255 .   T h e   p r o t o t y pe   of   t he   c o m pl e t e   s y s t e m   us e s   a A L T E R A   C Y C L O N E - I I   D E ki t   w i t a   l o t   o f   c o m p o ne nt   a nd   i nt e r f a c e s ,   s uc a s   t he   S D - C A R D   r e a de r   o r   a   c a m e r a   t o   r e a t h e   i m a g e   t o   be   s e g m e nt e d,   t he   F P G A   w hi c w i l l   i m p l e m e n t   t he   i nt e l l e c t u a l   p r o pe r t y   ( I P )   c o r e   c a l c ul a t i o w i t t he   N I O S   pr o c e s s o r ,   t he   V G A   i nt e r f a c e   t o   v i e w   t he   r e s ul t s ,   a n po s s i bl y   of   t he   E T H E R N E T   i n t e r f a c e   f o r   da t a   t r a ns f e r   v i a   i nt e r ne t .   T he   u s e   o f   F P G A   c o nt a i ns   t h e   I S O D A T A ,   hi s t o g r a m ,   N I O S   pr o c e s s o r   a nd  o t h e r s   c us t o m   a l t e r a   I P s   ha r dw a r e   m o dul e s   g r e a t l y   i m pr o v e s   pr o c e s s i ng   s pe e a nd  a l l o w s   t h e   bi n a r i z a t i o a ppl i c a t i o t o   be   e m be dde o a   s i ng l e   c hi p bb n .   F o r   t he   pr o j e c t   e l a bo r a t i o n,   w e   ha v e   us e Q U A R T U S - II  s o f t w a r e   f o r   t he   ha r dw a r e   de v e l o pm e n t   pa r t   w i t V H D L   de s c r i pt i o n,   S O P C - bui l de r   o r   Q S Y S   f o r   t he   i nt e g r a t i o o f   N I O S - s y s t e m ,   a nd  N I O S - II - S T B - E C L I P S E   f o r   t h e   s o f t w a r e   p r o g r a m   w i t h   e c l i ps e   c + +   l a ng a g e .   Ke y w or d s :   B i n a ri s a t i o n   E m b e dde s y s t e m   FPGA   IS O D A T A   N IO S   s y s t e m   S e gm e n t a t i o n   t hr e s h o l di n g   S y s t e m   o n   p r o g r a m m a b l e   c hi p   V H D L   T hi s   i s   an   ope n   ac c e s s   ar t i c l e   u nde r   t he   C C   B Y - SA   l i c e ns e .     Cor r e s pon di n g   Au t h or :   Z i e t   L a h c e n e   D e pa rt m e n t   o f   E l e c t r o n i c s ,   F a c ul t y   o f   T e c h n o l o g y   F e rh a t   A b b a s ,   S e t i f - U ni v e r s i t y ,   S e t i f ,   A l ge r i a   E m a i l :   l a h c e n e . z i e t @ u n i v - s e t i f . dz       1.   I N TR O D U C TI O N     Im a ge   o r   v i de o   s e gm e n t a t i o n   p r o c e s s   i s   r e qui r e a s   a   p r e p r o c e s s i n s t e i n   s e v e r a l   i m a ge   p r o c e s s i n g   a n a na l y s i s   a ppl i c a t i o n s   s uc h   f i n di ng  w h a t   o bj e c t s   a r e   p r e s e n t e i n   t h e   i m a ge ,   de t e r m i n i ng  t h e   r e gi o n   o i n t e r e s t   (R O I)  f r o m   a n   i m a ge ,   r e s e a r c h i ng  f o r   i m a ge - do c um e nt   i n   o pt i c a l   c ha r a c t e r   r e c o gn i t i o n   (O CR o pe r a t i o n s   a n de t e c t i ng  m o v i n o bj e c t s   i n   h u m a n   g a i t   r e c o gn i t i o n,   b i o m r e t r i c s   o r   t a r ge t   t ra c ki n [1 ] ,   [ 2].   U s i n s e gm e n t e i m a ge s   i b i n a ri z e m o de   r e duc e s   t h e   o v e ra l l   c o m put a t i o n a l   l o a i a   s pe c i f i c   a ppl i c a t i o n .   T h e   us e f ul   w a y   t o   b i n a r i z e   a i m a ge   i s   t o   t hr e s h o l a n s e p a r a t e s   t h e   b a c kg r o un d   a nd  f o r e gr o u n d   b a s e o n   pi xe l   i n t e n s i t i e s .   S e ve r a l   m e t h o ds   (a l go r i t hm s )   s uc h   a s   o t s u,   i s o da t a ,   b r e n s e n,   n i b l a c k,   s a uv o l a ,   a r e   i m pl e m e n t e t o   de t e r m i n e   t h e   v a l ue   of   t h e   t hr e s h o l w h i c h   de c i de s   t h e   s e t   of   pi xe l s   w h i c h   w i l l   t a ke   t h e   w h i t e s t   c o l o r   a n d   t h o s e   w h i c h   t a ke   t h e   b l a c ke s t   v a l ue   [3 ] ,   [ 4] F o r   h i g h - s pe e r e a l - t i m e   a ppl i c a t i o n s   a n e m b e dde s y s t e m s ,   i t   i s   r e c o m m e n de t o   us e   h a r dw a r e   r e s o ur c e s   (F P G A ) ,   s i n c e   i n   t h e   c a s e   o P Cs   o r   D S P s ,   a r i t hm e t i c   o pe r a t i o n s   a n m e m o r y   de m a n d   t a ke   a   c o n s i s t e nt   t i m e   e s pe c i a l l y   w h e n   t h e   s i z e   i m a ge s   i s   g r e a t   [5 ] ,   [ 6].   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       ISO D A T A   SO P C - F P G A   i m p l e m e nt a t i o o f   i m ag e   s e gm e n t at i on  us i n N IO S - II   pr oc e s s or   ( R adj a F ay ç a l )   819   A n   e m b e dde s y s t e m   i s   a   c o m put e r   s y s t e m   t h a t   i s   e m b e dde w i t h i n   a   p r o duc t   o r   c o m po n e n t .   Co n s e que n t l y ,   a n   e m b e dde s y s t e m   i s   us u a l l y   de s i gn e t o   pe r f o r m   o n e   s pe c i f i c   t a s k ,   o a   s m a l l   ra n ge   o s pe c i f i c   t a s ks ,   o f t e n   w i t h   r e a l - t i m e   c o n s t ra i nt s .   Cu rr e nt l y ,   m a n y   s i gn a l   o r   i m a ge   p r o c e s s i n a ppl i c a t i o n s   ha v e   b e e n   e m b e dde i n   s y s t e m s   t o   pr o m o t e   a   r e a l - t i m e   a s pe c t .   T h e s e   a ppl i c a t i o n s   c o ve r   s e ve r a l   a r e a s   s uc h   a s :   c o m put e r   v i s o [7] ,   n e t w o r k,   t e l e c o m m u n i c a t i o n s   [8] ,   m e di c i n e ,   a ut o m a t i o n ,   a n po w e r   e l e c t r o n i c s   [9 ] - [ 12] .   T h i s   w o r de s c r i b e s   a   de s i g n   o f   e ff i c i e n t   h a r dw a r e   a r c h i t e c t ur e   f o r   i m a ge   s e gm e n t a t i o n - b i n a ri z a t i o us i n IS O D A T A   t hr e s h o l di n a l go r i t h m .   I m a ge   g r a y - s c a l e   hi s t o gra m   m o dul e   i s   a s s o c i a t e t o   t h e   It e r a t i v e   S e l f   O r ga n i z i n D A T A   ( IS O D A T A )   c i r c ui t   f o r   t h e   a na l y z i n a n b i n a ri z i n o pe ra t i o n   o f   da t a   i m a ge   pi xe l .   T h e   N IO S   p r o c e s s o r   i s   us e i n   t h e   de s i g t o   c o n t r o l   t h e   t r a f f i c   b e t w e e n   e v e r y   c o m po n e n t   a n d   i nt e r f a c e .       2.   CO - D ES I G N   M E TH O D O L G Y   I M P LE M EN TA TI O N   U n l i ke   o t h e r   de s i g n s   w h e r e   IP s   a r e   di r e c t l y   t r a n s l a t e by   c oge n e ra t i o n   a nd  c o - s i m ul a t i o n   t o o l s   w i t s y s t e m   ge n e ra t o r   o ds p - b ui l de [13 ] - [ 15] ,   t h i s   de s i g us e s   t w o   pa rt s   c o m b i ni n g   h a rdw a r e   a n d   s o f t w a r e .     2. 1 .       Th e   s t r u c tu r e   s c h e m e   o th e   h ar d w a r e   s ys te m   m o d u l e   T h e   gl o b a l   ha r dw a r e   m a i nl y   i n c l ude s   t h e   m a i n   c h i E P 35F 672C6  w h i c h   i s   t h e   A l t e r a ' s   Cy c l o n e   II   s e r i e s   c h i [16] ,   pe r i p h e r a l ,   c l o c c i r c ui t ,   r e s e t   / r e c o n f i gu ra t i o n   c i r c u i t ,   po w e r   s uppl y ,   S D R A M ,   F L A S H ,   S R A M   m e m o r y   c i r c ui t   a nd  s o   o n   c h i p .   T h e   c e n t ra l   p r o c e s s i ng  u n i t   a n a l l   o f   t h e   pe r i p h e r a l s   o N IO S   II   ke rn e l   i s   c us t o m - de s i gn e by   Q S y s   o r   S O P b ui l de r   t o o l ,   t hi s   t o o l   m o dul e   m a i nl y   c o n f i gura t e s   t h e   CP U   o N i o s ,   J T A G ,   U A R T ,   a v a l o n   t r i - s t a t e   b r i dge ,   o n   c hi m e m o r y ,   S D R A M   c o n t r o l l e r   a n d   c o m m o n   f l a s h   i n t e r f a c e   [17 ] ,   [ 18] .   In   t h e   c a s e   of   t h i s   pr o j e c t ,   t h e   s y s t e m   i s   de s i gn e o n   p r o gra m m a b l e   c h i " S O P C"   fo r   a n   i m a ge   s e gm e n t a t i o n   s y s t e m   b a s e o n   t h e   IS O D A T A   t hr e s h o l di ng  t e c hn i q ue   F i gu r e   1.   I n   t hi s   a r c hi t e c t u r e ,   t h e   N O IS ,   s of t   c o r e   pr o c e s s o r ,   de l i v e r e by   a l t e r a   c o n t r o l s   a l l   t h e   e l e m e n t s   i n s t a n t i a t e i n   t h e   a r c hi t e c t u r e   by   t h e   a v a l o n   b us .   F o r   di ff e r e n t   t a s ks   o f   t h e   s e gm e n t a t i o n   p r o c e dur e ,   c us t o m   a l t r a   u ni v e r s i t y   pr o gra m   i n t e l l e c t ua l s   pr o pe rt i e s   (IP s )   s uc h :   s t o r a ge ,   di s p l a y ,   m e m o r y   t ra n s f e r ,   a c qui s i t i o n,   a n t r a n s m i s s i o a r e   us e a nd  i n s t a n c i e de i a s s o c i a t i o w i t t h e   p r o po s e t hr e s h o l d   s e gm e n t a t i o n s   m o dul e s .           F i gu r e   1 .   A r c h i t e c t ur e   o f   i m a ge   s e gm e n t a t i o d e s i g w i t s y s t e m   o p r o g r a m m a b l e   c hi (s o pc )       T h e   i m pl e m e nt a t i o o f   t h e   c o m pl e t e   s y s t e m   i n v o l ve s   c o - de s i gn  ha r dw a r e - s o f t w a r e   p r o c e dur e :   a)   S O P B ui l de r   f un c t i o na l i t y ,   w h i c h   a c c o r di n gl y   c o n n e c t s   t he   s of t - h a rdw a r e   c o m po n e n t s   t o   c o n s t r uc t   a   c o m pl e t e   c o m put e r   s y s t e m   t h a t   c a n   b e   c o n t r o l l e o n   a n y   of   t h e   F P G A   c h i ps   a n i s   a l s o   c a pa b l e   of  pr o duc i n g   i nt e r c o nn e c t   l o gi c   a u t o m a t i c a l l y   F i gur e   2 .     b)   E c l i ps e   ID E   f r a m e w o r a nd  t h e   e c l i ps e   de v e l o pm e nt   t o o l ki t   ( CD T pl ug - i n s ,   a l l   s o f t w a r e   de ve l o pm e n t   t a s ks ,   i n c l ud i n e di t i ng,   b ui l di ng  a nd  de b uggi ng,   c a n   b e   a c c o m pl i s h e us i n N IO S   I ID E   [19] .   Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   22 ,   N o .   2 M a y   202 1   :     818   -   82 5   820       F i gu r e   2 .   N IO S - II   t o   c o m p n e nt   c o nn e c t i o n s   po rt - map       2 . 2     H a r d w ar e   i s o d ata  i m age   th r e s h o l d i n g   T hr e s h o l d i n by   IS O D A T A   a l go r i t hm   c o n s i s t s   o f   f i n d i n a   t hr e s h o l by   s e pa ra t i ng  t h e   h i s t o gra m   i n t o   t w c l a s s e s   i t e r a t i v e l y   w i t h   t h e   p r i o r   k n o w l e dge   of   t h e   v a l ue s   a s s oc i a t e w i t h   e a c h   c l a s s .   T hi s   m e t h o b e gi n s   by   di v i di n g   t h e   i n t e r v a l   i n   n o n - z e r o   v a l ue s   r e p r e s e nt i n g   ba c k gr ou nd  po pul a t i o nC 0   and   f or e gr ound   popul a t i on   C o f   t h e   h i s t o g r a m   i nt o   t w o   e qui di s t a nt   pa rt s ,   t he n   c a l c ul a t i ng  t h e   a r i t hm e t i c   m e a n s   m a n m of   e a c h   c l a s s .   R e pe a t   t h e   c a l c ul a t i o o f   t h e   t hr e s h o l T   u nt i l   c o n v e r ge n c e   t o   t h e   v a l ue   c l o s e s t   t o   ( m1   +   m2 )   /   2 ,   a n d   e a c t i m e   upda t i ng  t h e   t w o   a v e r a ge s   m a n d   m 2 :   s e e   t he   s t e ps   o f   t h e   a l go ri t hm   b e l ow   [20].     A l go r i t hm 1:   I s o da t a   t hr e s ho l d   s e l e c t i o ba s e d   o t he   i t e r a t i v e   m e t ho by   R i dl e r   a nd   C a l v a r d     1:   K     s i z e   ( h )   --   n um be r   o f   i n t e ns i t y   l e v e l s   2:   T     m e a n   ( h,   0 ,   K 1 )   --   s e t   i ni t i al   t hr e s h ol d   t o   ov e r a l l   m e an   3:   r e p e at   4:             C 0   c o unt   ( h ,   0,   T )   --   ba c k g r ou nd  l e v e l   popu l a t i on                                       5:             C 1   c o unt   ( h ,   T + 1,   K 1 )   --   f or e gr o und   l e v e l   pop ul a t i on               C ou n t ( , , ) = ( ) =   6:               If   (C 0 = 0)   ( C 1 = 0)   t h e n     7:                   r e t u r n   - 1   --   b ac k gr ou nd   or   f or e gr o und   e m pt y   8:             m 1   m e a ( h ,   0,   T )         --   bac k gr ound   m e an   9:             m 2   m e a ( h ,   T + 1 ,   K 1)   --   f o r e gr ou nd  m e an   10:           T     T       --   k e e pr e v i o us   t hr e s ho l d   11:           T     [ m +   m 2] / 2     12:   U n t i l   T   =   T   --   e nd   o f   t he   l oop   i f   no - c h ange   13:   r e t u r n   T       T h e   h i s t o g r a m   o f   a   g ra y - s c a l e   i m a ge ,   g i v e s   a n   a c c o un t   o f   t h e   n um b e o f   pi xe l s   i n   a i m a ge   a s   a   f un c t i o n   o f   pi xe l   v a l ue .   T h e   t w o   m a i n   s t e ps   a s s o c i a t e w i t h   us i n h i s t o g r a m s   a r e   us e t o   b ui l t h e   h i s t o g r a m ,   a n t o   e xt r a c t   d a t a   f r o m   i t   a n d   us e   i t   f o r   p r o c e s s i n g   of   t h e   i m a ge .     [ ] = { + 1 ,          [ , ] = 0 ,                                   ,   (1)     H i s t o gr a m   i s   t h e n   a   d i a g ra m   us e i a na l y z i n d i gi t a l   d a t a ,   w h i c de pi c t s   h o w   m a n y   pi xe l s   of   a i m a ge   o r   a   v i de o   f r a m e   h a v e   c e r t a i n   i nt e n s i t y .   It   i s   o f t e n   r e qui r e f o r   m a n y   a ppl i c a t i o n s   i n   i m a ge   a n v i de pr o c e s s i n o r   f o r   e v a l ua t i o n   m e a s u r e .   F i gu r e   3   de pi c t s   how   t o   us e   c o un t e r s   o r   m e m o r y   t o   i m pl e m e n t   hi s t o gra m   o f   a n   i m a ge   [21 ] ,   [ 22] .   F o r   t h i s   a p pl i c a t i o n ,   a   m e m o r y   w i t h   du a l   po rt   da t a   a n du a l   po r t   a dd r e s s   i s   us e w i t h   a   de c o de r   a n d   a c c um ul a t o r   a dde r .   I nput   i m a ge   pi xe l s   a r e   a c c um ul a t e f o r   e a c h   g ra y   l e v e l   o f   i m a ge ,   a t   t h e   e nd,   t h e   m e m o r y   c o n t a i n s   v a l ue s   w h i c h   r e p r e s e n t   t h e   hi s t o gra m .   T h e   Is o da t a   t hr e s h o l m e t h o c a l c ul a t i o n   u ni t ,   F i gu r e   4,   c o n s i s t s   o f   s e v e r a l   p a r t s   a nd  o pe ra t e s   a c c o r di ng  t o   A l go ri t hm   1.   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       ISO D A T A   SO P C - F P G A   i m p l e m e nt a t i o o f   i m ag e   s e gm e n t at i on  us i n N IO S - II   pr oc e s s or   ( R adj a F ay ç a l )   821       F i gu r e   3 .   H i s t o gra m   i m pl e m e nt a t i o c i r c ui t   w i t m e m o r y   V S   c o un t e r           F i gu r e   4 .   IS O D A T A - t hr e s o l c o m put e   u ni t       A f t e r   ob t a i n i ng  t h e   hi s t o g r a m ,   F i g u r e   3,   t h e   l e v e l   pi xe l   v a l ue s   s t a t i s t i c s   a r e   i n s i de   a   du a l   i nput   po r t   a n du a l   a dd r e s s   po r t   m e m o r y   a n w i l l   b e   di v i de i n t o   t w o   c l a s s e s   C1  a n C2  us i n t h e   T hr e s h o l d - r e gi s t e r .   A t   t h e   b e gi nn i n t hi s   r e gi s t e r   c o n t a i n s   a n   i ni t i a l   t hr e s h o l a n t h e n   t h e   v a l ue s   o t h e   t hr e s h o l ds   c a l c ul a t e i t h e   f o l l ow i n i t e r a t i o n s .     T o   s c a n   t h e   t w o   a r e a s   c l a s s - C1  a n c l a s s - C 2,   t h e   c o m put i n uni t   us e s   a   do w n - c o un t e r   i ni t i a t e b y   t h e   v a l ue   of   t h e   t hr e s h o l r e gi s t e r   a nd  a up - c o unt e r   i n i t i a t e b y   t h e   v a l ue   t hr e s h o l + 1.   T hi s   m a ke s   pr o c e s s i n f a s t e r   f o r   i t e r a t i o n s   pr o c e s s .   T h e   t w o   o ut put s   of   t h e   m e m o r y   a r e   w e i ght e a nd  a c c um ul a t e r e s pe c t f ul l y   by   t h e   c o n t e nt s   of   v a l ue s   of   t h e   dow n - c o un t e r   a n o t h e   up - c o un t e r   by   t h e   m ul t i pl i c a t i o n   a c c um ul a t e M A C   m o dul e .   A t   t h e   s a m e   t i m e   t h e   v a l ue s   o f   e a c c l a s s   ( m e m o r y   da t a   o ut pu t a r e   a c c um u l a t e by   a n   A c c um ul a t i n a dde r   ‘’A dd - A c c ’’.   T h e   r e s ul t s   o b t a i n e by   t h e   M A C   a n d   A D D - A CC   o pe r a t i o n s   l e a d   t o   ob t a i n   t h e   r e s pe c t i v e   m o m e n t s   f o r   e a c c l a s s   o f   t h e   hi s t o gra m .   T h e   a v e r a ge   of   t h e s e   m o m e n t s   pr o duc e by   a   r i g ht   s hi f t   r e gi s t e r   i s   t ra n s f e r r e t o   t h e   t hr e s h o l r e gi s t e r   f o r   a   n e w   i t e ra t i o n   i f   t h i s   v a l ue   i s   n o t   e qua l   t o   t h e   v a l ue   c a l c ul a t e i n   t h e   p r e v i o us   i t e ra t i o n ,   o t h e r w i s e   a   s i g na l   do n e   i s   s e n t   t o   t h e   p r o c e s s o r   f o r   i ndi c a t e s   t h e   e n d   o f   t h i s   s t e a nd  t h e   s t a r t   o f   t h e   b i na r i z a t i o s t e p .   T h e   l a s t   u n i t   us e i n   t h e   s e gm e n t a t i o n   p r o c e s s   i s   t h e   c o n s t r uc t i o n   o f   t h e   b i n i r i z e i m a ge .   I n   t h i s   pha s e   e a c h   pi xe l   i n   t h e   i m a ge - m e m o r y   i s   t r a n s f o r m e i n   b a c kgr o un (p i xe l = 0 o r   fo r g r o un ( p i xe l = 2 55)   a c c o r di n t h e   v a l ue   o f   Is o da t a - t hr e s h o l d   F i gu r e   5.   Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   22 ,   N o .   2 M a y   202 1   :     818   -   82 5   822       F i gu r e   5 .   I m a ge   b i na r i z a t i o n   c i r c ui t         2 . 3     S o ftw ar e   d e s i gn   p h as e   In  o r de r   t o   t e s t   t h e   S O P C,   a a p pl i c a t i o n   p r o g r a m   f o r   N IO S   II  p r o c e s s o r   s h o ul d   b e   w r i t t e n .   Int e g r a t e de v e l o pm e n t   e n v i r o nm e nt   i s   a   s o f t w a r e   de ve l o p m e nt   g r a p hi c a l   us e r   i n t e r f a c e   (G U I)  fo r   N IO S   II   pr o c e s s o r .   It   i s   b a s e o n   t h e   e c l i ps e   ID E   f r a m e w o r a n t he   e c l i ps e   d e v e l o pm e n t   t o o l ki t   (CD T pl ug - i n s .   A l l   s o f t w a r e   de v e l o pm e n t   t a s ks ,   i n c l ud i n e di t i ng,   b ui l di n a n de b uggi ng,   c a n   b e   a c c o m pl i s h e us i ng  N IO S   II  ID E .   T h e   a ppl i c a t i o n   b e gi n s   w i t h   i n i t i a l i z a t i o n s   o f   t h e   v a r i o us   i nt e r f a c e s   a n v a ri a b l e s .   It   t h e n   c h e c ks   f o r   t h e   p r e s e n c e   of   a   s t o r a ge   o c a pt u r e   e l e m e n t   e l e m e nt   (S D - Ca r i n   t hi s   c a s e   o r   c a m e ra   in   us e ) .   T h e   N IO S   pr o c e s s o r   gi v e s   t h e   s t a r t   o f   t h e   t r e a t m e n t   e nt r us t e t o   t h e   ha r dw a r e   m o dul e   o f   b i n a ri z a t i o n.   O n c e   f i n i s h e d,   a   s i g n a l   i s   e m i t t e i n di c a t i ng  t h e   e n o f   t h e   t r e a t m e n t .   T h e   bi n a ri z e i m a ge   is   n o w   r e a dy   t o   be   di s pl a y e o r   s t o r e i t h e   S D - Ca rd  F i gu r e   6.           F i gu r e   6 .   S o f t w a r e   a l go r i t h m   f o r   N IO S - II   p r o c e s s o r       3.   S Y N TH ES I S   A N D   S I M U LA TI O N   A N D   D I S C U S S I O N   T h e   s y n t h e s i s   r e s ul t   o b t a i n e f o r   t h e   de s i gn   a r c hi t e c t u r e   i s   pr e s e n t e i n   T a b l e   1.   T h e   de s i gn   i s   de s c r i b e us i n s t r uc t u ra l   V H D L   [22]  a n s y n t h e s i z e o n   t h e   c y c l o n e   F P G A   II  E P 2C35F 672C6.   T h e   R T L   l e v e l   v i e w   of   a   pa rt   o f   M A m o dul e   i s   r e p r e s e nt e i F i g ur e   7   a nd  t h e   r e po r t   o f   i t s   s y n t h e s i s   o pe r a t i o n   i s   s h o w n   i F i g u r e   8 .   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       ISO D A T A   SO P C - F P G A   i m p l e m e nt a t i o o f   i m ag e   s e gm e n t at i on  us i n N IO S - II   pr oc e s s or   ( R adj a F ay ç a l )   823   T a b l e   1 .   S y n t h e s i s   r e s ul t s   o f   t h e   de s i g n e a r c hi t e c t u r e s - m o dul e s   M o d u l e s   L o g i c   E l e m e n t s     re g i s t e r s   M e m o r y   B i t s     D S P   M u l t i p l i e r s   D u a l - P o rt   H i s t o g ra m   M e m o r y   -   -   4   K   -   M A C   3 3   x 2   3 2   x 2   -   2   x 2   S U M A c c   1 7   x 2   1 6   x 2   -   -   In c re m e n t   8   -   -   -   T h re s h o l d   Re g i s t e r   8   8   -   -   Co u n t - U P   Co u n t - D o w n   8   x 2   8   x 2   -   -   Co m p a ra t o r   5   1       M e a n s - C1   M e a n s - C2   8 5 8   x 2   -   -   -   T o t a l   1853   121   4   K   4         F i gu r e   7 .   S a m p l e   o f   r e gi s t e r   t r a n s f e l e v e l   o f   a   po r t i o o f   t h e   s y s t e m           F i gu r e   8 .   S y n t h e s i s   c o m pi l a t i o r e po r t   de l i v r e by   qua r t us   c om pi l a t i o n       4.   R ES U LTS   A ND  D IS C U S S I O N     T o   h i g h l i g h t   t h e   e ff e c t i v e n e s s   o f   t h i s   w o r k,   t h e   de v e l o p e a ppl i c a t i o n   i s   s ub j e c t e t o   v a r i o us   t e s t s .   F i gu r e   9 ( a )   a nd  F i gu r e   9 (b )   s h o w   r e s pe c t l y   t h e   D E 2 - K i t ,   t he   o ut - put   s t a t e   o f   t h e   pr o t o t y pi n c a r D E w i t i n i t i a l i z e c o n f i gu r a t i o n.   F i gu r e   9 ( c )   s h o w s   t h e   di s pl a y   fo r   t he   b l a n s y s t e m   w i t h o ut   l o a d i n t h e   p r o gra m   i nt o   t h e   p r o gra m   f l a s m e m o r y .     F i gu r e s   10  s h o w s   t h e   di s pl a y   of   t h e   t e s t   i m a ge s   ( o r i gi na l s   i m a ge s   o l d - pri n t i n a nd  ha n d - w ri t i n g)   [23 ] ,   [ 24] .   T h e   r e s ul t s   o f   t h e   s e gm e n t a t i o n   o pe ra t i o n   a r e   g i v e n   by   F i gur e   11 .   W e   n o t i c e t h a t   t h e   r e s ul t s   ob t a i n e a r e   v e r y   c l o s e   t o   t h o s e   ob t a i n e us i n g   s o f t w a r e   a p pl i c a t i o n s ,   de s pi t e   t h e   l o w   pr e c i s i o n   o f   t h e   n u m b e r   of   b i t s   t o   r e pr e s e nt   t h e   p r o c e s s i n da t a .     Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   22 ,   N o .   2 M a y   202 1   :     818   -   82 5   824       F i gu r e   9 .   A l t e r a   D E 2 - ki t   a n p r i m a r y   di s pl a y             F i gu r e   10 .   E xe m p l e   o f   o r i gi na l   o l d - do c um e n t s   i m a ge s   d i s pl a y   [23 ] ,   [ 24]           F i gu r e   1 1 O l d - do c um e nt   i m a ge s   t hr e s h o l de d       T h i s   c h o i c e   of   i m a ge   i s   j us t i f i e t o   s e e   t h e   i m p r o v e m e n t   i n   t h e   e xe c ut i o n   l a t e n c y   c o m pa r e t o   o t h e w o r ks   i n   pa rt i c ul a r   t h e   w o r o f   K h i t a s   e t   al .   [ 25]  t o   i m p l e m e nt   hi s   m e t h o d.   Co m pa r e t o   c o n v e n t i o na l   pr o c e dur e s ,   pe r f o r m e o n   a   P e n t i um   IV   3. 00  G h z ,   t h e   e xe c ut i o n   s pe e i s   s i g ni f i c a nt l y   be t t e r   w h e t h e   N IO S   i s   c l oc ke by   a   c l oc of   o n l y   100  M h z .   T hi s   s pe e i m pr o v e m e n t   i s   due   t o   t h e   pa ra l l e l   a s pe c t   of  t a s e xe c ut i o n   i n   ha r dw a r e   s y s t e m s .       5.   C O N C LU S I O N     T h e   ha r dw a r e   i m pl e m e n t a t i o n   c a n   b e   m o r e   b e n e f i c i a l   e s pe c i a l l y   fo r   i m a ge   o r   v i de o   pr o c e s s i n a ppl i c a t i o n s   s i n c e   t h e   pi pe l i n e   i s   m o r e   s ui t a b l e   a n t h e   F P G A   m o dul e s   a r e   de di c a t e f o r   t hi s   t y pe   of   t a s ks T hi s   w o r put s   f o r w a r a n   i m a ge   p r e - p r o c e s s i n de s i g n   s c h e m e   b a s e o n   S O P o n   D E c a rt e .   T h e   o b j e c t i v e s   o f   t h e   p r o j e c t   w e r e   t o   r e v i e w   de ve l o pm e n t s   i n   e m b e dde s y s t e m   de s i g n   a nd  f ut u r e   t r e nds ,   a nd  t o   e xpl o r e   b o a r d - l e v e l   ra p i p r o t o t y pi n us i ng  F P G A s   ( D E 2) .   A   go o d   e xa m pl e   i s   t h e   de s i g n e a ppl i c a t i o n   o f   i m a ge   b i n a ri z a t i o n   by   c a l c ul a t i o n   o f   t h e   IS O D A T A   t hr e s h o l a na l y z i n t h e   h i s t o g r a m .   I t   s h o w s   t h a t   t h e   us e   of   t h e   h a r dw a r e   a pp r o a c i n   t h e   i m a ge s   de s i g n s   gi v e s   b e t t e r   r e s ul t s   i n   t e r m s   o f   s pe e d,   s i z e   a nd  c o s t .   Th e   n e xt   i de a   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       ISO D A T A   SO P C - F P G A   i m p l e m e nt a t i o o f   i m ag e   s e gm e n t at i on  us i n N IO S - II   pr oc e s s or   ( R adj a F ay ç a l )   825   w o ul b e   t o   c o n t i n ue   t o   i n c r e a s e   t h e   i m p l e m e n t a t i o n   c o m pl e xi t y   l e ve l   fo r   t y pi c a l   i m a ge   p r o c e s s i n f o r   O CR ,   D o c um e n t   i m a ge   a na l y s i s ,   F i n ge r - v e i n   p a t t e rn  e xt ra c t i o a nd   ̕ n ge r p r i nt   p r e p r o c e s s i n g   e m b e dde a ppl i c a t i o n s .       R EF ER EN C ES   [ 1]   N .   C ha k i   e t   al . ,   E xp l o r i ng   I m a g e   B i na r i z a t i o T e c hni q ue s ,   S t u di e s   i C o m put a t i o na l   I nt e l l i g e nc e ,   E x p l o r i ng   I m age   B i na r i z at i on   T e c hn i q ue s ,   pp .   5 - 15,   20 14,   do i :   10 . 100 7/ 9 78 - 81 - 322 - 1907 - 1_1 .   [ 2]   W a A z a ni   M us t a f a   e t   a l . ,   B i na r i z a t i o o f   D oc um e nt   I m a ge s :   A   C o m pr e he ns i v e   R e v i e w ,”   I nt e r na t i ona l   C onf e r e nc e   on  G r e e and  S us t ai nab l e   C om pu t i n g   ( I C oG e S) ,   v o l .   1019 ,   no .   1,   201 8 ,   do i :   10. 10 88/ 1742 - 6596 / 101 9/ 1 / 0 1202 3   [ 3]   M o g ha dda m ,   R . F . ,   C he r i e t ,   M .   A dO t s u:   a a da pt i v e   a nd  pa r a m e t e r   l e s s   g e ne r a l i z a t i o o f   O t s u’ s   m e t ho f o r   do c um e nt   i m a g e   bi n a r i z a t i o n ,”   P at t e r R e c ogn ,   v o l .   45 ,   no .   6 p .   2419 2431 ,   20 12 ,   do i :   10. 1 016 / j . p a t c o g . 2011. 12. 013   [ 4]   G a t o s ,   B . ,   P r a t i ka k i s ,   I . ,   P e r a n t o ni s ,   S . J . :   A da pt i v e   de g r a d e do c u m e nt   i m a g e   b i n a r i z a t i o n,   P at t e r R e c ogn ,   v o l .   39 ,   no .   3 p p.   31 7 - 327 ,   2 006 .   [ 5]   F a ha d   S i dd i qu i ,   S a m   A m i r i ,   U m a r   I br a hi m   M i nha s ,   T i a nt a i   D e ng ,   R o g e r   W oo ds ,   K a r e n   R a f f e r t y   a nd  D a ni e l   C r o o ke s   F P G A - B a s e P r o c e s s o r   A c c e l e r a t i o f o r   I m a g e   P r o c e s s i n g   A ppl i c a t i o ns ,   J our na l   of   I m agi ng ,   v o l .   5,   no .   1,   p.   1 6,   20 19,   do i :   10. 3390 / j i m a g i ng 501001 6 .   [ 6]   T o m a s z   K r y j a k ,   M a t e u s z   K o m o r ki e w i c z   M a r e G o r g o n ,   R e a l - t i m e   ha r dw a r e s o f t w a r e   e m b e dd e v i s i o s y s t e m   f o r   I T S   s m a r t   c a m e r a   i m pl e m e n t e i n   Z y nq  S o C ,   J ou r na l   of   R e al - T i m e   I m age   P r oc e s s i ng ,   v o l .   15 ,   no .   1 ,   p p.   123 - 159 ,   2 018 ,   do i :   10. 100 7/ s 115 54 - 016 - 05 88 - 9   [ 7]   E r i c   C h ung   e t   al . ,   A c c e l e r a t i ng   P e r s i s t e n t   N e ur a l   N e t w o r ks   a t   D a t a c e nt e r   S c a l e H ot C h i p s v o l .   29,   2 017 .   [ 8]   H e bi b i   A m a r ,   A r r e s   B a r t i l ,   L a hc e ne   Z i e t ,   C o m pa r i s o o f   t w o   ne w   m e t ho ds   f o r   i m p l e m e nt a t i o B P S K   m o dul a t o r   us i ng   F P G A ,   I ndone s i an   J o ur n al   of   E l e c t r i c a l   E ng i ne e r i ng   and   C om put e r   Sc i e nc e v o l .   19,   no .   2,   pp .   819 - 82 7,   2020 ,   do i :   10. 115 91 / i j e e c s . v 19. i 2 . pp8 19 - 827 .   [ 9]   J . M . P .   C a r do s o ,   O c o m bi n i ng   t e m po r a l   pa r t i t i o ni ng   a nd  s h a r i ng   o f   f unc t i o na l   un i t s   i n   c o m pi l a t i o f o r e c o nfi g ur a bl e   a r c hi t e c t u r e s ,   C om pu t e r s ,   I E E E   T r a ns a c t i on s   on v o l .   52 ,   no .   10 ,   pp.   1 362 - 137 5,   2 003 ,   do i :   10. 1 109 / T C . 2003 . 1 2345 32   [ 10]   P e ng   L i   e t   al . ,   F P G A   A c c e l e r a t i o f o r   S i m u l t a ne o us   M e d i c a l   I m a g e   R e c o ns t r uc t i o a nd  S e g m e n t a t i o n,   A nn ual   I nt e r n at i on al   Sy m pos i um   on  F i e l d - P r og r am m ab l e   C us t o m   C o m put i ng  M ac h i ne s   ( F C C M ) p.   172 ,   2014 ,   do i :   10. 1109 / F C C M . 2014 . 5 4 .   [ 11]   M a hm o ud  M a t a r ,   R e z a   I r a v a ni ,   F P G A   I m pl e m e nt a t i o o f   t he   P o w e r   E l e c t r o ni c   C o nv e r t e r   M o de l   f o r   R e a l - T i m e   S i m ul a t i o o f   E l e c t r o m a g ne t i c   T r a n s i e n t s ,   I E E E   T r an s ac t i ons   o P ow e r   D e l i v e r y ,   v o l .   2 5 ,   no .   2 ,   pp.   852 - 86 0,   2010 ,   do i :   10. 110 9/ T P W R D . 200 9. 2033 603 .   [ 12]   S ha nk e r   S h r e e j i t a nd  S uha i b ,   A .   F a hm y .   E xt e ns i bl e   F l e xR a y   C o m m uni c a t i o C o nt r o l l e r   f o r   F P G A - B a s e A ut o m o t i v e   S y s t e m s ,   I E E E   T r a ns a c t i on s   on   V e hi c ul ar   T e c h no l ogy v o l .   64 ,   no .   2 ,   pp .   45 3 - 465 ,   20 15 ,   do i :   10. 1 109 / T V T . 2014 . 2 3245 32   [ 13]   T a o uf i S a i d a n i   e t   al . ,   U s i ng   X i l i nx  S y s t e m   G e ne r a t o r   f o r   R e a l   T i m e   H a r dw a r e   C o - s i m ul a t i o o f   V i de P r o c e s s i ng   S y s t e m ,   L e c t ur e   N o t e s   i n   E l e c t r i c a l   E ngi ne e r i ng ,   v o l .   60,   pp .   227 - 236 ,   2020 ,   do i :   10. 100 7/ 9 78 - 90 - 481 - 8776 - 8_2 0 .   [ 14]   L e i   Z ha ng ,   S y s t e m   g e ne r a t o r   m o de l - ba s e F P G A   de s i g o pt i m i z a t i o a nd  h a r dw a r e   c o - s i m ul a t i o f o r   L o r e nz   c ha o t i c   g e ne r a t o r ,   2nd  A s i a - P ac i f i c   C onf e r e nc e   on  I n t e l l i ge nt   R obo t   Sy s t e m s   ( A C I R S) 2 017 ,   pp .   1 70 - 174 ,   do i :   10. 1109 / A C I R S . 2017 . 79 8608 7 .   [ 15]   R a y a   K a ht a M o ha m m e d H a m s a   A bdul ka r e e m ,   I m pl e m e nt a t i o o f   di g i t a l   a nd  a na l o g   m o dul a t i o s y s t e m s   u s i ng   F P G A ,   I ndone s i an  J our n al   o f   E l e c t r i c a l   E ng i ne e r i ng  and  C om p ut e r   Sc i e nc e ,   v o l .   18 ,   no .   1,   pp .   485 - 49 3 ,   20 20 ,   do i :   10. 1159 1/ i j e e c s . v 18. i 1. pp48 5 - 493 .   [ 16]   ht t ps : / / w w w . t e r a s i c . c o m . t w / c g i - bi n / pa g e / a r c hi v e . p l ? L a ng ua g e = E ngl i s h& C a t e g o r y N o = 53& N o = 30& P a r t N o = 2   [ 17]   A l t e r a   E m be dde P e r i ph e r a l s   I P   G ui d e .   2 011 .   A v a i l a bl e   w w w . a l t e r a . c o m / l i t e r a t ur e / ug / ug _e m be dd e d_ i p . pdf .   [ 18]   A l t e r a   A udi o / V i de o   C o nf i g ur a t i o C o r e   f o r   D E 2 - S e r i e s   B o a r ds .   ( J u l y   2010) .   [ O n l i n e ] .   A v a i l a bl e :     [ 19]   f t p: / / f t p. a l t e r a . c o m / up / pub / A l t e r a _ M a t e r i a l / 1 0. 1 / U n i v e r s i y _P r o g r a m _I P _C o r e s / A udi o _V i d e o / A udi o _a nd_V i de o _C o nf i g . pdf .   [ 20]   T .   W .   R i d l e r   a n S .   C a l v a r d .   P i c t u r e   t hr e s ho l di ng   us i ng   a i t e r a t i v e   s e l e c t i o m e t ho d,   I E E E   T r ans ac t i o ns   o Sy s t e m s ,   M an,   a nd  C y be r ne t i c s ,   v o l .   8 ,   no .   8 pp .   630 - 63 2,   19 78 .   [ 21]   Z i e t   L a hc e ne ,   K h i t a s   M e hdi   a nd  R a d j a F a y ç a l ,   I m pl e m e nt a t i o o f   i m a g e   hi s t o g r a m   f o r   i m a g e   bi na r i z a t i o n,   I nt e r n at i on al   C on f e r e nc e   O A dv a nc e s   I n   Sc i e nc e ,   I s t a m b ul   31   a ug us t - 2   s e pt e m be r   2 016 .   [ 22]   ht t ps : / / s t a n da r ds . i e e e . o r g / s t a n da r d/ 1076 - 20 19. ht m l .   [ 23]   P r a t i k a k i s   I ,   G a t o s   B   a nd  N t i r o g i a nni s   K   201 I C D A R   2013  do c u m e nt   i m a g e   b i na r i z a t i o c o nt e s t   P r oc e e di ng s   o f   t he   I n t e r nat i on al   C onf e r e nc e   on  D o c um e nt   A n al y s i s   an R e c ogni t i on ,   I C D A R ,   pp .   147 1 ,   2 013 ,   do i :   10. 1 109 / I C D A R . 2011. 299   [ 24]   P r a t i k a k i s   I ,   Z a g o r i s   K ,   B a r l a s   G   a nd   G a t o s   B   I C D A R 2017  C o m pe t i t i o o D o c um e nt   I m a g e   B i na r i z a t i o n ,”   ( D I B C O   2017)   P r oc .   I n t .   C onf .   D o c .   A nal .   R e c og ni t i on ,   I C D A R ,   v o l .   1 ,   p p.   1 395 - 403 ,   2 018 ,   do i :   10. 1 109 / I C D A R . 2017. 228   [ 25]   K hi t a s   M e hdi ,   Z i e t   L a hc e ne ,   S a a B o ug ue z l ,   I m pr o v e D e g r a de D o c um e nt   I m a g e   B i na r i z a t i o U s i ng   M e d i a F i l t e r   f o r   B a c kg r o und  E s t i m a t i o n ,”   E l e k t r oni k i r   E l e k t r o t e c hni k a ,   v o l .   24,   no .   3,   p p.   8 2 - 87,   2 018 ,   do i :   10. 5755 / j 01 . e i e . 24 . 3 . 209 82 .   Evaluation Warning : The document was created with Spire.PDF for Python.