Part I Word - report-1.docx Author Chao Liu Created Date 4/12/2013 7:26:42 PM ...

5
Part I Algorithm Figure 1. The illustration for an electrical field In Fig.1, a planar electromagnetic wave is linearly polarized. The transverse electrical field wave is accompanied by a magnetic field wave, as illustrated in Figure 1. Figure 2. Pixel intensity as a function of the angle of the polarizer before the camera. In Fig.2, Y is pixel value captured by polarizer-attached camera. is the angle of the polarizer before the camera. A is the amplitude of the sinusoid curve; B is initial phase; C is mean value of curve. They are related as: = 2 + + (1) After expanding the sinusoid function, we have: Y = a sin(2) + b sin(2) + C (2) where a = A cos(B) , b=A sin(B) (3) Hence, we have: A= ! + ! , B=a tan ! ! (4) Hence, for all pixels we have: y ! y ! y ! y ! = sin2θ ! cos2θ ! 1 sin2θ ! cos2θ ! 1 a b c (5) In this project, we take images of samples for ranging from 0 to 180 degrees with an increment of 10 degrees, so n=19. A metric of how reflected light is partially polarized is given by the expression: Ratio = Partial polarization = ! !"# !! !"# ! !"# !! !"# 6

Transcript of Part I Word - report-1.docx Author Chao Liu Created Date 4/12/2013 7:26:42 PM ...

Part I

Algorithm

Figure 1. The illustration for an electrical field

In Fig.1, a planar electromagnetic wave is linearly polarized. The transverse electrical field wave is accompanied by a magnetic field wave, as illustrated in Figure 1.

Figure  2.  Pixel  intensity  as  a  function  of  the  angle  of  the  polarizer  before  the  camera.    

In Fig.2, Y is pixel value captured by polarizer-attached camera. 𝜃 is the angle of the polarizer before the camera. A is the amplitude of the sinusoid curve; B is initial phase; C is mean value of curve. They are related as:

 𝑌 = 𝐴 𝑠𝑖𝑛 2𝜃 + 𝐵 + 𝐶 (1) After expanding the sinusoid function, we have:

Y = a sin(2𝜃) + b sin(2𝜃) + C (2) where

a = A cos(B) , b=A sin(B) (3) Hence, we have:

A= 𝑎! + 𝑏!, B=a tan!! (4)

Hence, for all pixels we have: y!y!y!⋮y!

=sin2θ! cos2θ! 1⋮ ⋱ ⋮

sin2θ! cos2θ! 1

abc

(5)

In this project, we take images of samples for 𝜃 ranging from 0 to 180 degrees with an increment of 10 degrees, so n=19. A  metric  of  how  reflected  light  is  partially  polarized  is  given  by  the  expression:  

Ratio  =  Partial  polarization  =   !!"#!!!"#!!"#!!!"#

       (6)  

where   I!"#   =  A,   I!"#   =  C.   As   indicated   in   [1],   this   ratio   can  be  used   to  distinguish  between  dielectric   and  non-­‐dielectric  materials.   In   our   experiment,  we  use   this   ratio   as   the   feature   to  distinguish  between  aluminum  (dielectric  material)  and  plastic  (non-­‐dielectric  material).  

Part II Experiment  Setup    1.Instruments:    Test  samples;  Pointgray  CCD  camera;  rotatable  polarizer;  directional  light  source  with  polarizer.  

 

    Figure.  3                                   Figure.4  

Fig.3  shows  the  illustration  of  our  experiment  setup.  The  polarized  directional  light  is  reflected  by   the   sample   before   passing   through   the   rotatable   polarizer   B.   The   Pointgray   CCD   camera  captures  the  HDR  images.  The  degree  by  which  the  polarizer  rotates  ranges  from  0  to  180,  with  an  increment  of  10  degrees.  Fig.4  is  the  picture  show  the  experiment  setup.      2.  Training  set    For   obtaining   appropriate   threshold,   we   took   images   of   samples   from   Aluminum   and   Plastic  plates.  The  training  set  includes:  Aluminum:  AL2024_1,  AL2024_2,  AL2024_3,  AL2024_4;  Plastic:  PL0001,  PL1043,  PL1027,  PL2017.      For  each  sample,  we  take  19  images,  each  one  the  images  correspond  to  one   𝜃   value.  

 Figure.5  The  samples  in  the  training  set.  

