I n t e r n a t i o n a l   J o u r n a l   o f   R e c o n f i g u r a b l e   a n d   E m b e d d e d   S y s t e m s   ( I J R E S )   V o l .   1 ,   N o .   1 ,   M a r c h   2 0 1 2 ,   p p .   2 5 ~ 3 6   I S S N :   2 0 8 9 - 4 8 6 4             2 5       J o u r n a l   h o m e p a g e :   h t t p : / / i a e s j o u r n a l . c o m / o n l i n e / i n d e x . p h p / I J R E S   R e a l - t i m e   O p t i c a l - f l o w   C o m p u t a t i o n   f o r   M o t i o n   E s t i m a t i o n   u n d e r   V a r y i n g   I l l u m i n a t i o n   C o n d i t i o n s       J u l i o   C .   S o s a 1 ,   R o b e r t o   R o d r í g u e z 2 ,   V í c t o r   H .   G a r c í a   O r t e g a 1   a n d   R u b é n   H e r n á n d e z 1   1 D e p a r t m e n t   o f   P o s t - d e g r e e ,   S u p e r i o r   S c h o o l   o f   Co m p u t a t i o n ,   N a t i o n a l   P o l y t e c h n i c   I n s t i t u t e   ( I P N ) ,   M e x i c o   2 D i g i t a l   S i g n a l   P r o c e s s i n g   G r o u p ,     I n s t i t u t e   o f   Cy b e r n e t i c s ,   M a t h e m a t i c s   &   P h y s i c s   ( I CI M A F ) ,   Cu b a     E m a i l :   [ j c s o s a ,   v g a r c i a o ,   r h t o v a r ] @ i p n . m x ,   r r m @ i c m f . i n f . c u       A r t i c l e   I n f o     A B S T R A C T   A r t i c l e   h i s t o r y :   R e c e i v e d   J a n   2 8 ,   2 0 1 2   R e v i s e d   M a r   2 1 ,   2 0 1 2   A c c e p t e d   M a r   2 6 ,   2 0 1 2       T h e   o p t i c a l   f l o w   a p p r o a c h   h a s   e m e r g e d   a s   a   m a j o r   t e c h n i q u e   f o r   e s t i m a t i n g   o b j e c t   m o t i o n   i n   i m a g e   s e q u e n c e s .   H o w e v e r ,   t h e   o b t a i n e d   r e s u l t s   b y   m o s t   o p t i c a l   f l o w   t e c h n i q u e s   a r e   p o o r   b e c a u s e   t h e y   a r e   s t r o n g l y   a f f e c t e d   b y   l a r g e   i l l u m i n a t i o n   c h a n g e s   a n d   b y   m o t i o n   d i s c o n t i n u i t i e s .   O n   t h e   o t h e r   h a n d ,   t h e r e   h a v e   b e e n   t w o   t h r u s t s   i n   t h e   d e v e l o p m e n t   o f   o p t i c a l   f l o w   a l g o r i t h m s .   O n e   h a s   e m p h a s i z e d   h i g h e r   a c c u r a c y ;   t h e   o t h e r   f a s t e r   i m p l e m e n t a t i o n .   T h e s e   t w o   t h r u s t s   h a v e   b e e n   i n d e p e n d e n t l y   p u r s e d ,   w i t h o u t   a d d r e s s i n g   t h e   a c c u r a c y   v s .   e f f i c i e n c y   t r a d e - o f f s .   T h e   o p t i c a l   f l o w   c o m p u t a t i o n   r e q u i r e s   h i g h   c o m p u t i n g   r e s o u r c e s   a n d   i s   h i g h l y   a f f e c t e d   b y   c h a n g e s   i n   t h e   i l l u m i n a t i o n   c o n d i t i o n s   i n   m o s t   o f   t h e   e x i s t i n g   t e c h n i q u e s .   I n   t h i s   p a p e r ,   a   n e w   s t r a t e g y   f o r   i m a g e   s e q u e n c e   p r o c e s s i n g   i s   p r o p o s e d .   T h e   d a t a   r e d u c t i o n   a c h i e v e d   w i t h   t h i s   s t r a t e g y   a l l o w s   a   f a s t e r   o p t i c a l   f l o w   c o m p u t a t i o n .   I n   a d d i t i o n ,   t h e   p r o p o s e d   a r c h i t e c t u r e   i s   a   h a r d w a r e   c u s t o m   i m p l e m e n t a t i o n   i n   E P 1 S 6 0 F 1 0 2 0   F P G A   s h o w i n g   t h e   a c h i e v e d   p e r f o r m a n c e .   K e y w o r d :   e s t i m a t i n g   o b j e c t   m o t i o n   F P G A     i m a g e   s e q u e n c e s   o p t i c a l   f l o w   a p p r o a c h   v a r y i n g   i l l u m i n a t i o n   c o n d i t i o n s   Co p y r i g h t   ©   2 0 1 2   I n s t i t u t e   o f   A d v a n c e d   E n g i n e e r i n g   a n d   S c i e n c e .     A l l   r i g h t s   r e s e r v e d .   C o r r e s p o n d i n g   A u t h o r :   J u l i o   C .   S o s a     D e p a r t m e n t   o f   P o s t - d e g r e e ,   S u p e r i o r   S c h o o l   o f   C o m p u t a t i o n ,       N a t i o n a l   P o l y t e c h n i c   I n s t i t u t e   ( I P N ) ,     M e x i c o   E m a i l :   j c s o s a ,   v g a r c i a o ,   r h t o v a r ] @ i p n . m x             1 .   I N T R O D U C T I O N   T h e   o p t i c a l   f l o w   a p p r o a c h   h a s   e m e r g e d   a s   a   m a j o r   t e c h n i q u e   f o r   e s t i m a t i n g   o b j e c t   m o t i o n   i n   i m a g e   s e q u e n c e s   [ 1 ] .   A d d i t i o n a l l y ,   n o v e l   t h e o r e t i c a l   a n a l y s i s   o f   m o t i o n   a n d   o p t i c a l   f l o w   e s t i m a t i o n   h a d   a p p e a r e d   [ 2 ] ,   [ 4 ]   a n d   [ 3 ] .   H o w e v e r ,   t h e   r e s u l t s   o b t a i n e d   b y   m o s t   o p t i c a l   f l o w   t e c h n i q u e s   a r e   p o o r   b e c a u s e   t h e y   a r e   a d v e r s e l y   a f f e c t e d   b y   l a r g e   i l l u m i n a t i o n   c h a n g e s   a n d   b y   m o t i o n   d i s c o n t i n u i t i e s .   R e c e n t l y   h o w e v e r ,   t h e r e   h a v e   b e e n   t w o   t r e n d s   i n   t h e   d e v e l o p m e n t   o f   o p t i c a l   f l o w   a l g o r i t h m s .   O n e   h a s   e m p h a s i z e d   h i g h e r   a c c u r a c y ;   t h e   o t h e r   f a s t e r   i m p l e m e n t a t i o n .   T h e s e   t w o   t r e n d s   h a v e   b e e n   i n d e p e n d e n t l y   p u r s e d ,   w i t h o u t   a d d r e s s i n g   t h e   a c c u r a c y   v s .   e f f i c i e n c y   t r a d e - o f f   [ 5 ] .     T h e   o p t i c a l - f l o w   c o m p u t a t i o n   c o n s i s t s   o n   t h e   e s t i m a t i o n   o f   t h e   a p p a r e n t   2 D   m o v e m e n t   f i e l d   i n   t h e   i m a g e   s e q u e n c e ,   a s   i n t r o d u c e d   b y   H o r n   a n d   S c h u n c k   [ 6 ] .   I n   t h i s   w a y ,   e a c h   p i x e l   h a s   a n   a s s o c i a t e d   v e l o c i t y   v e c t o r .   T h i s   t e c h n i q u e   c a n   b e   c o m b i n e d   w i t h   s e v e r a l   s e g m e n t a t i o n   t e c h n i q u e s   i n   o r d e r   t o   i m p r o v e   i t s   a c c u r a c y   o r   i m p l e m e n t   o b j e c t   t r a c k i n g .   M a n y   s t r a t e g i e s   f o r   o p t i c a l - f l o w   c o m p u t a t i o n   h a v e   b e e n   p u b l i s h e d   [ 7 ] .   A m o n g   t h e s e   m e t h o d s ,   t h e   g r a d i e n t - b a s e d   a n d   t h e   c o r r e l a t i o n - b a s e d   a p p r o a c h e s   a r e   t h e   t w o   m o s t   c o m m o n l y   u s e d   t e c h n i q u e s .   M o s t   o f   t h e   r e c e n t   a d v a n c e s   i n   o p t i c a l - f l o w   c o m p u t a t i o n   h a v e   f o c u s e d   t h e i r   i m p r o v e m e n t s   o n   a c h i e v i n g   a   h i g h   a c c u r a c y .   E x a m p l e s   o f   t h e s e   r e s e a r c h   f i e l d s   c a n   b e   f o u n d   i n   [ 8 ]   a n d   [ 9 ] .   M o r e o v e r ,   t h e r e   a r e   f e w   w o r k s   t h a t   f o c u s   o n   t h e   c o m p u t a t i o n   s p e e d   a s p e c t s ,   l i k e   t h e   a c h i e v e m e n t   o f   a   f a s t e r   s p e e d   w i t h   r e a l   t i m e   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2 0 8 9 - 4 8 6 4   I J R E S     V o l .   1 ,   N o .   1 ,     M a r c h   2 0 1 2   :     2 5     3 6   2 6 c o n s t r a i n s .   A d d i t i o n a l l y ,   i n n o v a t i v e   t h e o r e t i c a l   a n a l y s i s   o f   m o t i o n   a n d   o p t i c a l   f l o w   e s t i m a t i o n   e n c o u r a g e   t h e   u s e   o f   c u s t o m   e l e c t r o n i c   d e v i c e s   [ 1 0 ] ,   [ 1 1 ]   a n d   [ 1 2 ] .   T h e   c l a s s i c a l   a p p r o a c h   f o r   i m a g e   s e q u e n c e   a n a l y s i s   u s u a l l y   i n v o l v e s   f u l l   i m a g e   p r o c e s s i n g .   I n   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   t h e   s p a t i a l   a n d   t e m p o r a l   d e r i v a t i v e s   a r e   c a l c u l a t e d   f o r   a l l   p i x e l s   o n   a l l   i m a g e s ,   d e s p i t e   t h e   f a c t   t h a t   i m a g e s   c o u l d   h a v e   s u f f e r e d   m i n o r   c h a n g e s   f r o m   o n e   f r a m e   t o   t h e   n e x t .   T h e   i t e r a t i v e   f o r m   f o r   o p t i c a l   f l o w   c o m p u t a t i o n   c a n   b e   i m p l e m e n t e d   b y   s o f t w a r e   o n   a   g e n e r a l   p u r p o s e   m i c r o p r o c e s s o r .   H o w e v e r ,   i n   o r d e r   t o   p r o c e s s   i m a g e   s e q u e n c e s   i n   r e a l   t i m e   i t   i s   i n t e r e s t i n g   t o   u s e   p r o g r a m m a b l e   d e v i c e s ,   A S I C ,   a n a l o g   i n t e g r a t e d   c i r c u i t   V L S I   [ 1 3 ] ,   c l u s t e r s   o f   p r o c e s s o r s   [ 1 4 ]   o r   s p e c i a l   p r o c e s s o r s   [ 1 5 ] ,   t h o u g h   t h e s e   l a s t   s o l u t i o n s   a r e   n o t   p r a c t i c a l   a s   t h e y   a r e   v e r y   e x p e n s i v e .       F P G A s   h a v e   b e e n   c h o s e n   t o   d e v e l o p   a   c h e a p e r   a n   e a s i e r   p r o t o t y p e .   A   c u s t o m   a r c h i t e c t u r e   o f   t h i s   t y p e   w a s   p r o p o s e d   b y   A r r i b a s   &   M o n a s t e r i o   [ 1 6 ] .   T h e y   p r o c e s s e d   5 0 ´ 5 0   p i x e l s ,   i m a g e s   a t   1 9   f p s   u s i n g   o n l y   t h r e e   i t e r a t i o n   c y c l e s   p e r   e a c h   p a i r   o f   i m a g e s .   I n i t i a l l y ,   t h e   d e f a u l t   r e s u l t   i s   a s s u m e d   a s   a   z e r o   v a l u e   f o r   a l l   o p t i c   f l o w   f i e l d   v e c t o r s   p e r   i t e r a t i o n   c y c l e .   I n   a   m o r e   r e c e n t   w o r k ,   M a r t i n ,   e t   a l . ,   [ 1 7 ]   s h o w   a   n e w   o p t i c a l   f l o w   c o m p u t i n g   t e c h n i q u e .   I n   t h i s   w o r k ,   t h e   i t e r a t i o n s   a r e   m a d e   a m o n g   a   g r o u p   o f   s u c c e s s i v e   i m a g e s   i n   a n   i m a g e   s e q u e n c e ,   n o t   o n l y   b e t w e e n   a   p a i r   o f   t w o   c o n s e c u t i v e   i m a g e s .   I n   o t h e r   w o r d s ,   a   s i n g l e   i t e r a t i o n   p e r   i m a g e   p a i r   i s   p e r f o r m e d   a n d   t h e   r e s u l t s   a r e   u s e d   a s   i n p u t   f o r   a   s e c o n d   i t e r a t i o n ,   b u t   n o w   w i t h   a   n e w   p a i r   o f   i m a g e s .   T h i s   i d e a   i s   b a s e d   o n   t h e   a s s u m p t i o n   t h a t   c h a n g e s   b e t w e e n   t w o   c o n s e c u t i v e   i m a g e s   a r e   n e g l i g i b l e   a n d   t h e   r e s u l t s   o b t a i n e d   a r e   u s e f u l   f o r   a n   i t e r a t i v e   p r o c e s s .   M a r t i n   e t   a l .   p r e s e n t   r e s u l t s   a f t e r   p r o c e s s i n g   6 4   i m a g e s ,   b u t   u s i n g   o n l y   o n e   i t e r a t i o n   p e r   p a i r   o f   i m a g e s .   F i n a l l y ,   S o s a   [ 1 8 ]   s h o w s   a   n e w   o p t i c a l   f l o w   c o m p u t a t i o n   a r c h i t e c t u r e ,   w i t h   c h a n g e - d r i v e n   d a t a   f l o w   p r o c e s s i n g .   I n   t h a t   t h e   w o r k   i t   w a s   s h o w n   t h e   s y s t e m s   e f f e c t i v e n e s s   d e p e n d s   o n   t h e   p e r c e n t a g e   o f   s t a t i c   p i x e l s   w h o s e   v a r i a t i o n   i n t e n s i t y   i s   b e l o w   t h e   t h r e s h o l d ,   w h i c h   w a s   a   f i x e d   t h r e s h o l d ,   p r o c e s s i n g   2 5 6 ´ 2 5 6   p i x e l s ,   i m a g e s   a t   8 0   f p s   u s i n g   t e n   i t e r a t i o n   c y c l e s   p e r   p a i r   o f   i m a g e s .     I t   i s   i m p o r t a n t   t o   k n o w   t h a t   i n   r e a l   s c e n e s ,   t h e r e   w i l l   b e   i n e v i t a b l e   n o i s e   t h a t   c a n   r a n d o m l y   c h a n g e   p i x e l   i n t e n s i t y   v a l u e s .   F o r   t h i s   r e a s o n   i t   i s   n e c e s s a r y   t o   u s e   d y n a m i c a l l y   t h r e s h o l d   a d j u s t m e n t   t h a t   w i l l   s i g n i f i c a n t l y   r e d u c e   t h e   p r o b l e m .   R o b u s t n e s s   t o   v a r y i n g   i l l u m i n a t i o n   c o n d i t i o n s   i s   a c h i e v e d   b y   a n   i n n o v a t i v e   t e c h n i q u e   t h a t   c o m b i n e s   a   g r a d i e n t - b a s e d   o p t i c a l   f l o w   m e t h o d ,   c h a n g e - d r i v e n   p r o c e s s i n g   a n d   a n   a d a p t i v e   t h r e s h o l d .   T h i s   p a p e r   u s e s   t h e   s a m e   p r i n c i p l e s   o f   t h e   t h r e e   w o r k s   d e s c r i b e d   b e f o r e   i n   [ 1 0 ] ,   [ 1 6 ]   a n d   [ 1 7 ] :   i m a g e   c h a n g e s   b e t w e e n   t w o   c o n s e c u t i v e   i m a g e s   a r e   m i n o r   a n d   t h e   i m a g e   i n t e n s i t y   c h a n g e   a p p e a r s   d u e   t o   l o c a l   p i x e l   m o v e m e n t .   I n   t h i s   w a y ,   i f   t h e r e   a r e   n o t   i n t e n s i t y   c h a n g e s   i n   a n y   c o n s e c u t i v e   i m a g e s   p a i r   p i x e l s ,   t h e n   t h e r e   i s   n o   m o v e m e n t ,   a n d   t h e s e   i m a g e s   w i l l   n o t   b e   p r o c e s s e d .   T h e   s y s t e m   h a s   b e e n   d e v e l o p e d   f o r   i m p l e m e n t a t i o n   o n   a n   A l t e r a   d e v e l o p m e n t   b o a r d ,   w h i c h   i n c l u d e s   a   S t r a t i x   E P 1 S 6 0 F 1 0 2 0   F P G A   a n d   2 5 6   M B y t e s   o f   D D R   S D R A M   m e m o r y .   T h e   O v e r a l l   s y s t e m   w a s   d e s i g n e d   i n   V H D L   a n d   h a s   b e e n   s i m u l a t e d   u s i n g   M o d e l S i m .       2 .   T H E O R E T I C   A N A L Y S I S   I n   t h i s   s e c t i o n ,   t h e   o r i g i n a l   p r o b l e m   f o r   o p t i c a l - f l o w   c o m p u t a t i o n   a c c o r d i n g   t o   H o r n   &   S c h u n c k s   [ 6 ]   a l g o r i t h m   i s   c o n s i d e r e d ,   a n d   a n   i n n o v a t i v e   t e c h n i q u e   f o r   o p t i c a l   f l o w   c o m p u t a t i o n   i s   i n t r o d u c e d .   2 . 1   H o r n   &   S c h u n c k   O p t i c a l   F l o w   A l g o r i t h m   A c c o r d i n g   t o   [ 6 ] ,   a n d   d i s c u s s e d   i n   [ 1 8 ] ,   t h e   O p t i c a l   F l o w   c o m p u t a t i o n   i s   o b t a i n e d   b y :   , ) ( ) ˆ ˆ ( ˆ 2 2 2 1 y x t n y n x x n n E E E v E u E E u u + + + + - = + a   ( 3 )     , ) ( ) ˆ ˆ ( ˆ 2 2 2 1 y x t n y n x y n n E E E v E u E E v v + + + + - = + a   ( 4 )   w h e r e   u ) ,   v ) a r e   t h e   L a p l a c i a n   o f   v e l o c i t i e s   u ,   v   a n d   a   i s   a n   a d j u s t   p a r a m e t e r   a n d   E x ,   E y   a n d   E t   a r e   t h e   p a r t i a l   d e r i v a t e s   o f   i m a g e   i n t e n s i t y   r e l a t e d   t o   x ,     y   a n d   t   r e s p e c t i v e l y .   T h e s e   e q u a t i o n s   h a v e   a n   i t e r a t i v e   f o r m   b e c a u s e   u   a n d   v   a r e   f u n c t i o n   o f   u )   a n d v ) .   I f   t h e   i t e r a t i o n   n u m b e r   i s   m u c h   b i g g e r ,   t h e   r e s u l t   w i l l   b e   m o r e   a c c u r a t e ,   b u t   i t   w i l l   a l s o   i n c r e a s e   t h e   c a l c u l a t i o n   t i m e .   T h e   e q u a t i o n s   ( 3 )   a n d   ( 4 )   s h o w   a n   i t e r a t i v e   d e p e n d e n c e ,   t h u s   t h e   r e s u l t   d e p e n d s   o n   t h e   p r e v i o u s   c a l c u l a t i o n .     T h e   m e t h o d   u s e d ,   b y   H o r n   a n d   S c h u n c k   [ 6 ] ,   t o   d e t e r m i n e   a   m e a s u r e m e n t   o f   E x ,   E y   a n d   E t   i s :     Evaluation Warning : The document was created with Spire.PDF for Python.
I J R E S   I S S N :   2 0 8 9 - 4 8 6 4       R e a l - t i m e   O p t i c a l - f l o w   C o m p u t a t i o n   f o r   M o t i o n   E s t i m a t i o n   u n d e r   V a r y i n g   I l l u m i n a t i o n     ( J u l i o   C .   S o s a )   2 7 { 4 1 1 , 1 , 1 1 , , 1 , 1 , , , 1 , 1 , 1 , , , 1 , + + + + + + + + + + + - + - + - = k j i k j i k j i k j i k j i k j i k j i x E E E E E E E E   5 )   { 4 1 , 1 , 1 1 , , 1 , , 1 , 1 , , 1 , 1 , , , , 1 + + + + + + + + + + + - + - + - = k j i k j i k j i k j i k j i k j i k j i y E E E E E E E E   6 )   { 4 1 , 1 , 1 , 1 , 1 , 1 , , , 1 1 , , 1 , , 1 , , k j i k j i k j i k j i k j i k j i k j i t E E E E E E E E + + + + + + + + + + + - + - + - =   7 )   w h e r e   t h e   c o l u m n   i n d e x   j   c o r r e s p o n d s   t o   t h e   x   d i r e c t i o n   i n   t h e   i m a g e ,   t h e   r o w   i n d e x   i   t o   t h e   y   d i r e c t i o n ,   w h i l e   k   l i e s   i n   t h e   t i m e   d i r e c t i o n .   O n   t h e   o t h e r   h a n d ,   t h e   a p p r o a c h   u s e d   f o r   t h e   c a l c u l a t i o n   o f   t h e   L a p l a c i a n s   o f   u   a n d   v   i s :       { } { j i k j i k j i k j i k j i k j i k j i k j i u u u u u u u u , 1 , 1 , 1 , 1 , 1 , 1 , , , 1 , 1 , , , 1 , , 1 2 1 6 1 ˆ + + + - - - - + + - + + + + + + =   8 )     { } { j i k j i k j i k j i k j i k j i k j i k j i v v v v v v v v , 1 , 1 , 1 , 1 , 1 , 1 , , , 1 , 1 , , , 1 , , 1 2 1 6 1 ˆ + + + - - - - + + - + + + + + + =   9 )     I t   i s   n e c e s s a r y   t o   o b t a i n   t h e   s p a t i a l   a n d   t e m p o r a l   g r a d i e n t   v a l u e s   f o r   c o m p u t i n g   o p t i c a l - f l o w .   T o   d o   t h i s ,   a t   l e a s t   t w o   c o n s e c u t i v e   i m a g e s   o f   t h e   s e q u e n c e   a r e   r e q u i r e d .     2 . 2   C h a n g e - D r i v e n   I m a g e   P r o c e s s i n g   T h e   c h a n g e - d r i v e n   d a t a   f l o w   p r o c e s s i n g   h a s   b e e n   a p p l i e d   b e f o r e   a s   p a r t   o f   a n o t h e r   i m a g e   p r o c e s s i n g   a l g o r i t h m ,   b y   s o f t w a r e   [ 1 9 ]   a n d   b y   h a r d w a r e   [ 1 8 ] .   T h e   p r i n c i p l e   i s   b a s e d   o n   t w o   c o n s i d e r a t i o n s ;   a n   i m a g e   p i x e l ,   r e p r e s e n t i n g   a   p o i n t   o n   a n   o b j e c t ,   d o e s   n o t   c h a n g e   i t s   b r i g h t n e s s   v a l u e   f r o m   a n   i n s t a n t   o f   t i m e   t   t o   t h e   n e x t   i n s t a n t   o f   t i m e   t + d t ,   a n d   t h e   i m a g e s   u s u a l l y   c h a n g e   a   l i t t l e   f r o m   f r a m e   t o   f r a m e ,   e s p e c i a l l y   i f   t h e   a c q u i s i t i o n   t i m e   i s   s h o r t .   T h i s   j u s t i f i e s   t h e   e x i s t e n c e   o f   a   m o d u l e   t h a t   l o c a t e s   o n l y   t h e   p i x e l s   t h a t   h a v e   c h a n g e d .   T h e   i d e a   o f   s u c h   a   m o d u l e   i s   b i o l o g i c a l l y   i n s p i r e d .   T h e   e y e   c a n   w o r k   o v e r   a   l a r g e   r a n g e   o f   l u m i n a n c e   l e v e l s   [ 2 0 ] ;   i t   m u s t   a l s o   b e   a b l e   t o   h a n d l e   t h e   d i f f e r e n t   r a t e s   o f   c h a n g e   i n   l u m i n a n c e .   I n   t h e   s p a t i a l   d o m a i n ,   s p a t i a l   v i s i o n   c a n   b e   c h a r a c t e r i z e d   b y   t h e   c o n t r a s t   s e n s i t i v i t y   f u n c t i o n   ( C S F ) .     I n   t h i s   w o r k   t h e   p a r a m e t e r   C h a n g e   S e n s i t i v i t y   T h r e s h o l d   ( C S T )   i s   u s e d .   T h i s   c o n d i t i o n   c a n   b e   e x p r e s s e d   a s   f o l l o w s :   w h e n   t h e   p i x e l   i n t e n s i t y   l e v e l   d i f f e r e n c e   b e t w e e n   t w o   c o n s e c u t i v e   i m a g e s   i s   l e s s   t h a n   a   t h r e s h o l d ,   t h e n   t h i s   p i x e l   w i l l   n o t   b e   p r o c e s s e d .   T h i s   r e s t r i c t i o n   c a n   b e   w r i t t e n   w i t h   t h e   e q u a t i o n :     C h = {   1           m a g   >   C S T   ( 1 0 )   0           m a g £   C S T ,     w h e r e   m a g   i s   t h e   g r e y   l e v e l   d i f f e r e n c e ,   C S T   i s   t h e   t h r e s h o l d ,   a n   i n t e g e r   v a l u e   t h a t   i s   a l w a y s   s m a l l .   D e t e c t e d   c h a n g e   c h   w i l l   b e   1   i f   t h e r e   i s   a   c h a n g e   i n   t h e   p i x e l   o r   0   i f   n o t .   W i t h   s m a l l   v a l u e s   f o r   t h e   t h r e s h o l d   m a n y   p i x e l s   w i l l   b e   d e t e c t e d   a s   m o v i n g   p i x e l s   a n d   t h e r e   w i l l   n o t   b e   a   b i g   t i m e   r e d u c t i o n .   O n   t h e   o t h e r   h a n d ,   w i t h   h i g h e r   v a l u e s   f o r   t h e   t h r e s h o l d   a   m a j o r   s p e e d - u p   w i l l   b e   a c h i e v e d ,   b u t   w i t h   a   l o s s   o f   a c c u r a c y .   T h e   c h a n g e - d r i v e n   i m a g e   p r o c e s s i n g   t h e o r e t i c a l   s p e e d - u p   w a s   e s t i m a t e d   b y   s o f t w a r e   b e f o r e   t h e   h a r d w a r e   i m p l e m e n t a t i o n .   T h e   f o r m a l   o p t i c a l   f l o w   a n d   c h a n g e - d r i v e n   o p t i c a l   f l o w   a l g o r i t h m s   h a v e   b e e n   i m p l e m e n t e d   u s i n g   C + + .   T h e   a l g o r i t h m   i s   s i g n i f i c a n t l y   d i f f e r e n t ,   a n d   s u b s e q u e n t l y ,   t h e   c o m p u t i n g   r e s o u r c e s   n e e d e d   ( a n d   t h e r e f o r e   t h e   h a r d w a r e   r e q u i r e d )   a r e   r e d u c e d   w h e n   c h a n g e - d r i v e n   p r o c e s s i n g   i s   a p p l i e d .   A   l o o k - u p   t a b l e   ( L U T )   i s   n e c e s s a r y   t o   c o m p a r e   t w o   c o n s e c u t i v e   i m a g e s   a n d   d e t e c t   w h i c h   p i x e l s   h a v e   c h a n g e d   o n   t h e   i m a g e s .   O n l y   p i x e l s   t h a t   h a v e   c h a n g e d   ( a b o v e   C S T )   i n i t i a t e   t h e   c o r r e s p o n d i n g   p r o c e s s i n g   i n s t r u c t i o n s .   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2 0 8 9 - 4 8 6 4   I J R E S     V o l .   1 ,   N o .   1 ,     M a r c h   2 0 1 2   :     2 5     3 6   2 8 T h e   n u m b e r   o f   c l o c k   c y c l e s   n e e d e d   t o   i m p l e m e n t   t h e   o r i g i n a l   o p t i c a l   f l o w   a l g o r i t h m   c a n   b e   e x p r e s s e d   a s :       c y c l e s   =   8 ( m ´ n )   +   k ( 1 6 ( m ´ n ) + 5 ( m ´ n ) ) ,   ( 1 1 )     w h e r e   m ´ n   i s   t h e   i m a g e   s i z e   a n d   k   i s   t h e   n u m b e r   o f   i t e r a t i o n s .   T h e   f i r s t   t e r m   i n d i c a t e s   t h e   c y c l e s   n e e d   t o   e s t i m a t e   t h e   p a r t i a l   d e r i v a t i v e s ,   t h e   s e c o n d   t e r m   i n d i c a t e   t h e   c y c l e s   n e e d e d   t o   e s t i m a t e   t h e   v e l o c i t i e s   a n d   L a p l a c i a n .   T h e   o p t i c a l   f l o w   m o d i f i e d   a l g o r i t h m   c o m p u t a t i o n   c o s t   i s   r e p r e s e n t e d   a s :     c y c l e s   =   3 ( m ´ n ) +   8   r   ( m ´ n )   +   2 k r ( 1 6 ( m ´ n ) +   5 ( m ´ n ) ) ,   ( 1 2 )     w h e r e   r   i s   d e f i n e d   b y :       ) ( 1 n m ´ - = h r   ( 1 3 )     a n d   w h e r e   h   i s   t h e   n u m b e r   o f   p i x e l s   t h a t   d o e s   n o t   c h a n g e .   T h e r e   w i l l   b e   a   f e w   p i x e l s   t h a t   c h a n g e   a n d   s p e e d - u p   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   i f   t h e   C S T   i s   h i g h .   T h e   C S T   s e l e c t i o n   i s   a   v e r y   i m p o r t a n t   s t e p .   I t   i s   p o s s i b l e   t o   c o n c l u d e   t h a t   t h e   C S T   i s   a   c r i t i c a l   v a l u e   i n   c h a n g e - d r i v e n   p r o c e s s i n g   a l g o r i t h m s ,   a   t o o   l o w   v a l u e   m a y   i n c l u d e   s p u r i o u s   c h a n g e s ,   w h i l e   a   t o o   h i g h   v a l u e   w i l l   e r a s e   s i g n i f i c a n t   s c e n e   c h a n g e s .       3 .   C H A N G E   S E N S I T I V I T Y   T H R E S H O L D   S E L E C T I O N       T h e   C h a n g e   S e n s i t i v i t y   T h r e s h o l d   ( C S T )   s e l e c t i o n   i s   a   v e r y   i m p o r t a n t   s t e p .   T h e   f o c u s   i n   t h i s   s e c t i o n   i s   t o   d e t e r m i n e   w h a t   C S T   v a l u e   i s   t h e   b e s t ,   a n d   t h e   s t r a t e g y   f o r   C S T   c o m p u t a t i o n   o n   l i n e .   I n   [ 1 8 ]   t h e r e   i s   a n   e x a m p l e   o f   t h e   c h a n g e - d r i v e n   i m a g e   p r o c e s s i n g   p o l i c y   a p p l i e d   t o   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   w h e r e   a n   e m p i r i c a l   f i x e d   C S T   w a s   u s e d .   T h e   e x p e r i m e n t s   p e r f o r m e d ,   w i t h   c o n s t a n t   b r i g h t n e s s ,   r e c o m m e n d   a   C S T   l e s s   t h a n   f i v e   f o r   o b t a i n i n g   u s e f u l   r e s u l t s   i n   t h e   o p t i c a l   f l o w   c o m p u t a t i o n .   I t   w a s   s h o w n   t h a t   t h e   s y s t e m   e f f e c t i v e n e s s   d e p e n d s   o n   t h e   p e r c e n t a g e   o f   s t a t i c   p i x e l s   w h o s e   v a r i a t i o n   i n t e n s i t y   i s   b e l o w   t h e   C S T .   I t   i s   v e r y   i m p o r t a n t   t o   m a k e   o u t ,   t h a t :   t h e   H o r n   &   S c h u n c k s   f o r m u l a t i o n   a s s u m e s   t h a t   a n   i m a g e   p i x e l ,   r e p r e s e n t i n g   a   p o i n t   o n   a n   o b j e c t ,   d o e s   n o t   c h a n g e   i t s   b r i g h t n e s s   v a l u e   f r o m   a n   i n s t a n t   o f   t i m e   t   t o   t h e   n e x t   i n s t a n t   o f   t i m e   t + d t .   H o w e v e r ,   i n   a   r e a l i s t i c   s c e n e   t h i s   i s   a l m o s t   n e v e r   t h e   c a s e .   A   p i x e l   c a n   c h a n g e   i t s   b r i g h t n e s s   v a l u e   b e c a u s e   a n   o b j e c t   m o v e s   o r   b e c a u s e   t h e   i l l u m i n a t i o n   o f   t h e   s c e n e   c h a n g e s .   A s   a   r e s u l t ,   t h i s   n o i s e   w i l l   g i v e   a   n u m b e r   o f   f a l s e   p o s i t i v e s   t h a t   w i l l   r e d u c e   s y s t e m   a c c u r a c y   a n d   p e r f o r m a n c e .   H o w e v e r ,   d y n a m i c a l l y   a d a p t i n g   t h e   C S T   s i g n i f i c a n t l y   r e d u c e s   t h e   p r o b l e m ,   a n d   k e e p s   t h e   H o r n   &   S c h u n c k   f o r m u l a t i o n .   S o m e   i m a g e   s e q u e n c e s   a r e   u s e d   f o r   m o t i o n   e s t i m a t i o n   u n d e r   v a r y i n g   i l l u m i n a t i o n .   T h e   u t i l i z e d   s e q u e n c e s   a r e   c o m m o n l y   u s e d   a s   a   t e s t   b e n c h   f o r   o p t i c a l   f l o w   a l g o r i t h m   e v a l u a t i o n   p u r p o s e s .   T h e y   h a v e   b e e n   d o w n l o a d e d   f r o m   t h e   C o m p u t e r   S c i e n c e   D e p a r t m e n t   o f   t h e   U n i v e r s i t y   o f   W e s t e r n   O n t a r i o 1   a n d   f r o m   t h e   C o m p u t e r   V i s i o n   R e s e a r c h   G r o u p   a t   t h e   U n i v e r s i t y   o f   O t a g o 2 .   E a c h   s e q u e n c e   u s e d   h e r e   i s   r e p r e s e n t a t i v e   o f   t h r e e   c o m m o n   s i t u a t i o n s   i n   i m a g e   p r o c e s s i n g :   t h e   t a x i   s e q u e n c e   h a s   b e e n   a c q u i r e d   i n   a n   o u t d o o r   e n v i r o n m e n t   w i t h o u t   c o n t r o l l e d   i l l u m i n a t i o n   c o n d i t i o n s ;   t h e   R u b i c   s e q u e n c e   h a s   b e e n   t a k e n   f r o m   a n   i n d o o r   e n v i r o n m e n t   w i t h   c o n t r o l l e d   i l l u m i n a t i o n ,   a n d   s p h e r e   s e q u e n c e   h a s   b e e n   g e n e r a t e d   a r t i f i c i a l l y ,   w i t h o u t   t h e   n o i s e   i n t r o d u c e d   b y   m o s t   c a m e r a s   ( s y n t h e t i c   s e q u e n c e ) .   A l l   s e q u e n c e s   a r e   i n   B / W ,   w i t h   2 5 6   g r e y   l e v e l s ,   a s   s h o w n   i n   f i g u r e   1 .   T h e   p i x e l   i n t e n s i t y   l e v e l   i s   g i v e n   a s   a n   8 - b i t   b i n a r y   n u m b e r .   T h e   m i n i m u m   i n t e n s i t y   d i f f e r e n c e   i s   1   i n   t h i s   c a s e .   I f   t h e   C S T = 0 ,   t h e n   a l l   t h e   p i x e l s   a r e   p r o c e s s e d   a n d   t h e r e   a r e   n o   b e n e f i t s   i n   u s i n g   c h a n g e - d r i v e n   p r o c e s s i n g .   T h e   l a s t   c a s e   w i l l   n e v e r   b e   u s e d   b e c a u s e   i t   i n d i c a t e s   t h a t   t h e   t w o   c o n s e c u t i v e   i m a g e s   a r e   c o m p l e t e l y   d i f f e r e n t .   A   s m a l l   s t u d y   o f   t h e   t h r e e   s e q u e n c e s   s h o w e d   t h a t   t h e r e   a r e   c h a n g e s .   C o n s i d e r i n g   1 1   i m a g e   p a i r s   ( o f   e a c h   s e q u e n c e ) ,   a b o u t   7 0 %   o f   p i x e l s   d o   n o t   c h a n g e .   T h e   s p h e r e   s e q u e n c e   ( s y n t h e t i c   t y p e )   s h o w e d   t h a t   t h e   p e r c e n t   o f   p i x e l s   w i t h o u t   c h a n g e   i s   c o n s t a n t .   I t   i s   p o s s i b l e   t o   s e e   t h i s   i n   f i g u r e   1 .   A n   o p p o s i t e   b e h a v i o r   i s   p r e s e n t e d   b y   t h e   s e q u e n c e   t a x i .   I t   i s   a   n a t u r a l   s e q u e n c e ,   w h i c h   s h o w e d   t h e   s m a l l e s t   p e r c e n t   o f   p i x e l s   w i t h o u t   c h a n g e   a n d   h a s   a n   e r r a t i c   b e h a v i o r .   T h e   l a s t   s e q u e n c e   ( R u b i c ) ,   i s   a n   i n t e r m e d i a t e   p o i n t   b e t w e e n   t h e   t w o   p r e v i o u s   s e q u e n c e s .   T h e   s t u d i e s   i n d i c a t e   t h a t   t h e   s y n t h e t i c   s e q u e n c e s ,   s u c h   a s :   s p h e r e ,   s q u a r e 2 ,   t r a n s l a t i n g   a n d   d i v e r g i n g   t r e e   h a v e   a   p e r c e n t   o f   p i x e l s   w i t h o u t   c h a n g e   n e a r   t o   t h e   c o n s t a n t .   T h e n   i t   i s   n e c e s s a r y   t o   u s e   o n l y   a   C S T   =   1 .   T h e                                                                                                                         1   f t p . c s d . u w o . c a / p u b / v i s i o n .   2   h t t p : / / w w w . c s . o t a g o . a c . n z / r e s e a r c h / v i s i o n / .   Evaluation Warning : The document was created with Spire.PDF for Python.
I J R E S   I S S N :   2 0 8 9 - 4 8 6 4       R e a l - t i m e   O p t i c a l - f l o w   C o m p u t a t i o n   f o r   M o t i o n   E s t i m a t i o n   u n d e r   V a r y i n g   I l l u m i n a t i o n     ( J u l i o   C .   S o s a )   2 9 n a t u r a l   s e q u e n c e s   a r e   m o r e   c o m p l e x .   T h e   C S T   s e l e c t i o n   d e p e n d s   o n   e n v i r o n m e n t .   I t   w a s   n e c e s s a r y   t o   d e v e l o p   a   s t r a t e g y   t o   d y n a m i c a l l y   a d a p t   t h e   C S T .         d )   F i g u r e   1 .   S e q u e n c e s   u s e d   a n d   t h e i r   c h a n g e s   i n   1 1   i m a g e   p a i r s .     T h e   s e l e c t i o n   o f   a n   a p p r o p r i a t e   a l g o r i t h m   i s   n o t   a n   e a s y   c h o i c e   s i n c e   e a c h   a l g o r i t h m   m a k e s   d i f f e r e n t   a s s u m p t i o n s   a b o u t   t h e   i m a g e   c o n t e n t   o r   e n v i r o n m e n t   c h a r a c t e r i s t i c s .   O u r   a p p r o a c h   t a k e s   t h e   a v e r a g e   â   o f   g r a y   l e v e l   p i x e l   s e t .   I d e a l l y ,   t h e   w h o l e   i m a g e   s h o u l d   b e   a n   a v e r a g e   i n   o r d e r   t o   c o m p u t e   t h e   i m a g e   a v e r a g e   g r e y   l e v e l ,   b u t   t h i s   i s   n o t   n e c e s s a r y .   T h e   p r i n c i p l e   i s   s i m p l e .   I f   t h e r e   a r e   n o t   c h a n g e s   b e t w e e n   t w o   c o n s e c u t i v e   i m a g e s ,   t h a t   i s ,   t h e   b r i g h t n e s s   i s   c o n s t a n t   a n d   t h e r e   i s   n o t   m o v e m e n t ,   t h e n   t h e   g r e y   l e v e l   a v e r a g e   m u s t   b e   t h e   s a m e   f o r   e a c h   i m a g e .   H o w e v e r ,   i f   t h e r e   i s   n o t   m o v e m e n t   b u t   t h e r e   a r e   i l l u m i n a t i o n   o r   b r i g h t n e s s   c h a n g e s   t h e n   t h e   g r e y   a v e r a g e   i s   d i f f e r e n t   b e t w e e n   t w o   c o n s e c u t i v e   i m a g e s .   T h i s   d i f f e r e n c e   w i l l   d e t e r m i n e   t h e   C S T   v a l u e   u s e d   t o   i m p l e m e n t   t h e   c h a n g e - d r i v e n   i m a g e   p r o c e s s i n g .   T h e n ,   i t   i s   p o s s i b l e   t o   t a k e   s e v e r a l   p i x e l s   ( n o t   a l l   i m a g e )   t o   c o m p u t e   t h e   i m a g e   a v e r a g e   g r e y   l e v e l .   T h e r e f o r e ,   t h e   d i f f e r e n c e   b e t w e e n   t w o   c o n s e c u t i v e   a v e r a g e s   ( o f   t w o   c o n s e c u t i v e   i m a g e s ) ,   w i l l   i n d i c a t e   t h e   a p p r o p r i a t e   C S T .   I n   [ 2 0 ]   t h e   g r e y   l e v e l   a v e r a g e   w a s   c o m p u t e d   b y :     , ) , ( ´ = m i n j n m j i p a )   ( 1 4 )     w h e r e   m ´ n   d e n o t e   t h e   g r i d   d i m e n s i o n ,   i   a n d   j   a r e   t h e   p i x e l   c o o r d i n a t e s   ( t h e y     a r e   n o t   c o n s e c u t i v e   p i x e l s ,     i ,   j   = 1 k ,   2 k ,     k ³ 1 ,   i f   k   =   1   a l l   t h e   i m a g e   i s   a v e r a g e ) .   T h e   g r e y   l e v e l   a v e r a g e   w a s   c o m p u t e d   o f f - l i n e .     I n   t h i s   w o r k   t h e   g r e y   l e v e l   a v e r a g e   w a s   c o m p u t e d   o n   l i n e   a n d   b y   e x p e r i m e n t a t i o n   w i t h   d i f f e r e n t   i m a g e   s e q u e n c e s   i n   o r d e r   t o   d e t e r m i n e   t h e   t o t a l   a m o u n t   o f   p i x e l s   n e e d e d .   T h e n ,   i t   w a s   n e c e s s a r y   t o   c o n s i d e r :   1 )   t h e   m e m o r y   a c c e s s e s   a r e   i n   b u r s t s   o f   3 2   b y t e s ,   2 )   a n   a c c u m u l a t o r   r e g i s t e r   w a s   u s e d ,   3 )   t h e   p i x e l   s e t   m u s t   b e   d i s t r i b u t e d   i n   e a c h   i m a g e   w i n d o w ,   8   w i n d o w s ,   o f   3 2   ×   3 2   p i x e l s   w e r e   u s e d ,   i n   e a c h   i m a g e   a n d   4 )   t h e   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2 0 8 9 - 4 8 6 4   I J R E S     V o l .   1 ,   N o .   1 ,     M a r c h   2 0 1 2   :     2 5     3 6   3 0 e a s i e s t   w a y   t o   c o m p u t e   t h e   v a l u e   w a s   t o   o b t a i n   a   p i x e l   s e t   w i t h   a   p o w e r   o f   t w o   n u m b e r s   o f   p i x e l .   T h e n ,   t h e   i n t e g e r   d i v i s i o n   c o n s i s t s   o f   o n l y   r i g h t   s h i f t s .         4 .   A R C H I T E C T U R E   T h e   d i a g r a m   o f   t h e   h a r d w a r e   p l a t f o r m   u s i n g   a   S t r a t i x   P C I   d e v e l o p m e n t   b o a r d ,   w h i c h   u s e s   a   S t r a t i x   E P 1 S 6 0 F 1 0 2 0   F P G A   t o   i m p l e m e n t i n g   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   s t r a t e g y   d i s c u s s e d   i n   t h e   p r e v i o u s   s e c t i o n s ,   i s   s h o w n   i n   F i g u r e   2 .     F i g u r e   2 .   D i a g r a m   o f   t h e   h a r d w a r e   p l a t f o r m   u s i n g   a   S t r a t i x   P C I   d e v e l o p m e n t   b o a r d   a n d   o t h e r   c o m p o n e n t s   u s e d   b y   t h e   s y s t e m .   T h e   F P G A   a r c h i t e c t u r e   h a s   b e e n   d i v i d e d   i n t o   f i v e   m o d u l e s :   t h r e s h o l d   s e l e c t i o n   m o d u l e ,   G r a d i e n t / L U T   m o d u l e ,   d a t a   s e l e c t i o n   m o d u l e ,   v e l o c i t i e s   m o d u l e   a n d   f i n a l l y   t h e   L a p l a c i a n   m o d u l e .   T h e   m o d u l e s   h a v e   b e e n   d e s c r i b e d   i n   [ 1 8 ] .   T h e   m a i n     c h a n g e s ,   i n   t h i s   w o r k ,   w e r e   t h e   T r e s h o l d   S e l e c t i o n   M o d u l e   a n d   D a t a   S e l e c t i o n   M o d u l e .   T h e   o p t i c a l   f l o w   a l g o r i t h m   r e q u i r e s   a   l a r g e   F I F O   m e m o r y   t h a t   c a n   b e   i m p l e m e n t e d   i n   t h e   F P G A .     T h e   E P 1 S 6 0 F 1 0 2 0 C 6   h a s   5 , 2 1 5 , 1 0 4   R A M   b i t s .     I t   m u s t   b e   n o t e d   t h a t   t h e   c a l c u l a t i o n s   m a d e   w i t h   t h e   h a r d w a r e   m o d u l e s   a r e   i m p l e m e n t e d   u s i n g   i n t e g e r   a r i t h m e t i c ,   s i n c e   i t   r e q u i r e s   l e s s   r e s o u r c e s   t h a n   a   f l o a t i n g   p o i n t   a p p r o a c h .   T h e   d i v i s i o n s   h a v e   b e e n   n o r m a l i z e d   t o   t h e   p o w e r   o f   t w o   a n d   i m p l e m e n t e d   a s   a   r i g h t   s h i f t .   T h e   i d e a   i s   t o   o p t i m i z e   t h e   u s e   o f   r e s o u r c e s   a n d   t o   i n c r e a s e   t h e   s p e e d   o f   t h e   s y s t e m .     4 . 1   T h r e s h o l d   S e l e c t i o n   M o d u l e   T h e   t h r e s h o l d   s e l e c t i o n   m o d u l e   c o m p u t e s   t h e   a v e r a g e   p i x e l   s e t   g r e y   l e v e l .   T h e   p i x e l   a m o u n t   i s   a   p o w e r   o f   t w o .   T h u s   i t   i s   n o t   n e c e s s a r y   t o   i m p l e m e n t i n g   a   d i v i s i o n ,   w h i c h   i s   a   t i m e   o c c u p y i n g   o p e r a t i o n .   T h e   p i x e l   s e t   w a s   f i x e d   a s   a   g r i d   o f   8   ´   8   p i x e l s   u n i f o r m l y   d i s t r i b u t e d   a l o n g   t h e   i m a g e .   T h a t   a l l o c a t i o n   g i v e s   a   t o t a l   o f   6 4   p i x e l s   p e r   i m a g e .   T h i s   m o d u l e   a r c h i t e c t u r e   i s   v e r y   s i m p l e .   A   f a s t - c a r r y   a d d e r   a n d   a   r i g h t   s h i f t e r   h a v e   b e e n   e m p l o y e d .     F i g u r e   3 .   T h r e s h o l d   m o d u l e   b l o c k   d i a g r a m .   C P U P C I   B u s M e g a C o r e P C I F P G A M e m o r i a S t r a t i x   P C I   D e v e l o p m e n t   B o a r d S D R A M P C I /   F i r e   W i r e C A R D O p t i c a l   F l o w c o m p u t a t i o n C A M E R A V I D E O C A R D M O N I T O R i n p u t s A D D A c c u m u l a t o r / s h i f t -   r i g h t   r e g i s t e r o u t p u t - d a t e Evaluation Warning : The document was created with Spire.PDF for Python.
I J R E S   I S S N :   2 0 8 9 - 4 8 6 4       R e a l - t i m e   O p t i c a l - f l o w   C o m p u t a t i o n   f o r   M o t i o n   E s t i m a t i o n   u n d e r   V a r y i n g   I l l u m i n a t i o n     ( J u l i o   C .   S o s a )   3 1 T h e   l a t e n c y   o f   t h i s   m o d u l e   i s   5 , 1 3 0   c l o c k   c y c l e s   a t   1 6 6   M H z .   T h i s   t i m e   i s   n e c e s s a r y   t o   r e a d   t h e   p i x e l s   f r o m   m e m o r y .   T h e   a c c e s s   m e m o r y   f r e q u e n c y   i s   1 3 3 M H z .   T h e   C S T   i s   c o m p u t e d   a n d   s e n t   t o   t h e   G r a d i e n t / L U T   m o d u l e   s o   t h e   c h a n g e   t a b l e   ( L U T )   c a n   b e   b u i l t .   I t   i s   n e c e s s a r y   a n   a c c u m u l a t o r   r e g i s t e r   t o   a d d   t h e   r e a d   p i x e l s ,   i n   t h i s   s t a g e ,   s e e   f i g u r e   3 .   A t   t h e   e n d   o f   t h i s   p r o c e s s   a   s h i f t - r i g h t   i m p l e m e n t e d   d i v i s i o n   m u s t   b e   e x e c u t e d .   B e c a u s e   o f   t h i s ,   i t   i s   n e c e s s a r y   t h a t   t h e   p i x e l s   n u m b e r   b e   a   p o w e r   o f   2 .     4 . 2   D a t a   S e l e c t i o n   M o d u l e   T h e   o u t p u t s   o f   g r a d i e n t   E x ,   E y   a n d   E t   m u s t   b e   7 2   b i t s ,   t o   a l l o w   a   s i g n e d   w o r d   a s s u m i n g   e a c h   p i x e l   i s   9   b i t   ( 2   c o m p l e m e n t ) ,   a s   s h o w n   i n   f i g u r e   6 .   T h r e e   F I F O   m e m o r i e s   w i t h   3 2   w o r d s   o f   2 1 6   b i t s   e a c h ,   a r e   u s e d   f o r   s t o r i n g   t h e   o u t p u t s .   A t   t h e   s a m e   t i m e   t h e   o u t p u t   L U T   i s   s t o r e d   i n   a   3 2   ×   8   F I F O   m e m o r y .   T h e   L U T   a c c e s s   a n d   d a t a   s e l e c t i o n   a r e   d r i v e n   b y   t h e   s e l e c t i o n   c o n t r o l l e r   m o d u l e .   T h e   d a t a   s e l e c t i o n   m o d u l e   r e a d s   t h e   L U T   i n   o r d e r   t o   k n o w   w h i c h   o f   t h e   p i x e l s   h a s   c h a n g e d   s o   t h e   s e l e c t i o n   o f   E x ,   E y   a n d   E t   c o m p o n e n t s   c a n   b e   s t a r t e d .   T h e n ,   t h e   d a t a   p r o c e s s i n g   b e g i n s   w h e n   t h e   f i r s t   L U T   w o r d   i s   r e a d .   A n   e x a m p l e   o f   t h i s   i s   s h o w n   i n   f i g u r e   4   w h e n   t h e   f i r s t   w o r d   i s   L U T   =   [ 0 1 0 1 1 0 0 0 ] ,   n o t e   t h a t   o n l y   t h r e e   p i x e l s   h a v e   c h a n g e d   L U T ( 6 ) ,   L U T ( 4 )   a n d   L U T ( 3 ) .   T h i s   i n d i c a t e s   t h a t   ( 6 , 4 , 3 )   c o m p o n e n t s   f r o m   E x ,   E y   a n d   E t   w e r e   s e l e c t e d ,   a l s o   t h a t   t h e   i n i t i a l   l a p l a c i a n   v a l u e s   ( L U   a n d   L V )   w e r e   i n t r o d u c e d   i n   o r d e r   t o   c o m p u t e   t h e   s p e e d ,   a l l   t h e   r e s u l t s   a r e   s t o r e d   i n   a   n e w   F I F O   w i t h   2 5 6   w o r d s   o f   4 5   b i t s .   W h e n   t h e   r e a d i n g   o f   e a c h   w o r d   f r o m   t h e   L U T   i s   c o m p l e t e d ,   e a c h   w o r d   i s   s t o r e d   i n   a   n e w   F I F O   m e m o r y   c a l l e d   L U T 2 .       F i g u r e   4 .   D a t a   s e l e c t i o n   m o d u l e .     O n e   a d d i t i o n a l   f u n c t i o n   o f   t h e   s e l e c t i o n   c o n t r o l l e r   m o d u l e   i s   t o   r e a d   t h e   e s s e n t i a l   c o m p o n e n t s   a n d   s t o r e   t h e m   i n   t h e   F I F O _ v e l _ i n     m e m o r y   s o   t h e   n e x t   i t e r a t i o n s   c a n   b e   p e r f o r m e d .     L e e r W r i t e F I F O L U T [ 7 . . 0 ] 0 1 0 1 1 0 0 0 8   x   9   b i t s 8   x   9   b i t s 8   x   9   b i t s 8   b i t s m o d _ L U T / G r a d G r a d i e n t   c o m p u t i n g I x G r a d i e n t   c o m p u t i n g I y G r a d i e n t   c o m p u t i n g I t C h a n g e   d e t e c t i o n c h F O R   i   I N   0   T O   7   L O O P     I F   L U T ( i )   =   ' 1 '     T H E N C A S E   i     O F     W H E N   0   = > O U T   < = I x 0 & I y 0   & I t 0 ;       W H E N   1   = > O U T   < = I x 1 & I y 1   & I t 1 ;       W H E N   2   = > O U T   < = I x 2 & I y 2   & I t 2 ;     W H E N   3   = > O U T   < = I x 3 & I y 3   & I t 3 ;     W H E N   4   = > O U T   < = I x 4 & I y 4   & I t 4 ;     W H E N   5   = > O U T   < = I x 5 & I y 5   & I t 5 ;     W H E N   6   = > O U T   < = I x 6 & I y 6   & I t 6 ;     W H E N   7   = > O U T   < = I x 7 & I y 7   & I t 7 ;       E N D   I F E N D   L O O P                             O U T P U T F I F O I y [ 7 1   . .   0 ] I y 7 I y 6 I y 5 I y 4 I y 3 I y 2 I y 1 I y 0 F I F O I t [ 7 1   . .   0 ] I t 7   I t 6   I t 5   I t 4   I t 3   I t 2   I t 1   I t 0 0 1 0 1 1 0 0 0 F I F O L U T 2 I x 6             I y 6             I t 6               0                 0 I x 4             I y 4             I t 4                 0               0 I x 3             I y 3             I t 3                 0               0 T o   v e l o c i t y   m o d u l e f i f o _ g r a d _ o u t f i f o _ v e l _ i n       2 5 6   w o r d s   o f     4 5   b i t s F I F O I x [ 7 1   . .   0 ] I x 7 I x 6 I x 5 I x 4 I x 3 I x 2 I x 1 I x 0 L U i n i L V i n i I t I y I x L U L V S e l e c t M U X M U X M U X M U X M U X F r o m   m e m o r y f i f o _ l a p l a _ o u t Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2 0 8 9 - 4 8 6 4   I J R E S     V o l .   1 ,   N o .   1 ,     M a r c h   2 0 1 2   :     2 5     3 6   3 2 5 .   R E S U L T S   I n   t h i s   s e c t i o n   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   p e r f o r m e d   b y   t h e   h a r d w a r e   s y s t e m   i s   c o m p a r e d   t o   a   f l o a t i n g - p o i n t   s o f t w a r e   i m p l e m e n t a t i o n .   T h e   h a r d w a r e   m o d u l e s   a r e   i m p l e m e n t e d   u s i n g   i n t e g e r   a r i t h m e t i c .   A d d i t i o n a l l y ,   a   s t u d y   w a s   m a d e   t o   a n a l y z e   t h e   a c c u r a c y   o f   t h e   m o d e l   p r o p o s e d   i n   r e l a t i o n   t o   t h e   o r i g i n a l   H o r n   &   S c h u n c k   m o d e l   ( w i t h o u t   t h e   c h a n g e - d r i v e n   p o l i c y )   u s i n g   1 0   i t e r a t i o n s .   T h e   a l g o r i t h m   a n d   i m a g e s   s e q u e n c e s   a r e   a v a i l a b l e   f r o m   ( f t p : / / f t p . c s d . u w o . c a / p u b / v 3 i s i o n / )   a n d   f r o m   h t t p : / / w w w . c s . o t a g o . a c . n z / r e s e a r c h / v i s i o n .     5 . 1   H a r d w a r e   P l a t f o r m   T h i s   d e s i g n   w a s   i m p l e m e n t e d   o n   t h e   S t r a t i x   P C I   d e v e l o p m e n t   b o a r d ,   w i t h   a   F P G A   ( E P 1 S 6 0 F 1 0 2 0 ) .   T h e   d e v i c e   h a s   5 7 , 1 2 0   L o g i c   E l e m e n t s   ( L E ) ,   1 4 4   d i g i t a l   s i g n a l   p r o c e s s i n g   ( D S P )   b l o c k   w i t h   ( 9 - b i t   ×   9 - b i t )   e m b e d d e d   m u l t i p l i e r s   a n d   5 , 2 1 5 , 1 0 4   m e m o r y   b i t s .   A d d i t i o n a l l y ,   t h e   d e v e l o p m e n t   b o a r d   h a s   2 5 6 - M B y t e   o f   e x t e r n a l   P C 3 3 3   D D R   S D R A M .   I t   i s   v e r y   i m p o r t a n t   b e c a u s e   w h e n   u s i n g   f o r   c o m p u t e r   v i s i o n   t a s k ,   h i g h - s p e e d   m e m o r y   i s   c r i t i c a l .   A l l   t h e   a r c h i t e c t u r e   h a s   b e e n   d e v e l o p e d   i n   V H D L .   S e v e r a l   t e s t s   w e r e   p e r f o r m e d   b e f o r e   s y n t h e s i s   t o   v a l i d a t e   t h e   d e s i g n .   D i f f e r e n t   t o o l s   w e r e   u s e d   d e p e n d i n g   o n   t h e   p a r t   o f   t h e   i m p l e m e n t e d   s y s t e m   b e i n g   c o n s i d e r e d .   F i r s t   t h e   p r o c e s s i n g   m o d u l e s   i n c l u d e d   i n t o   F P G A   w e r e   t e s t e d   e m p l o y i n g   Q u a r t u s   I I   s o f t w a r e .   N e x t   t h e   s y s t e m   w a s   s i m u l a t e d   i n c l u d i n g   t h e   S D R A M   m o d u l e s   a n d   t h e   p c i _ m t 3 2   M e g a C o r e   f u n c t i o n   [ A U G   0 4 ] .   I n   t h i s   s t a g e   s y n t h e t i c   i m a g e s   w e r e   u s e d   a s   w e l l   a s   r e a l   i m a g e   s e q u e n c e s .   F i n a l l y   t h e   o v e r a l l   s y s t e m   w a s   s y n t h e s i z e d   w i t h   t h e   P C I   a n d   S D R A M   c o n t r o l l e r   r e s t r i c t i o n s .     T h e   w h o l e   d e s i g n   u t i l i z e d   1 7 ,   6 5 0   L o g i c   E l e m e n t s   ( 3 1 %   o f   t h e   t o t a l   5 7 , 1 2 0 ) ,   3 , 1 9 9 , 8 7 4   R A M   b l o c k   b i t s   ( 6 1 %   o f   t h e   t o t a l   5 , 2 1 5 , 1 0 4 )   a n d   8   D S P   b l o c k   9 - b i t s   e l e m e n t s   ( 6 %   o f   t h e   t o t a l   1 4 4 ) .     5 . 2   S y n t h e t i c   I m a g e   S e q u e n c e s   T h e   m a i n   a d v a n t a g e s   o f   s y n t h e t i c   i n p u t s   a r e   t h a t   2 - D   m o t i o n   f i e l d   a n d   s c e n e   p r o p e r t i e s   c a n   b e   c o n t r o l l e d   a n d   t e s t e d   i n   a   m e t h o d i c a l   f a s h i o n .   I n   p a r t i c u l a r ,   i t   i s   p o s s i b l e   t o   a c c e s s   t h e   t r u e   2 - D   m o t i o n   f i e l d   a n d   q u a n t i f y i n g   p e r f o r m a n c e .         T h i s   d e s i g n   w a s   t e s t e d   o n   t w o   s y n t h e t i c   s e q u e n c e s   t o   s h o w   i t s   e f f e c t i v e n e s s .   T h e   u s e   o f   s y n t h e t i c   s e q u e n c e s   i n d i c a t e s   t h a t   C S T   m u s t   b e   m i n i m u m   ( t h a t   i s   1 ) ,   a s   e x p l a i n   i n   s e c t i o n   3 .   B o t h   s e q u e n c e s   ( s q u a r e 2   a n d   t r e e d )   h a v e   a n   e s t a b l i s h e d   g r o u n d   t r u t h   a n d   a r e   c o m m o n l y   u s e d   f o r   b e n c h m a r k i n g .   A   b i t   l e v e l   s i m u l a t i o n   c o d e d   i n   M A T L A B   w a s   p r o g r a m m e d   t o   e v a l u a t e   t h e   a l g o r i t h m s   a c c u r a c y .   I n   a l l   c a s e s   1 0   i t e r a t i o n s   w a s   u s e d .     T h e   f i r s t   s e q u e n c e   t e s t e d   w a s   t h e   s q u a r e 2   s e q u e n c e ;   t h e   u s e d   f r a m e s   w e r e   6   a n d   7 .   T h e   a n g u l a r   e r r o r   o f   t h e   s q u a r e 2   s e q u e n c e   w a s   2 . 3 º ,   i n   h a r d w a r e   i m p l e m e n t a t i o n .   B u t ,   i n   t h e   s t a n d a r d   d e v i a t i o n   w a s   9 . 9 º ,   i s   b e s t   r e s p e c t   t o   f u l l   p r o c e s s i n g   s o f t w a r e   i m p l e m e n t a t i o n ,   a s   c a n   b e   s e e n   i n   t a b l e   1 .   A   m o r e   c o m p l e x   s y n t h e t i c   s e q u e n c e   w a s   t e s t e d ,   t h e   D i v e r g i n g   T r e e   s e q u e n c e .   I n   t h i s   s e q u e n c e ,   t h e   c a m e r a   m o v e s   a l o n g   i t s   l i n e   o f   s i g h t ;   t h e   e x p a n s i o n   f o c u s   i s   a t   t h e   c e n t r e   o f   t h e   i m a g e   s c e n e ,   a n d   i m a g e   s p e e d s   v a r y   f r o m   1 . 2 9   p i x e l s / f r a m e   o n   l e f t   s i d e   t o   1 . 8 6   p i x e l s / f r a m e   o n   t h e   r i g h t ;   t h e   u s e d   f r a m e s   2 0   a n d   2 1 .     I n   t h i s   s e q u e n c e   t h e   r e l a t i v e   a n g u l a r   e r r o r   w a s   8 . 0 6 º   a n d   t h e   r e l a t i v e   S t .   D e v   w a s   2 . 0 º .   I t   i s   n o t   a   b e s t   a c c u r a t e ,   t h e   r e a s o n   i s   t h a t   o n l y   1 0   i t e r a t i o n s   w e r e   e x e c u t e d   a n d   t h e   o p e r a t i o n s   w e r e   p e r f o r m e d   u s i n g   i n t e g e r   a r i t h m e t i c .     T a b l e   1 .   S o f t w a r e   a n d   h a r d w a r e   i m p l e m e n t a t i o n   e r r o r   c o m p a r i s o n .   O p t i c a l   F l o w   F u l l   P r o c e s s i n g   ( O F F P ) ,   C h a n g e   D r i v e n   H a r d w a r e   O p t i c a l   F l o w .   S e q u e n c e   O F F P   C D H O F   A .   E r r o r   S t .   D e v .   A .   E r r o r   R e l a t i v e   E r r o r   S t .   D e v .   S q u a r e 2   5 5 . 2 2 º   1 1 . 1 9 º   5 7 . 6 0 º   2 . 3 7 º   9 . 9 0 º   T r e e d   1 3 . 5 6 º   1 1 . 7 9 º   2 1 . 6 2 º   8 . 0 6 º   1 3 . 8 0 º       5 . 3   R e a l   I m a g e   S e q u e n c e s   T h r e e   r e a l   s e q u e n c e s   w e r e   a l s o   u s e d   t o   t e s t   t h e   p e r f o r m a n c e   o f   t h e   p r o p o s e d   a l g o r i t h m .   T h e r e   a r e   t w o   t y p e s   o f   t e s t s :   a )   m o v e m e n t   a n d   i l l u m i n a t i o n   c h a n g e s   a n d   b )   n o   m o v e m e n t   b u t   w i t h   i l l u m i n a t i o n   c h a n g e s .             Evaluation Warning : The document was created with Spire.PDF for Python.
I J R E S   I S S N :   2 0 8 9 - 4 8 6 4       R e a l - t i m e   O p t i c a l - f l o w   C o m p u t a t i o n   f o r   M o t i o n   E s t i m a t i o n   u n d e r   V a r y i n g   I l l u m i n a t i o n     ( J u l i o   C .   S o s a )   3 3 T h e r e   i s   m o v e m e n t   a n d   t h e r e   a r e   i l l u m i n a t i o n   c h a n g e s .   F i g u r e   5   s h o w s :   5 a )   R u b i c   s e q u e n c e ;   t h a t   u s e d   t h e   f r a m e s   6   a n d   7 ,   5 b )   t a p e c   s e q u e n c e ;   t h a t   u s e d   f r a m e s   4 0   a n d   4 1 .   I n   e a c h   s e q u e n c e   i s   c o m p u t e d   t h e   O F F P   ( b y   s o f t w a r e )   a n d   C D H O F   ( b y   h a r d w a r e ) .   T r a d i t i o n a l l y ,   i n   o r d e r   t o   o b t a i n   t h e   c a l c u l a t e d   o p t i c a l   f l o w   v e c t o r s   b y   s o f t w a r e ,   i t   i s   n e c e s s a r y   t o   p r o c e s s   a l l   t h e   p i x e l s   f r o m   t w o   c o n s e c u t i v e   i m a g e s .   T h a t   i s   w h y   t h e   r e s u l t s   s h o w   a   g r e a t   a m o u n t   o f   o p t i c a l   f l o w   v e c t o r s .   N e v e r t h e l e s s ,   m a n y   o f   t h e s e   v e c t o r s   d o   n o t   m e a n   r e a l   m o v e m e n t   a n d   i t s   e x i s t e n c e   i s   t h e   r e s u l t   o f   i l l u m i n a t i o n   o r   b r i g h t n e s s   c h a n g e s .   I n   t h i s   w o r k ,   c h a n g e   d r i v e n   i m a g e   p r o c e s s i n g   ( C D I P )   i s   u s e d   i n   c o n j u n c t i o n   w i t h   a n   i n n o v a t i v e   h a r d w a r e   a r c h i t e c t u r e ,   s o   t h e   a m o u n t   o f   o p t i c a l   f l o w   v e c t o r s   r e p r e s e n t i n g   r e a l   o b j e c t   m o v e m e n t   i s   a   m a j o r   p r o p o r t i o n .   I t   i s   p o s s i b l e   t o   s e e   t h a t   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   b y   s o f t w a r e   i s   d e n s e r   p e r   i m a g e   t h a n   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   b y   h a r d w a r e .   M a n y   o f   t h o s e   v e c t o r s   f r o m   t h e   s o f t w a r e   c o m p u t a t i o n   a r e   t h e   r e s u l t   o f   n o i s e   a n d   i n t e r f e r e n c e ,   a n d   t h e i r   p r e s e n c e   p u z z l e s   t h e   c l e a r   i d e n t i f i c a t i o n   o f   m o v i n g   o b j e c t s   w i t h i n   t h e   s c e n e .       a )   b )   F i g u r e   5 :   S h o w s   a   f r a m e s   o f   t h e   R u b i c   s e q u e n c e   a n d   t a p e c   s e q u e n c e ,   a n d     i t s   c a l c u l a t e d   o p t i c a l   f l o w   v e c t o r ,   l e f t   t o   r i g h t ,   b y   s o f t w a r e   a n d   h a r d w a r e   c o m p u t a t i o n .     O n   t h e   o t h e r   w a y ,   t h e r e   a r e   a   f e w   o p t i c a l   f l o w   v e c t o r s   r e s u l t e d   f r o m   t h e   h a r d w a r e   a r c h i t e c t u r e   c o m p u t a t i o n ,   a n d   t h e   m a j o r   p o r t i o n   o f   t h e m   a r e   p r o d u c e d   b y   t h e   m o v i n g   o b j e c t s .   A d d i t i o n a l l y ,   i t   i s   p o s s i b l e   t o   o b s e r v e   t h a t   t h e   a c h i e v e d   i m a g e   i s   b e s t   f o r   d i s t i n g u i s h i n g   t h e   m o v i n g   o b j e c t s .   A s   w i t h   t h e   a b o v e   t w o   s e q u e n c e s ,   t h e   d e n s i t y   o f   o p t i c a l   f l o w   v e c t o r s   i s   g r e a t e r   i n   t h e   r e s u l t s   o b t a i n e d   b y   s o f t w a r e   t h a n   t h o s e   o b t a i n e d   b y   h a r d w a r e .   H o w e v e r ,   m a n y   f r o m   t h e   s o f t w a r e   c o m p u t a t i o n   d o   n o t   r e p r e s e n t   r e a l   m o v e m e n t   b u t   a p p a r e n t   m o v e m e n t   b e c a u s e   o f   i l l u m i n a t i o n   c h a n g e s .   T h e   r e s u l t s   f r o m   h a r d w a r e   c o m p u t a t i o n   s h o w   f e w   o p t i c a l   f l o w   v e c t o r s   a n d   t h e   m o v i n g   o b j e c t   a r e   e a s i l y   d e t e c t e d .     T h e r e   i s   n o   m o v e m e n t   a n d   t h e r e   a r e   i l l u m i n a t i o n   c h a n g e s .   T h e   r u b i c   s e q u e n c e   w a s   u s e d   f o r   t h e   f i r s t   t e s t i n g   d e v e l o p e d   i n   o r d e r   t o   e v a l u a t e   s u c h   a   s i t u a t i o n   b a s e d   o n   a   k n o w n   i m a g e   s e q u e n c e .   T h e   s e q u e n c e   i s   m a d e   o f   t w o   v e r s i o n s   o f   t h e   s a m e   i m a g e ,   o n e   r a w   a n d   t h e   o t h e r   m o d i f i e d   w i t h   a   d i f f e r e n t   l e v e l   o f   i n t e n s i t y ,   w i t h   t h e   s a m e   a m o u n t   o f   p i x e l s .   S o ,   t h e   s e q u e n c e   h a s   n o   m o v e m e n t   b u t   i l l u m i n a t i o n   c h a n g e s   a s   c a n   b e   s e e n   i n   f i g u r e   6 .   T h i s   m o d i f i c a t i o n   w a s   m a d e   r e d u c i n g   e a c h   i n t e n s i t y   p i x e l   f r o m   t h e   r a w   i m a g e   b y   5 ,   a c h i e v i n g   a   s e c o n d   i m a g e   w i t h   a p p a r e n t   i l l u m i n a t i o n   c h a n g e s   b u t   w i t h o u t   m o v e m e n t .   T h i s   t e s t i n g   w a s   a l s o   u s e f u l   f o r   e v a l u a t i n g   t h e   p e r f o r m a n c e   o f   t h e   h a r d w a r e   a r c h i t e c t u r e   d e v e l o p e d   f o r   p r o c e s s i n g   c h a n g e   d r i v e n   o p t i c a l   f l o w ,   a s   w e l l   a s   t h e   b e h a v i o r   o f   t h e   m o d u l e   f o r   d e t e c t i n g   i l l u m i n a t i o n   c h a n g e s   a n d   a d j u s t i n g   t h e   C S T .   F i g u r e   6 a )   R u b i c   s e q u e n c e ,   s h o w s   t h e   r e s u l t   f r o m   t h e   o p t i c a l   f l o w   c o m p u t a t i o n   b y   s o f t w a r e .   T h e   r e s u l t   o b t a i n e d   b y   h a r d w a r e   i s   a   w h i t e   i m a g e   b e c a u s e   t h e   p r o c e s s i n g   w a s   n o t   p e r f o r m e d   a c c o r d i n g   t o   t h e   w o r k i n g   o f   t h e   m o d u l e   f o r   d e t e c t i n g   i l l u m i n a t i o n   c h a n g e s ,   c o r r e c t l y   a d j u s t i n g   t h e   t h r e s h o l d .   T h i s   m o d u l e   w o r k e d   w i t h   h i g h   e f f i c i e n c y   b e c a u s e   t h e   c h a r a c t e r i s t i c s   o f   t h e   t e s t .   A s   t h e   i l l u m i n a t i o n   c h a n g e s   w e r e   a p p l i e d   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2 0 8 9 - 4 8 6 4   I J R E S     V o l .   1 ,   N o .   1 ,     M a r c h   2 0 1 2   :     2 5     3 6   3 4 i n   t h e   s a m e   q u a n t i t y   f o r   a l l   p i x e l s ,   t h e   m o d u l e   g e n e r a t e s   a n   o p t i m u m   m a s k   f o r   t h e   a d e q u a t e   c a l c u l a t i o n   o f   t h e   t h r e s h o l d .     a )     b )     F i g u r e   6 :   a )   T h e r e   i s   a n   i l l u m i n a t i o n   v a r i a t i o n   b u t   n o   m o v e m e n t .   L e f t   t o   r i g h t :   o r i g i n a l   i m a g e ,   m o d i f i e d   i m a g e   a n d   i t s   c a l c u l a t e d   o p t i c a l   f l o w   v e c t o r s   b y   s o f t w a r e   a n d   b )   S h o w s   t w o   c o n s e c u t i v e   i m a g e s ,   o f   t a p e c   s e q u e n c e ,   a n d   t h e i r   c a l c u l a t e d   o p t i c a l   f l o w   v e c t o r ,   l e f t   t o   r i g h t ,   b y   s o f t w a r e   a n d   h a r d w a r e   c o m p u t a t i o n .     M o r e   c o m p l e x   t e s t i n g   w a s   i m p l e m e n t e d   i n   o r d e r   t o   e v a l u a t e   t h e   p e r f o r m a n c e   o f   t h e   p r o p o s e d   s y s t e m .   M u l t i p l e   s e q u e n c e s   w e r e   c a p t u r e d   a n d   s e l e c t e d   w i t h   n o t o r i o u s   o n   p u r p o s e   i l l u m i n a t i o n   c h a n g e s   b u t   w i t h o u t   m o v e m e n t   a t   a l l .   F i g u r e   6 b )   s h o w s   t w o   i m a g e s   ( 1 5   a n d   1 6 )   f r o m   s e q u e n c e   T A P E C .   T h i s   f i g u r e   a l s o   s h o w s   t h e   o p t i c a l   f l o w   v e c t o r s   o b t a i n e d   b y   s o f t w a r e   a n d   h a r d w a r e   c o m p u t a t i o n .   I t   c a n   b e   s e e n   t h a t   t h e   o p t i c a l   f l o w   o b t a i n e d   b y   h a r d w a r e   c o m p u t a t i o n   h a s   a   f e w e r   n u m b e r   o f   o p t i c a l   f l o w   v e c t o r s   a n d   t h e   d e p l o y m e n t s   a r e   m i n o r ,   c o n s i d e r i n g   i t s   m a g n i t u d e ,   t h a n   i t   h a s   o b t a i n e d   t h r o u g h   t r a d i t i o n a l   i m p l e m e n t a t i o n   ( b y   s o f t w a r e   c o m p u t a t i o n )     5 . 4   S p e e d - U p   C o m p a r i s o n   I n   t h i s   s e c t i o n   a   c o m p u t a t i o n a l   c o s t   c o m p a r i s o n   i s   m a d e .   I n   o r d e r   t o   e v a l u a t e   t h e   p r o f i t s   o f   u s i n g   c h a n g e   d r i v e n   i m a g e   p r o c e s s i n g   i n s t e a d   o f   f u l l   p r o c e s s i n g ,   t h r e e   s e q u e n c e s   w e r e   a n a l y z e d   ( r u b i c ,   s p h e r e   a n d   t a x i ) .   T h e   m o s t   i m p o r t a n t   r e s u l t   i s   t h a t   t h e   p r o c e s s i n g   t i m e   i s   d r a m a t i c a l l y   r e d u c e d .   T h e   T a b l e   2   s h o w s   t h e   s p e e d - u p   c o m p a r i s o n   b e t w e e n   t h e   o r i g i n a l   m o d e l   O F F P   ( 1 0 0 %   t e m p o r a l   c o s t )   a n d   t h e   p r o p o s e d   m o d e l .       T a b l e   2 . S p e e d - U p   c o m p a r i s o n ,   O p t i c a l   F l o w   F u l l   P r o c e s s i n g   ( O F F P )   a n d   C h a n g e   D r i v e n   H a r d w a r e   O p t i c a l   F l o w   ( C D H O F ) .   S e q u e n c e   R u b i c   S p h e r e   T a x i   O F F P   1 0 0   %   1 0 0   %   1 0 0   %   C D H O F   9   %   1 4   %   1 2   %       I t   c a n   b e   s e e n   t h a t   t h e   p r o c e s s i n g   t i m e   i s   r e d u c e d   c o n s i d e r a b l y .   E v e n   i n   t h e   c a s e   o f   t h e   s p h e r e   s e q u e n c e   t h e   p r o c e s s i n g   t i m e   i s   r e d u c e d   b y   1 4   %   o f   t h e   t i m e   n e e d e d   f o r   t h e   o p t i c a l   f l o w   f u l l   p r o c e s s i n g ,   b y   u s i n g   t h e   o r i g i n a l   m o d e l   w h i c h   p r o c e s s e s   a l l   t h e   p i x e l s   i n   t h e   i m a g e s .   I t   i s   p o s s i b l e   t o   n o t e   t h a t   t h i s   p r o c e s s i n g   t i m e   r e d u c t i o n   i s   a   c o n j u n c t   r e s u l t   c o n s i d e r i n g   a s   c h a n g e   d r i v e n   p r o c e s s i n g   a s   h a r d w a r e   c o m p u t a t i o n .     A c c o r d i n g   t o   o b t a i n e d   p r o c e s s i n g   t i m e s   c o n s i d e r i n g   s e v e r a l   i m a g e   p a i r s ,   a n d   c a l c u l a t i n g   t i m e   a v e r a g e ,   i t   i s   p o s s i b l e   t o   s a y   t h a t   t h e   c h a n g e   d r i v e n   o p t i c a l   f l o w   p r o c e s s i n g   i n   c o n j u n c t i o n   w i t h   t h e   i n n o v a t i v e   h a r d w a r e   a r c h i t e c t u r e   c a n   p r o c e s s   u p   t o   7 1   f p s   t a k i n g   i n t o   a c c o u n t   t h e   t a x i   s e q u e n c e ,   a n d   u p   t o   7 3   f p s   t a k i n g   t h e   o t h e r   s e q u e n c e s .   T h i s   i s   s h o w n   i n   T a b l e   3 .   Evaluation Warning : The document was created with Spire.PDF for Python.