0% found this document useful (0 votes)
39 views

Mobile Image Processing - Part 1

The document discusses mobile image processing and Android application development. It introduces the "Hello World" project which aims to teach how to create a new Android project, edit Java source files, create layouts in XML, and run a program on an emulator and phone. It provides instructions on setting up a new project in Eclipse, including editing the Java source file, layout resource file, values resource file, and AndroidManifest.xml file.

Uploaded by

yamin5582
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Mobile Image Processing - Part 1

The document discusses mobile image processing and Android application development. It introduces the "Hello World" project which aims to teach how to create a new Android project, edit Java source files, create layouts in XML, and run a program on an emulator and phone. It provides instructions on setting up a new project in Eclipse, including editing the Java source file, layout resource file, values resource file, and AndroidManifest.xml file.

Uploaded by

yamin5582
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Mobile image processing – Part 1

 Mobile application development on Android


 “Hello
Hello World”
World project
 “Viewfinder EE368” project
 Image
g processing g library
y
 Mobile application examples

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 1
Layar augmented reality
Landmark Recognition

http://www layar com


http://www.layar.com

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 2
Streaming mobile augmented reality
Book cover recognition

http://www youtube com/watch?v=fKm7iknUFqc


http://www.youtube.com/watch?v=fKm7iknUFqc

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 3
Mobile platforms

Symbian Windows Mobile

Nokia N97 Nokia E61 HTC Pure Samsung Omnia

iPh
iPhone A d id
Android

iPhone iPad Motorola DROID Kyocera Zio

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 4
Industry support for Android

 Open source mobile platform developed by Google


 Supported by Open Handset Alliance: over 60 companies
including major service carriers and major mobile device
manufacturers

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 5
Programming in Java

 Android encourages high-level development


 Android uses Java as main programming language
 Inherits basic classes from conventional Java
 String, Container, Math, IO, Network
 Adds new classes specific to mobile devices
 Camera, Telephony, Map, GPS, Speech

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 6
Android software stack

[ Professional
Android
Application
Development ]
Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 7
Android software stack

[ Professional
Android
Application
Development ]
Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 8
Android software stack

[ Professional
Android
Application
Development ]
Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 9
Android software stack

[ Professional
Android
Application
Development ]
Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 10
Android programming framework

program installation system


and execution messages

programmer Eclipse
inputs IDE

Android Java
SDK Runtime

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 11
Class tutorial for Android

 Framework can be installed from scratch on your own


computer
p ((Windows,, Mac,, or Linux)) following
g the tutorial
provided to the class
 Tutorial explains how to download the different software packages
 Tutorial explains how to install and link packages
 Tutorial provides full source for code examples used in lecture
 Link: http://ee368.stanford.edu/Android

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 12
Class tutorial for Android

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 13
Class tutorial for Android

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 14
Class tutorial for Android

 Framework can be installed from scratch on your own


computer
p ((Windows,, Mac,, or Linux)) following
g the tutorial
provided to the class
 Tutorial explains how to download the different software packages
 Tutorial explains how to install and link packages
 Tutorial provides full source for code examples used in lecture
 Link: http://ee368.stanford.edu/Android

 Framework for Linux already installed and tested on the


SCIEN computers
 Add a soft link in your Leland account to our software
 Personalize your Eclipse workspace
 Li k http://ee368.stanford.edu/Android
Link: htt // 368 t f d d /A d id

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 15
Eclipse IDE Different
perspectives

Text editor

Class
hierarchy

Project
j files

Errors and
warnings

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 16
Eclipse IDE: project files

Java source files


Program new functions here
Auto-generated Java files
Don’t edit anything here
Android library
Don’t edit anything here

Resource files
Edit
d layout,
ayou , define
de e constants,
co s a s,
insert external image files

Edit program permissions


and overall settings
Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 17
Eclipse IDE: Android phone emulator

Dummy checkerboard pattern


mimics real camera viewfinder

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 18
“Hello World” project

 Goals of this project


 Learn how to create a new Android project
p j
 Learn how to edit Java source files
 Learn how to create layouts in XML
 Learn how to run a new program on emulator and phone

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 19
Creating a new project (1)

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 20
Creating a new project (2)

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 21
Creating a new project (3)

Make sure this is your


personal workspace

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 22
Creating a new project (4)

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 23
Editing the Java source file
To auto-import necessary
classes, use Control + Shift + O Every visible program uses an
extension of the Activity class

Set the layout of this Activity by


overriding the onCreate method

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 24
Editing the layout resource file

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 25
Editing the values resource file

Define string
g constants,, number
constants, color constants, etc. here

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 26
Editing AndroidManifest.xml

If you program contains multiple


activities, make sure each is listed

Use Intents to trigger


gg one Activity y
from inside another Activity, and
to specify which Activity to start
first in the program

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 27
Debugging syntax errors

Look for red markers on the side


and explanations below

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 28
Running the program (1)

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 29
Running the program (2)

03EH368929E3K

Actual device

Emulator

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 30
Program execution messages on the console
Program .apk file installed to device

Main Activity started on device

Bernd Girod, David Chen: EE368 Mobile Image Processing – Part 1 no. 31

You might also like