Upload
paolo-tripicchio
View
230
Download
0
Embed Size (px)
Citation preview
7/28/2019 Infrared Simulation
1/8
7/28/2019 Infrared Simulation
2/8
I N F R A - R E D S E N S O R S I M U L A T I O N
S a n j i v K . B h a t i a G e o r g e M . L a c y
D e p t . o f M a t h & C o m p u t e r S c i e n c e V i s u a l S i m u l a t i o n S y s t e m s
U n i v . o f M i s s o u r i S t . L o u i s F l i g h t S a f e t y I n t e r n a t i o n a l
S t . L o u i s , M O 6 3 1 2 1 S t . L o u i s , M O 6 3 0 4 2
I N T R O D U C T I O N
T h e I n f r a - R e d P o s t P r o c e s s o r i r p p i s p a r t o f
a r e a l - t i m e i n f r a - r e d s i m u l a t i o n s y s t e m . T h e s i m u -
l a t e d i m a g e i s r e n d e r e d b y a n i m a g e g e n e r a t o r a n d
t h e i r p p a d d s t h e r m a l c h a r a c t e r i s t i c s t o t h e i m a g e
t o m i m i c t h e l o o k o f t h e i r s e n s o r b e i n g s i m u l a t e d
4 . T h e s e c h a r a c t e r i s t i c s c a n i n c l u d e a c c o u p l i n g ,
s e n s o r d e f e c t s , n o i s e , b l u r , a n d s m e a r i n g e e c t s . T h e
i r p p a l s o e m u l a t e s t h e g a i n , l e v e l , c o n t r a s t e n h a n c e -
m e n t , a n d p o l a r i t y f u n c t i o n s o f t h e i r h a r d w a r e b e i n g
s i m u l a t e d . F o r a d e t a i l e d d i s c u s s i o n o f s e n s o r c h a r -
a c t e r i s t i c s , p l e a s e s e e r e f e r e n c e s 5 , 6 .
O u r i r p p i m p l e m e n t a t i o n i s b a s e d o n p e r f o r m -
i n g t h e s e n s o r f u n c t i o n s 1 i n d e p e n d e n t o f t h e i m -
a g e g e n e r a t o r . T h e i m a g e g e n e r a t o r c o m p u t e s t h e
r a d i a n c e o f o b j e c t s i n a d a t a b a s e a s a f u n c t i o n o f
w a v e l e n g t h , e n v i r o n m e n t , a t m o s p h e r i c s , a n d t h e r -
m a l c h a r a c t e r i s t i c s o f t h e o b j e c t s . H o w e v e r , t h e d y -
n a m i c c h a r a c t e r i s t i c s o f t h e a c t u a l s e n s o r a r e l e f t
f o r t h e p o s t - p r o c e s s o r . T h e s e c h a r a c t e r i s t i c s c a n
i n c l u d e v i d e o p o l a r i t y w h i t e h o t b l a c k h o t , g a i n
m a n u a l a u t o m a t i c , c o n t r a s t e n h a n c e m e n t , n o i s e
s t a t i c d y n a m i c , b l u r r i n g , a c c o u p l i n g , s e n s o r d e -
f e c t s d e a d p i x e l s d e a d l i n e s , a s w e l l a s v i d e o o v e r -
l a y s r e t i c u l e s t e s t p a t t e r n s .
I n t h i s p a p e r , w e d e s c r i b e t h e r e s e a r c h a n d d e -
v e l o p m e n t i n t o t h e a l g o r i t h m s n e e d e d t o s u p p o r t t h e
s i m u l a t i o n i n t h e p c e n v i r o n m e n t . T h e a l g o r i t h m s
h a d t o b e d e v e l o p e d u n d e r t h e c o n s t r a i n t s i m p o s e d b y
t h e h a r d w a r e a n d s o f t w a r e e n v i r o n m e n t , s u c h a s t h e
a b s e n c e o f f a c i l i t i e s t o o p e r a t e o n i n d i v i d u a l p i x e l s ,
w h i c h h a d t o b e s i m u l a t e d b y c o m p u t i n g c o n v o l u t i o n
k e r n e l s .
I n t h e n e x t s e c t i o n , w e p r o v i d e a n o v e r v i e w o f t h e
p o s t - p r o c e s s o r i n c o n t e x t o f t h e o v e r a l l s y s t e m . T h i s
i s f o l l o w e d b y a d e s c r i p t i o n o f a l g o r i t h m s . I n t h e l a s t
s e c t i o n , w e p r o v i d e t h e i m p l e m e n t a t i o n s t a t u s a n d
t h e c o n c l u s i o n .
O V E R V I E W O F T H E P O S T P R O C E S S O R
T h e b l o c k d i a g r a m o f t h e p o s t p r o c e s s o r i s p r e -
s e n t e d i n F i g u r e 1 . T h e i m a g e g e n e r a t o r i g g e n e r -
a t e s t h e i r s c e n e a t t h e r a t e r e q u i r e d b y t h e c o c k p i t
d i s p l a y i n t h e s i m u l a t o r . T h e s c e n e i s g e n e r a t e d a s
a 6 4 0 4 8 0 p i x e l i n t e r l a c e d i m a g e a t 3 0 H z . f r a m e
r a t e s . T h e v i d e o i n p u t a n d o u t p u t a r e R S - 1 7 0 f o r -
m a t a l t h o u g h o t h e r f o r m a t s c a n b e a c c o m m o d a t e d .
T h e f r a m e g r a b b e r d i g i t i z e s t h e a n a l o g v i d e o f r o m
t h e i r c h a n n e l o f t h e i g . T h e i m a g e i s g i v e n t o t h e i m -
a g e p r o c e s s o r w h i c h a p p l i e s t h e d e s i r e d s e n s o r c h a r -
a c t e r i s t i c s . F i n a l l y , t h e i m a g e i s c o n v e r t e d b a c k t o
a n a l o g b y t h e i m a g e d i s p l a y c o n t r o l l e r .
T h e p i l o t c o n t r o l s a r e p a s s e d a s a b l o c k o f b i n a r y
d a t a o v e r t h e e t h e r n e t . T h e c o n t r o l s a r e r e c e i v e d b y
t h e i g w h o c o n s t r u c t s t h e d a t a b l o c k a n d s e n d s i t
o v e r t h e e t h e r n e t . T h e s e c o n t r o l s a r e u s e d t o m o d i f y
t h e s i m u l a t e d b e h a v i o r o f t h e i m a g e p r o c e s s o r , s u c h
a s a g c w i n d o w s i z e a d j u s t m e n t , c h a n g e i n r e t i c u l e
o v e r l a y , p o l a r i t y a d j u s t m e n t , a n d t e s t p a t t e r n o v e r -
l a y .
I M A G E P R O C E S S I N G
I m a g e p r o c e s s i n g i s t h e m o s t i m p o r t a n t p h a s e i n
t h e p o s t p r o c e s s o r . I t i s h e r e t h a t t h e s e n s o r c h a r -
a c t e r i s t i c s a r e a d d e d t o t h e i m a g e . T h e p i l o t - d e s i r e d
e e c t s , s u c h a s p o l a r i t y a n d g a i n a n d l e v e l c o n t r o l 3
a r e a l s o a d d e d i n t h i s p h a s e .
F i g u r e 2 p r e s e n t s a n o v e r v i e w d i a g r a m o f t h e i m -
a g e p r o c e s s i n g f u n c t i o n s u s e d i n t h e p o s t p r o c e s s o r .
A n a l o g v i d e o f r o m t h e i g m a y b e g a m m a c o r -
r e c t e d . W e u n d o t h e g a m m a c o r r e c t i o n t h r o u g h a
2 5 6 1 6 t a b l e l o o k u p . T h e i n v e r s e g a m m a c o r r e c t i o n
a l s o c o n v e r t s t h e i n p u t d a t a i n t o 1 6 - b i t p i x e l s t o c o m -
p e n s a t e f o r t h e a b s e n c e o f o a t i n g p o i n t o p e r a t i o n s i n
s u b s e q u e n t f u n c t i o n s . W e h a v e a s s u m e d t h a t t h e i g
i s a p p l y i n g a g a m m a o f 2 . T h e i n v e r s e g a m m a c o r r e c -
t i o n i s a p p l i e d b y t a k i n g t h e s q u a r e o f t h e p i x e l v a l u e .
D i e r e n t g a m m a v a l u e s c a n b e a c c o m m o d a t e d .
I n t h e f o l l o w i n g s u b s e c t i o n s , w e d e s c r i b e t h e a l -
g o r i t h m s f o r v a r i o u s e e c t s . T h e s o f t w a r e h a s b e e n
d e s i g n e d s u c h t h a t e a c h e e c t c a n b e t u r n e d o n o r o
b y c o n g u r a t i o n c o n t r o l s .
A C C o u p l i n g
7/28/2019 Infrared Simulation
3/8
P C
F r a m e
G r a b b e r
-
V i d e o
f r o m I G
-
I m a g e
P r o c e s s o r
-
I m a g e
D i s p l a y
C o n t r o l l e r
-
V i d e o
t o S i m
C o n t r o l
s i g n a l
f r o m I G
-
E t h e r n e t
F i g u r e 1 : B l o c k d i a g r a m o f i n f r a - r e d p o s t p r o c e s s o r
- m
?
D e a d
E l e m e n t
-
B l u r
-
P o l a r i t y
a d j u s t m e n t
-
R e t i c u l e
o v e r l a y
-
- c o r r e c t i o n
-
O u t p u t t o
d i s p l a y
m
G a i n
m
+
L e v e l
M i n M a x
-
-
C a l c u l a t e
A G C
??
S a t u r a t e
-
A c c u m u l a t e
f o r
p e r s i s t e n c e
-
m
?
P i x e l
m i s m a t c h
-
m
+
?
F i x e d
p a t t e r n
n o i s e
-
m
+
I n p u t
i m a g e
-
, 1
A C c o u p l i n g
N o i s e
i m a g e
-
R a n d o m
n o i s e
g e n e r a t o r
?
-
- - -
-
F i g u r e 2 : I m a g e p r o c e s s i n g o p e r a t i o n s i n t h e p o s t - p r o c e s s o r
T h e v i d e o d a t a i s p r o c e s s e d t h r o u g h a n i n n i t e
i m p u l s e r e s p o n s e i i r d i g i t a l l t e r t o s i m u l a t e a c
c o u p l i n g . a c c o u p l i n g i s a r e s u l t o f c a p a c i t i v e c o u -
p l i n g o f t h e i r s e n s o r e l e m e n t s . I t i s m o d e l e d a s a
h i g h p a s s r c l t e r c o n s i s t i n g o f a s e r i e s c a p a c i t o r a n d
a r e s i s t o r t o g r o u n d . T h e i i r d i g i t a l l t e r m o d e l s t h e
a n a l o g l t e r a t d i s c r e t e s a m p l e t i m e s c o r r e s p o n d i n g
t o t h e p i x e l t i m e . T h e p i x e l s o f t h e i m a g e a r e p a s s e d
s e r i a l l y t h r o u g h t h e l t e r . T h e a n a l o g l t e r i s d e -
s c r i b e d i n F i g u r e 3 . I t h a s a n e x p o n e n t i a l r e s p o n s e
w i t h a t i m e c o n s t a n t g i v e n a s t h e p r o d u c t o f R a n d
C .
T h e l t e r i s i m p l e m e n t e d b y
y
n
=
T
T + 1
x
n
, x
n , 1
+ y
n , 1
w h e r e T i s t h e p i x e l t i m e c o n s t a n t a n d x
n
a n d y
n
s i g -
n i f y t h e c o r r e s p o n d i n g p i x e l s i n t h e i n p u t a n d o u t p u t
i m a g e s , r e s p e c t i v e l y .
A t r s t , t h e p r o t o t y p e w a s t e s t e d w i t h a r e c u r s i v e
f u n c t i o n c a l l r e e c t i n g t h e a b o v e r e c u r r e n c e . H o w -
e v e r , t h e f u n c t i o n c o u l d n o t b e u s e d a s s u c h i n t h e o -
t h e - s h e l f e n v i r o n m e n t . T h e r e f o r e , w e a p p r o x i m a t e d
t h e a b o v e e q u a t i o n t h r o u g h c o n v o l u t i o n u s i n g a o n e -
d i m e n s i o n a l k e r n e l o f 1 5 1 . T h e s i z e o f 1 5 p i x e l s w a s
c h o s e n a s t h a t i s t h e l a r g e s t k e r n e l d i m e n s i o n a v a i l -
a b l e i n t h e o - t h e - s h e l f g r a p h i c s l i b r a r y . I t c a n b e
m o d i e d t o a c c o u n t f o r l a r g e r o r s m a l l e r k e r n e l s .
T h e c o n v o l u t i o n i s b a s e d o n t h e e x p r e s s i o n f o r y
n
.
T h e m a j o r s t e p i n t h e c o n v o l u t i o n i s t h e c a l c u l a t i o n
o f t h e k e r n e l w h i c h i s d e p e n d e n t o n t h e t i m e c o n -
s t a n t T . T h e c o m p u t a t i o n c a n b e s i m p l i e d b y u s i n g
t h e c o n s t a n t c f o r t h e f r a c t i o n s u c h t h a t t h e a b o v e
e q u a t i o n i s r e d u c e d t o
y
n
= c x
n
, x
n , 1
+ y
n , 1
w h e r e c =
T
T + 1
.
7/28/2019 Infrared Simulation
4/8
C
R
F i g u r e 3 : A n a l o g l t e r f o r a c c o u p l i n g e e c t
S o l v i n g t h e a b o v e r e c u r r e n c e y i e l d s t h e k e r n e l f o r
c o n v o l u t i o n . T h e e q u a t i o n f o r y
n
, u s i n g a k e r n e l o f
d i m e n s i o n k 1 , i s w r i t t e n a s
y
n
= c x
n
,
k , 1
X
i = 0
c
k , i
1 , c x
i
G a i n a n d L e v e l P r o c e s s i n g
G a i n a n d l e v e l p r o c e s s i n g i s u s e d t o e n h a n c e t h e
c o n t r a s t i n t h e i n p u t d a t a . G a i n i s i m p l e m e n t e d b y
m u l t i p l y i n g e a c h p i x e l o f t h e f r a m e b y a v a l u e , l e v e l
a d d s a v a l u e t o e a c h p i x e l . T h e p o s t - p r o c e s s o r p r o -
v i d e s f o r t h e o p t i o n s o f n o g a i n , m a n u a l g a i n , a n d
a u t o m a t i c g a i n c o n t r o l . I n t h e m a n u a l g a i n c o n t r o l
m o d e , g a i n a n d l e v e l v a l u e s c a n b e s p e c i e d v i a p i -
l o t c o n t r o l s . A u t o m a t i c g a i n c o n t r o l a g c i s u s e d t o
o p t i m i z e g a i n a n d l e v e l t o s t r e t c h a s p e c i e d w i n d o w
w i t h i n t h e i m a g e f o r m a x i m u m c o n t r a s t .
F o r a g c , t h e g a i n a n d l e v e l v a l u e s a r e c a l c u l a t e d
f r o m t h e m i n i m u m a n d m a x i m u m i n t e n s i t i e s o f a
s p e c i e d r e c t a n g u l a r w i n d o w i n t h e c e n t e r o f t h e i m -
a g e f r a m e . T h e d i e r e n c e b e t w e e n t h e m a x i m u m a n d
m i n i m u m p i x e l v a l u e i n t e n s i t y i s d e n o t e d b y a n d
i s u s e d t o c a l c u l a t e t h e g a i n . c a n b e u s e d i n t h e
c o m p u t a t i o n a s i s o r i t c a n b e r e d u c e d b y a f r a c -
t i o n a l a m o u n t a t e a c h e n d t o a l l o w t h e p i x e l v a l u e s
t o s t a y b e t w e e n 0 a v o i d n e g a t i v e v a l u e s o r u n d e r -
o w a n d t h e m a x i m u m i n t e n s i t y v a l u e f o r t h e p i x e l
a v o i d o v e r o w . T h e f r a c t i o n o f t o d i s c a r d a t l o w
e n d a n d h i g h e n d o f t h e s p e c t r u m a r e c o n g u r a b l e
l o w e r l i m i t a n d u p p e r l i m i t , r e s p e c t i v e l y . A f t e r t h e
g a i n a n d l e v e l a r e c a l c u l a t e d f r o m , t h e y a r e c l a m p e d
b y c o n g u r a b l e m a x i m u m s f r o m t h e i r p a s t v a l u e s .
T h e w i n d o w e d a g c c a p a b i l i t y i s u s e d f o r l o c a l a r e a
c o n t r a s t e n h a n c e m e n t i n t h e s i m u l a t i o n . W e p r o v i d e
f o r t h r e e c o n g u r a b l e w i n d o w s i z e s t h a t c a n b e s e -
l e c t e d b y p i l o t c o n t r o l .
N e x t , w e p r e s e n t t h e c a l c u l a t i o n s f o r g a i n a n d
l e v e l f o r a g c u s i n g F i g u r e 4 . T h i s g u r e s h o w s t h e
o u t p u t i n t e n s i t y a s a f u n c t i o n o f t h e i n p u t i n t e n s i t y .
T h i s i s a l i n e a r t r a n s f e r f u n c t i o n w h e r e g a i n i s g i v e n
b y t h e s l o p e a n d l e v e l i s g i v e n b y t h e v e r t i c a l - a x i s -
i n t e r c e p t 2 .
L e t I
m a x
b e t h e m a x i m u m p o s s i b l e i n t e n s i t y v a l u e
f o r a n y p i x e l . T h e m i n i m u m a n d m a x i m u m i n t e n s i t y
v a l u e s i n t h e i n p u t i m a g e t h e l o c a l w i n d o w a r e d e -
n o t e d b y i
m i n
a n d i
m a x
, r e s p e c t i v e l y . i
0
m i n
a n d i
0
m a x
a r e u s e d t o d e n o t e t h e m i n i m u m a n d m a x i m u m i n -
t e n s i t y v a l u e s a f t e r d i s c a r d i n g p a r t o f t h e i n t e n s i t y
r a n g e b e t w e e n i
m i n
a n d i
m a x
. T h e g a i n G a n d l e v e l
L a r e c o m p u t e d b y
= i
m a x
, i
m i n
i
0
m i n
= i
m i n
+ l o w e r l i m i t
i
0
m a x
= i
m a x
, u p p e r l i m i t
0
= i
0
m a x
, i
0
m i n
G = I
m a x
0
L = , i
0
m i n
I
m a x
0
W e a r e u s i n g o u r g a i n a n d l e v e l c o m p u t a t i o n s f o r
l o c a l a r e a c o n t r a s t e n h a n c e m e n t i n t h e i m a g e . T h e
c o n t r a s t e n h a n c e m e n t e e c t i s p r e s e n t e d i n F i g u r e
5 a s a r e c t a n g u l a r w i n d o w i n t h e c e n t e r o f t h e d i s -
p l a y . T h i s s m a l l r e c t a n g u l a r w i n d o w s h o w s c o n t r a s t
e n h a n c e m e n t a r o u n d p a r t o f t h e r u n w a y , m a k i n g t h e
t i r e m a r k s a n d t h e a r e a a r o u n d t h e r u n w a y d a r k e r .
T h i s w i n d o w s h o w s t h e p o s t g a i n c o m p u t a t i o n s . T h e
r e s t o f t h e i m a g e s h o w s t h e p r e g a i n c o m p u t a t i o n s .
D y n a m i c N o i s e
D y n a m i c n o i s e i s a p e r - p i x e l o s e t t h a t s i m u l a t e s
t h e d y n a m i c n o i s e f r o m t h e i m a g i n g a r r a y o f t h e
i r s e n s o r . T h e s o u r c e f o r n o i s e i s a p r e - g e n e r a t e d
G a u s s i a n - d i s t r i b u t e d n o i s e i m a g e . E a c h p i x e l o f t h e
i m a g e c a n b e s t r e t c h e d b y a r a n d o m a m o u n t u p t o 1 ,
2 , 4 , o r 8 p i x e l s t o s i m u l a t e t h e c h a r a c t e r i s t i c s t r e a k -
i n g o f t h e t y p i c a l i r s e n s o r s . T h e i m a g e i s t h e n s c a l e d
t o t h e a p p r o p r i a t e a m p l i t u d e . B o t h n o i s e l e n g t h a n d
n o i s e a r e c o n g u r a b l e p a r a m e t e r s . T h e d y n a m i c n a -
t u r e o f n o i s e i s s i m u l a t e d b y s c r o l l i n g t h e p i x e l s b y a
7/28/2019 Infrared Simulation
5/8
-
I n p u t
i n t e n s i t y
6
O u t p u t
i n t e n s i t y
L
I
m a x
i
m i n
i
0
m i n
i
0
m a x
i
m a x
I
m a x
F i g u r e 4 : C a l c u l a t i o n o f g a i n a n d l e v e l f o r a g c
r a n d o m a m o u n t f o r e a c h f r a m e , w i t h t h e a m o u n t o f
s c r o l l d e t e r m i n e d b y t h e p s e u d o r a n d o m n u m b e r g e n -
e r a t o r . T h e s c r o l l w r a p s a r o u n d t h e b o t t o m o f t h e
f r a m e t o k e e p t h e f r a m e h e i g h t f o r t h e n o i s e c o n s t a n t .
B l u r
T h e b l u r r i n g e e c t i s d e f o c u s t h r o u g h a 7 7 m a s k
c o n v o l u t i o n . T h e a m o u n t o f b l u r i s a c o n g u r a b l e a n d
u s e d t o c a l c u l a t e t h e c o e c i e n t s o f t h e l t e r k e r n e l .
T h e b l u r r i n g e e c t u s e s a h a r d - c o d e d 7 7 k e r n e l
t h o u g h i t c a n b e e a s i l y c h a n g e d i n t o a c o n g u r a b l e
s q u a r e k e r n e l . T h e b l u r r a d i u s i s s p e c i e d a s a f r a c -
t i o n b e t w e e n 0 a n d 1 t o b e u s e d t o s e l e c t t h e a r e a
i n s i d e t h e k e r n e l u s e d f o r b l u r r i n g . I t i s u s e d t o s p e c -
i f y t h e w e i g h t f o r d i e r e n t k e r n e l e l e m e n t s .
T o c o m p u t e t h e w e i g h t i n t h e k e r n e l , e a c h p i x e l
i s c o n s i d e r e d t o b e a s q u a r e w i t h w i d t h 1 s o t h a t t h e
7 7 k e r n e l h a s t h e w i d t h o f e a c h s i d e a s 7 p i x e l s .
E v e r y e l e m e n t i n t h e k e r n e l i s a s s i g n e d a w e i g h t a c -
c o r d i n g t o t h e e x t e n t t o w h i c h i t i s p r e s e n t i n s i d e t h e
c i r c l e d e s c r i b e d b y t h e b l u r r a d i u s B
r
, s h o w n a s t h e
s h a d e d p o r t i o n i n F i g u r e 6 . A p i x e l c o m p l e t e l y o u t -
F i g u r e 5 : L o c a l a r e a c o n t r a s t e n h a n c e m e n t e e c t
7/28/2019 Infrared Simulation
6/8
F i g u r e 6 : C o m p u t i n g t h e k e r n e l f o r b l u r r i n g
s i d e t h e c i r c l e i s a s s i g n e d w e i g h t 0 w h i l e a p i x e l c o m -
p l e t e l y i n s i d e t h e c i r c l e i s a s s i g n e d w e i g h t 1 . F o r t h e
p i x e l s t h a t a r e p a r t i a l l y i n s i d e t h e c i r c l e . t h e w e i g h t
i s c o m p u t e d a s t h e f r a c t i o n o f t h e p i x e l i n s i d e t h e
c i r c l e . T h e f r a c t i o n i s d e t e r m i n e d b y t h e d i s t a n c e o f
t h e a r c o f t h e c i r c l e f r o m t h e c o r n e r o f t h e p i x e l s u c h
t h a t t h e s e l e c t e d c o r n e r i s n e a r e s t t o t h e c e n t e r o f t h e
c i r c l e . I f D i s t h e d i s t a n c e o f t h e c e n t e r o f t h e p i x e l
f r o m t h e c e n t e r o f t h e k e r n e l , t h e d i s t a n c e o f t h e a r c
f r o m t h e c e n t e r o f t h e p i x e l d i s g i v e n b y
d = B
r
, D
d 0 : 5 i n d i c a t e s t h a t t h e p i x e l i s c o m p l e t e l y i n -
s i d e t h e c i r c l e w h i l e d , 0 : 5 i n d i c a t e s t h a t t h e p i x e l
i s c o m p l e t e l y o u t s i d e t h e c i r c l e . F o r p a r t i a l l y c o v e r e d
p i x e l s , t h e w e i g h t i s s i m p l y c a l c u l a t e d t o b e d + 0 : 5 .
I f t h e w e i g h t f o r t h e p i x e l i s d e n o t e d b y w
i j
, t h e k e r -
n e l e l e m e n t i s g i v e n b y t h e e x p r e s s i o n
w
i j
P
w
i j
P e r s i s t e n c e
P e r s i s t e n c e c a u s e s a s m e a r i n g i n t h e i m a g e w h e n
t h e s e n s o r m o v e s . T h i s i s s i m u l a t e d b y c o m p u t i n g a
w e i g h t e d a v e r a g e o f t h e c u r r e n t f r a m e a n d t h e p r e -
v i o u s f r a m e s . T h e w e i g h t s a p p l i e d t o e a c h f r a m e i s
c o m p u t e d f r o m a n e x p o n e n t i a l d e c a y f u n c t i o n . T h e
p e r s i s t e n c e a m o u n t i s s p e c i e d a s a c o n g u r a b l e t i m e .
W e a c c u m u l a t e t h e w e i g h t e d a v e r a g e o f f r a m e s i n a
h i s t o r y f r a m e . T h e c o m p u t a t i o n o f p e r s i s t e n c e c o e f -
c i e n t w i t h t h e e x p o n e n t i a l d e c a y f u n c t i o n g i v e s t h e
h i s t o r y f r a m e F
n
i n t e r m s o f t h e c u r r e n t f r a m e f
n
a n d
t h e l a s t h i s t o r y f r a m e F
n , 1
a s
F
n
= f
n
+ e
, 1
t
T
F
n , 1
T h e a b o v e r e c u r r e n c e a l l o w s u s t o c o m p u t e t h e
p e r s i s t e n c e f o r t h e p r e v i o u s f r a m e s f r o m t h e l a s t
f r a m e d i s p l a y e d . I t m a y b e n o t e d t h a t
l i m
i ! 1
e
, i
= 0
w h i c h i m p l i e s t h a t t h e a c c u m u l a t e d f r a m e s c a n b e
n o r m a l i z e d b y d i v i d i n g e a c h p i x e l b y a c o n s t a n t g i v e n
b y
P
1
i = 0
e
, i
t
T
. T h i s v a l u e c a n b e e a s i l y c o m p u t e d f o r
a g i v e n t a n d T .
T h e p e r s i s t e n c e e e c t i s p r e s e n t e d i n F i g u r e 7 . I t
s h o w s t h e l i g h t p o i n t t r a c e s a s t h e e l d o f v i e w s h i f t s
t o w a r d s l e f t .
O t h e r e e c t s
T h i s s u b s e c t i o n d e s c r i b e s t h e e e c t s s h o w n i n F i g -
u r e 2 t h a t h a v e n o t b e e n c o v e r e d i n t h e a b o v e s u b -
s e c t i o n s .
S a t u r a t i o n i s u s e d t o c o n v e r t t h e i m a g e f r o m 1 6 -
b i t p i x e l f r a m e t o u n s i g n e d 8 - b i t p i x e l s . I t i s p e r -
f o r m e d b y r i g h t - s h i f t i n g e a c h p i x e l v a l u e b y 7 b i t s .
T h e p i x e l s a r e s h i f t e d b y 7 b i t s i n s t e a d o f 8 b i t s t o
a c c o u n t f o r o n e s i g n b i t .
P i x e l m i s m a t c h i s a p e r - p i x e l g a i n t h a t i s u s e d
t o s i m u l a t e t h e n o n - u n i f o r m r e s p o n s e o f t h e i m a g i n g
a r r a y o f t h e i r s e n s o r . T h i s o p e r a t i o n i s p e r f o r m e d
b y p i x e l - w i s e m u l t i p l i c a t i o n o f t h e f r a m e w i t h a p r e -
g e n e r a t e d f r a m e .
T h e x e d p a t t e r n n o i s e i s a p e r - p i x e l o s e t t h a t i s
u s e d t o s i m u l a t e t h e x e d n o i s e p a t t e r n o f t h e i m a g -
i n g a r r a y o f t h e i r s e n s o r . I t i s p e r f o r m e d b y a d d i n g
t h e p r e - g e n e r a t e d x e d n o i s e b u e r t o t h e f r a m e .
T h e d e a d e l e m e n t i s a n a r t i f a c t i n t h e s e n s i n g a r -
r a y t h a t l e a d s t o a p i x e l n o t b e i n g s c a n n e d . T h e d e a d
e l e m e n t a p p e a r s a s a h o r i z o n t a l o n e p i x e l - w i d e b l a c k
s c a n l i n e o n t h e d i s p l a y f r a m e . W e h a v e i m p l e m e n t e d
t h e d e a d e l e m e n t a s a c o n g u r a b l e w i t h r a n d o m d i s -
t r i b u t i o n . T h e n u m b e r o f d e a d e l e m e n t s i s a l s o a
c o n g u r a b l e . W e g e n e r a t e a d e a d p i x e l f r a m e w h e r e
t h e d e a d p i x e l e l e m e n t s a r e d e n o t e d b y 0 . T h e f r a m e
b e i n g p r o c e s s e d i s p i x e l - w i s e m u l t i p l i e d b y t h e d e a d
p i x e l f r a m e t o s i m u l a t e d e a d e l e m e n t s . W e a l s o h a v e
p r o v i s i o n s f o r t h e d e a d e l e m e n t s b e i n g d i s t r i b u t e d
a c r o s s t h e f r a m e i n s t e a d o f o v e r s c a n l i n e s s a l t a n d
p e p p e r d i s t r i b u t i o n .
7/28/2019 Infrared Simulation
7/8
F i g u r e 7 : P e r s i s t e n c e e e c t
P o l a r i t y i n v e r s i o n s i m u l a t e s t h e c a p a b i l i t y o f t h e
i r h a r d w a r e t o i n v e r t t h e v i d e o f r o m w h i t e h o t " t o
b l a c k h o t " . T h e i n v e r s i o n i s i n v o k e d b y t h e c r e w
t h r o u g h e t h e r n e t i n t e r f a c e . I t i s e a s i l y a c c o m p l i s h e d
b y t a k i n g a o n e ' s c o m p l e m e n t o f e a c h p i x e l i n t h e
f r a m e .
R e t i c u l e o v e r l a y i s p e r f o r m e d b y s i m p l y o v e r l a y -
i n g a p r e - g e n e r a t e d r e t i c u l e f r a m e o n t h e i m a g e . C u r -
r e n t l y , w e h a v e t w o r e t i c u l e f r a m e s t h a t a r e g e n e r a t e d
d u r i n g s y s t e m i n i t i a l i z a t i o n . T h e p i l o t c a n c h o o s e e i -
t h e r o n e o f t h e f r a m e s d u r i n g s i m u l a t i o n , o r r e m o v e
t h e r e t i c u l e a l t o g e t h e r . A d d i t i o n o f n o i s e , r e t i c u l e ,
a n d d e a d e l e m e n t i s i l l u s t r a t e d i n F i g u r e 8 .
T h e g a m m a c o r r e c t i o n i s a n o n l i n e a r m a p p i n g o f
t h e v i d e o t o a c c o u n t f o r t h e n o n l i n e a r t r a n s f e r c h a r -
a c t e r i s t i c s o f d i s p l a y d e v i c e s i n t e r m s o f l i g h t o u t p u t
v e r s u s t h e c o m m a n d e d i n t e n s i t y . A s t a n d a r d p o w e r
l a w m a p p i n g i s a s s u m e d . T h i s i s a p p l i e d t o t h e p r o -
c e s s e d b u e r u s i n g a l o o k u p t a b l e a s t h e l a s t s t e p
b e f o r e s e n d i n g t h e f r a m e t o d i s p l a y .
I M P L E M E N T A T I O N
T h e p o s t - p r o c e s s o r i s i m p l e m e n t e d u s i n g a M a -
t r o x G e n e s i s g r a p h i c s b o a r d u s i n g t w o c i r c u i t c a r d s
h o s t e d o n a s t a n d a r d W i n d o w s n t w o r k s t a t i o n . T h e
g r a p h i c s b o a r d p r o v i d e s t h e o p e r a t i o n s o f f r a m e -
g r a b b i n g , i m a g e p r o c e s s i n g , a n d d i s p l a y c o n t r o l .
T h e c u r r e n t c o n g u r a t i o n i s m a d e u p o f t h r e e
T e x a s I n s t r u m e n t s C - 8 0 d s p p r o c e s s i n g e l e m e n t s , a n d
a n e i g h b o r h o o d o p e r a t i o n s a c c e l e r a t o r n o a .
T h e p o s t - p r o c e s s o r d i v i d e s t h e 6 4 0 4 8 0 p i x e l
i n p u t v i d e o s i g n a l i n t o t h r e e h o r i z o n t a l s t r i p s e a c h
6 4 0 1 2 0 a s t h e f r a m e i s g r a b b e d . F u r t h e r p r o c e s s -
i n g i s l o c a l i z e d t o t h e s e p a r a t e p r o c e s s i n g e l e m e n t s
f o r e a c h s t r i p f o r m o s t p a r t . S o m e o f t h e p r o c e s s i n g ,
s u c h a s f r a m e g r a b b i n g a n d i m a g e p r o c e s s i n g , i s m u l -
t i t h r e a d e d e v e n w i t h i n t h e s a m e p r o c e s s i n g e l e m e n t .
T h e s y s t e m h a s b e e n d e s i g n e d s u c h t h a t t h e n u m -
b e r o f p r o c e s s i n g e l e m e n t s i s d e t e r m i n e d d u r i n g s y s -
t e m i n i t i a l i z a t i o n t i m e . T h i s a l l o w s t h e s y s t e m t o b e
p o r t e d o n t o a d i e r e n t g r a p h i c s b o a r d c o n g u r a t i o n ,
w i t h f e w e r o r m o r e p r o c e s s i n g e l e m e n t s .
T h e i m p l e m e n t a t i o n h a s i n v o l v e d c r e a t i o n o f
h i g h e r - l e v e l i n t e r f a c e t o l o w - l e v e l l i b r a r y f u n c t i o n
c a l l s u s i n g o b j e c t - o r i e n t e d c o n c e p t s i n C + + . T h u s , t o
m o v e t o a d i e r e n t h a r d w a r e s o f t w a r e c o m b i n a t i o n ,
w e o n l y n e e d t o m o d i f y t h e l o w e r - l e v e l i n t e r f a c e .
C O N C L U S I O N
I n t h i s p a p e r , w e h a v e d e s c r i b e d t h e a l g o r i t h m d e -
v e l o p m e n t a n d i m p l e m e n t a t i o n o f a n i n f r a - r e d s e n s o r
s i m u l a t i o n u s i n g a p c a n d o - t h e - s h e l f i m a g e p r o -
c e s s i n g e n v i r o n m e n t . T h e a l g o r i t h m d e v e l o p m e n t i n -
c l u d e d s o f t w a r e e m u l a t i o n .
T h e u s e o f o - t h e - s h e l f h a r d w a r e a n d s o f t w a r e l e d
u s t o m a k e a n u m b e r o f d e c i s i o n s t h a t a e c t t h e p e r -
f o r m a n c e o f t h e s y s t e m . T h e m o s t n o t a b l e a m o n g
t h o s e i s t h e a c c o u p l i n g e e c t w h i c h h a d t o b e i m -
p l e m e n t e d w i t h a n a p p r o x i m a t i o n k e r n e l i n s t e a d o f a
r e c u r s i v e r o u t i n e .
T o a c h i e v e a c c e p t a b l e p r o c e s s i n g t h r o u g h p u t , w e
d i v i d e d e a c h f r a m e i n t o m u l t i p l e s t r i p s t h a t a r e p r o -
c e s s e d s e p a r a t e l y o n d i e r e n t p r o c e s s i n g n o d e s . T h i s
d e c i s i o n w a s c o m p l i c a t e d b e c a u s e o f t h e u s e o f k e r -
n e l s t o r e f e r t o p i x e l s o n a s t r i p a s s i g n e d t o d i e r e n t
p r o c e s s i n g n o d e s w h i c h a r e n o t a c c e s s i b l e t o t h e c u r -
r e n t n o d e , a n d a l s o d u e t o t h e m u l t i t h r e a d i n g a s p e c t s .
7/28/2019 Infrared Simulation
8/8
F i g u r e 8 : A d d i t i o n o f n o i s e , r e t i c u l e , a n d d e a d e l e m e n t
W e h a d t o m i n i m i z e t h e n u m b e r o f s y n c h r o n i z a t i o n
c a l l s b e t w e e n t h r e a d s o n d i e r e n t n o d e s a s t h e s p e e d
a d v a n t a g e w o u l d b e l o s t .
T h e s y s t e m i s i m p l e m e n t e d a n d i s u n d e r g o i n g
t e s t i n g a t t h e p r e s e n t t i m e .
R e f e r e n c e s
1 G . E . B a l l . N e w i n f r a r e d o p p o r t u n i t i e s i n c o m -
m e r c i a l a v i a t i o n . A d v a n c e d I m a g i n g , p a g e s 2 2 2 4 ,
A p r i l 1 9 9 2 .
2 R . C . G o n z a l e z a n d R . E . W o o d s . D i g i t a l I m a g e
P r o c e s s i n g . A d d i s o n W e s l e y , R e a d i n g , M A , 1 9 9 2 .
3 D . L . P e t e r s . F L I R A d i e r e n t w o r l d . I n P r o -
c e e d i n g s o f t h e I M A G E V C o n f e r e n c e , p a g e s 1 6 5
1 7 1 , P h o e n i x , A Z , J u n e 1 9 9 0 .
4 B . J . R u s s o . R e a l t i m e t h e r m a l i m a g i n g s e n s o r
s i m u l a t i o n . I n P r o c e e d i n g s o f t h e 1 9 9 6 I m a g e C o n -
f e r e n c e , S c o t t s d a l e , A Z , J u n e 1 9 9 6 .
5 D . L . S h u m a k e r , J . T . W o o d , a n d C . R . T h a c k e r .
I n f r a r e d I m a g i n g S y s t e m s A n a l y s i s . D C S C o r p o -
r a t i o n , 1 9 8 8 .
6 W . L . W o l f e a n d G . J . Z i s s i s . T h e I n f r a r e d H a n d -
b o o k r e v i s e d e d . . O c e o f N a v a l R e s e a r c h , 1 9 8 5 .