Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 24 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
24
Dung lượng
802,08 KB
Nội dung
Mobileimageprocessing – Part 2 Mobile application development on Android “ Hello World ” project Hello World project “Viewfinder EE368” project Ima g e processin g librar y ggy Mobile application examples Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 1 Google Goggles Product recognition Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 2 http://www.google.com/mobile/goggles How to download Google Goggles Open the Android Market application Search for “ Google Goggles ” Search for Google Goggles Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 3 Recognizing video at a glance Visual bookmarks for movies and TV shows ( 1 ) User snaps a photo of screen (3) User resumes video on the phone ( 1 ) User snaps a photo of screen . (3) User resumes video on the phone . Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 4 (2) Ou r system identifies video and frame within the video. Recognizing video at a glance Visual bookmarks for movies and TV shows Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 5 http://msw3.stanford.edu/~dchen/EE368/Video-Search-Android.wmv Mobile devices versus personal computers Feature Motorola DROID Typical PC Screen size 4.6 in x 2.4 in 25 in x 16 in Processor speed 550 MHz 3.0 GHz RAM 256 MB 4GB RAM 256 MB 4 GB Disk space 133 MB internal 8 GB external flash 500 GB disk Internet access Typically 3G WiFi at hotspots WiFi or wired Ethernet Tele p hon y Core feature Su pp lementar y feature py pp y Camera 5 MP camera embedded External webcam Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 6 “Viewfinder EE368” project Goals of this project z Learn how to access frames from the viewfinde r z Learn how to modify camera parameters z Learn how to augment the viewfinder frames Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 7 Beginning the project Download the tutorial from class page http://ee368 stanford edu/Android http://ee368 . stanford . edu/Android Create a new Android project Recommended settin g s g z Project Name: ViewfinderEE368 z Android 2.0.1 z Application Name: Viewfinder EE368 z Application Name: Viewfinder EE368 z Package Name: com.example.viewfinderee368 z Create Activity: ViewfinderEE368 z Min SDK Version: 6 Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 8 Android manifest file (AndroidManifest.xml) Landscape mode … Landscape mode Main Activit y y … Set the proper hardware permissions Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 9 Class hierarchy Viewfinder Manage two views and Viewfinder EE368 (Activity) Manage two views and manage program open/close Draw on Preview (View) Draw on Top (View) Handle incoming viewfinder frames and ad j ust camera Augment viewfinder frames with a new la y er of information Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no. 10 j parameters y on top [...]... x, bottom y ); Canvas.drawRect( rect ); Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no 19 Viewfinder EE368 demo http://ee368.stanford.edu/Android/ViewfinderEE368 Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no 20 Real-time debugging using DDMS (1) Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no 21 Real-time debugging using DDMS (2) 03EH368929E3K... EE368 MobileImageProcessing – Part 2 no 22 Danger of unresponsiveness Users notice delays longer than ~0.5 sec Android only lets your program “hang” or “freeze” for ~5 sec hang freeze 5 before bringing up warning dialog Bernd Girod, David Chen: EE368 MobileImageProcessing – Part 2 no 23 Activity life cycle [ Professional Android Application Development ] Bernd Girod, David Chen: EE368 MobileImage Processing. .. Time MobileImageProcessing – Part 2 no 13 Preview class: frames go down two paths Preview frames Display on phone screen Preview (View) … Forward to callback function … Bernd Girod, David Chen: EE368 w/2 w/2 h/2 width w h/2 h height h Data in YCbCr 4:2:0 format Cb Cr Y MobileImageProcessing – Part 2 no 14 Preview class: set camera parameters Preview (View) Bernd Girod, David Chen: EE368 Mobile Image. .. EE368 Mobile Image Processing – Part 2 no 11 Class hierarchy Viewfinder EE368 (Activity) Manage two views and manager program open/close Preview (View) Draw on Top (View) Handle incoming viewfinder frames j and adjust camera parameters Augment viewfinder frames with a new y layer of information on top Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 2 no 12 Timeline of events on the mobile. .. paint brush Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 2 no 17 w/2 w/2 Cb Y w h h/2 2 width w h/2 2 height h t DrawOnTop class: YCbCr to RGB Cr RGB 298.08 ⋅ Y 408.58 ⋅ Cr R= + − 222.921 256 256 298.08 ⋅ Y 100.29 ⋅ Cb 208.12 ⋅ Cr G= − − + 135.58 256 256 256 298.08 ⋅ Y 516.41 ⋅ Cb B= + − 276.84 256 256 Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 2 no 18 DrawOnTop class:... Girod, David Chen: EE368 MobileImageProcessing – Part 2 no 15 Class hierarchy Viewfinder EE368 (Activity) Manage two views and manage program open/close Preview (View) Draw on Top (View) Handle incoming viewfinder frames j and adjust camera parameters Augment viewfinder frames with a new y layer of information on top Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 2 no 16 DrawOnTop class: