Augmented Reality on Android Smartphones

quaintmayoMobile - Wireless

Dec 10, 2013 (3 years and 6 months ago)

54 views

    
 
  
       

 
  
 
 
        

            
           
            
             
         
             
             
             
         

             
            
              
              
                
                
            
            


   
  
   
                              
                                
                               
                                
                              
                     
                            
                                 
                               
                                
                               
      
                            
                                
                                 
                                   
                                 
                              
                            
      
                             
                           
                               


                              
                        
                           
                        
                                 
                         
      
                              
                                
  
   

  
                      
                            
                
2
     
                          
                               
                             
            
                         
                                 
                              
                  
                                  
  
11
                                
  
13
                                 
                           
                               
                              
                         
                 
                      
           
1

                
                     
                         


   
  
    
  
   
   
  
  
   
   
    
   
  
 
  
   
 
             
             
  

             
   
    
    
   
                
              
                
             
                   
     
            
            
             
              
              

   

  
                   
 
    
 
 
                
                 
             
             
                
          

  
  
               
                     
              
                  
         
                 
2

               
                  
                
    

  


  
              
     

             
              
        
            

              
               
                  
               

  
  
     
     
               
                 
              
                
                
             
            
   
              
             
             
              
                
                 
 

  
             
    
     
             
                
                 
              
              
           
  
 
                   
           
            

  
   
     

       
           

                
              
              
            
             


            
              
       
              
            
                
            
               
              



  

  
    
              

                
            
   
                
              
             
              
     

  

  
  
  
           
          
              
            
             
            
            
               
              
               
                
              
               
              
                
              
             
              
             
                
                 

             
                  
              

       

  
                 

  
           
           
               
              
        
 
               
            
               
              
              
                  
               
 
 
                
               
                   
 


               
             
               

 

  
  

          
       
    
   
           
              
             


             
             
               





  
      

 
                
               
                
       

   
11
                
               
                 
       


 

    

  

     


  
   
13
       
               
                 
              
            
            
              
                
              
         

  

     
    
 
               
                    
              
                
              
             
       
              
                  
  
              
                 
               
               
             
              
             
     
                
                 
               

     
     
   
                
              
              
              
             
   
              
                  
                 
                 
        
             
               
        
                  
                
             
             
              


        
              
             

              

     
  
  
                
            
                
               
              
         

     
        
        
     
       
        
      
        
                 
          
  
               
             
                 

 

     
            
              
            
                
         

                
               
           
       
   
                
               
                
              
              
    

     
     
               
               
           
                
           
              
              
              
                   


            
 
  
     
           
         
         

     
        
                  
            
           
        
             
 

     
              
            
                
   
      
     
               
              
                  
 
                  
               
                 
                 
               
                 
                
                

     
                 
 
              
              
                
             
              
                
               
              
                
                  
             
              
               
              
                
    
                   
                
               
                 
 
   
             
              
              
               

     
AndAR
OpenGL
native libraries
OpenGL
Java API
Hardware/Kernel
Camera
Camera
Java API
ARToolkit
Java
C/C++
   
                
          
                
                
              
      
   
     
            
                
                 
              
                

     
                 
              
              
           
              
               
                
               
          
                
               
             
                
             
     
   
                
                 
                   
            
            
          
              
            
                
           
                
              

     
...
as byte a stream:
YCbCr 4:2:0 SP
      
    
B = 1:164(Y 16) +2:018(U 128) 
G = 1:164(Y 16) 0:813(V 128) 0:391(U 128) 
R = 1:164(Y 16) +1:596(V 128) 
  
               
                 
            
              
               
             
                
              

     
               
    
               
             
               
               
                 
               
             
                 
           
 
                 
              
              
          
                  
                   
           
                
             
 
                
               
                  
                  
                
             
               
                  

     
                
 
              
                
               
                   
              
              
                 
                
             
                 
                 
           
waiting
working
new preview frame
work done
new preview frame / ignore
            
               
               
               
                
                 
              
            
                
           
                

     
:CameraPreviewHandler.java
:Camera
onPreviewFrame()
:ConversionWorker
:DetectMarkerWorker
setNextFrame()
setNextFrame()
           
                 
               
             
            
color conversion thread
detect markers thread
waiting
working
exit /release frame lock
waiting for frame lock
new preview frame
got frame lock
new preview frame / ignore
work done
waiting
detecting markers
new preview frame
waiting for translation matrix monitor
markers detected
calculate translation matrix
exit /release monitor
obtained monitor
completed calculation
OpenGL render thread
waiting
waiting for frame lock
rendering requests
updating texture
exit /release frame lock
frame lock obtained
waiting for translation matrix monitor
texture updated
draw 3D object
exit /release monitor
monitor obtained
object drawn
     

     
   
              
            
              
             
                
            
            
1
              
                
         
                
                 
              
       
         
               
              

  

     
                 
                 
              
                
                   
                 
        
                
               
                  
                 
                   
                 
 
                 
               
              
    

     
  
             
               
      
              
                 
             
         
             
             

                
              
                    
                  
                   
               
               
                 
               
        
               
             
           

     
AndARActivity
setNonARRenderer(r : OpenGLRenderer) : void
getArtoolkit() : ARToolkit
ARToolkit
registerARObject(o : ARObject) : void
CustomActivity
onCreate() : void
ARObject
init() : void
draw() : void
1
0..*
OpenGLRenderer
draw() : void
setupEnv() : void
initGL() : void
1
0..1
CustomRenderer
draw() : void
setupEnv() : void
initGL() : void
CustomObject
init() : void
draw() : void
0..*
0..1
ARRenderer
1
1
0..1
          

     
              
                  
             
                  
         
            
          
    
              
              
              
             
               
               
               

               
                   
               
             
                   
                
        
               
             
       
               

     
      
      
      
   
         
           


          

          

     
        
   
             

        

 
          
              
            
          
         
               
             
             
              
 

         
             
              
 
              


              
   
     
              
              
              
              
            

 



 
            
           
          
            
              
           
              
      
                 
       
               
         
            
             
        
               
               
            
           


            
 
            
   
           
      

         
       
         
        
     

           
           
          
         
          
     
 
            
            
  

          
          

        
   
          

    
 
          

    
 
          
           
 
             
           
         
          
      

               
    
             
    
      

        


    
                
           
            
          

          
         
            
          
          

        
        
          
    
 
       
     
         
           
  
 
             
          
         
      
 
          


           
  
          
           
  
           
         