After  getting  intensity  values,  we  estimate  the  A  map,  B  map,  C  map  and  the  ratio  map  using  Eq.  (1)  ~  Eq.  (6)    The   ratio  histogram   for   the   training   samples   in   three-­‐color   channels   is   shown   in   Fig.6   (Red   is  Aluminum,  Green  is  plastics).  Then  we  manually  choose  the  thresholds  for  three-­‐color  channels.    

 Figure.6  Histograms  of  the  Polarization  Fresnel’s  Ratio  for  aluminum  and  plastic  in  three  color  channels.  

For  red  channel,  we  choose  threshold  to  be  3.821.  For  red  channel,  we  choose  threshold  to  be  4.383.  For  red  channel,  we  choose  threshold  to  be  3.67.    

Part III Experiment  I:  aluminum  scraps  vs.  plastic  surfaces  

Test  sample:  Red/Gray  Aluminum  &  Red/Gray  Plastic    We  have  tested  with  thresholds  of  R,  G  and  B  channels  and  found  that  red  channel  has  better  performance.   This   is   because   test   samples   are   red.   We   also   test   with   different   number   of  images,  i.e.  different  number  of  polarizer  directions.  The  results  are  shown  in  Fig.7.  As  shown,  the  method  achieves  relative  high  accuracy  even  with  four  images.    

 Figure.7  (a)~(b).  Capture  images  of  samples  with/without  polarizer  before  the  camera.  (c)  Ground  truth  classification  map.  

(d)~(i)  classification  map  with  3,  4,  5,  6,  12,19  selected  polarizer  angles  with  accuracy  below  each  image.  The  classification  

maps  are  estimated  in  the  R  channel.  

 Figure.8  Classification  accuracies  vs.  #  of  polarizer  directions.  (a)  The  overall  classification  accuracy.  (b)  The  classification  

accuracies  for  two  classes.  Green:  plastic;  red:  aluminum.    

The  accuracies  for  different  #  of  polarizer  directions  are  shown  in  Figure.8.          Experiment  II.  Cylindrical  aluminum  vs.  cylindrical  plastic    

   

To  estimate  the  effects  of  the  surface  normal  variation,  we  test  with  two  cylindrical  samples  shown  

in  Figure  9.    

 Figure  9.  (a)  Cylindrical  samples  of  aluminum  and  plastic.  (b)  Ground  truth  classification    

  The  A,  B,  C  and  the  ratio  maps  for  the  cylinder  samples  are  shown  in  Fig.10.  For  the  ratio  map,  

the  image  range  is  clamped  so  that  the  maximal  value  is  10.    

       Figure.10  A,B,C  and  the  ratio  maps.  

 

 

Figure  11.  (a)  Ground  truth  (b)  Classification  with  trained  threshold;  (c).  Segmentation  using  k-­‐means  algorithm.  (d).  

Classification  with  optimal  threshold  that  is  selected  manually  from  Fig.  10  (d)  

 We   observe   that   the   surface   normal   affects   performance   a   lot.   However,   as   indicated   by  Fig.11(d),  even  with  large  surface  normal  variation,  we  can  still  select  a  threshold  to  distinguish  between  two  classes  of  materials.  Fig.11  (c)  demonstrates  that  even  with  large  surface  normal  variation,  we  can  get  a  fairly  accurate  results  by  using  a  threshold  manually  selected  based  on  Fig.11(d)      Reference:    [1]  L.  B.  Wolff,  “Polarization-­‐based  material  classification  from  specular  reflection,”  IEEE  Transactions  on  Pattern  Analysis  and  Machine  Intelligence,  vol.  12,  no.  11,  pp.  1059–1071,  1990.