Image processing library for Android Jon’s Java Imaging Library JJIL http://code google com/p/jjil/ Collection of common image processing functions Looking for EE368 students g to a
Trang 1Mobile image processing – Part 3
Mobile application development on Android
“Hello World” project
Hello World project
“Viewfinder EE368” project
Image processing library g g y
Mobile application examples
Trang 2Scan Life
2D barcode recognition
http://www.scanlife.com
Trang 3Spring 2006 Project:
Visual Code Marker Recognition
Trang 4Image processing library for Android
Jon’s Java Imaging Library (JJIL)
http://code google com/p/jjil/
Collection of common image processing functions
Looking for EE368 students g to augment this library with new g y image processing functions and algorithms
Trang 5Importing JJIL as external JAR (1)
Trang 6Importing JJIL as external JAR (2)
Trang 7Android and JJIL image formats
Image formats
“Bitmap” class in Android p
“Image” class in JJIL: subclasses RgbImage, Gray8Image,
Gray16Image, Gray32Image
Conversion example
Conversion example
Trang 8JJIL sequences
Images are processed through sequences (pipelines)
Sequence acts like a queue where the first image inserted
Sequence acts like a queue, where the first image inserted
is the first image retrieved
Image downsampling example
Sequence
R bI
Sequence.Push (RgbImage) Sequence.GetFront()
Rgb 3x3Average
Rgb SubSample
Sequence RgbImage
RgbImage
Sequence.Add Sequence.Add Sequence.Add
(new Rgb3x3Average)
Sequence.Add (new RgbSubSample)
Trang 93x3 averaging filter (1)
Trang 103x3 averaging filter (2)
Trang 12Horizontal differences (2)
Trang 13Vertical differences (1)
1 Transpose the image
2 Find horizontal differences on the transposed image
3 Transpose the resulting image
Trang 14Vertical differences (2)
Trang 15Gray8Peak3x3 Gray8Reduce Gray8Shrink Complex32Gray32
Gray8GaussDeblurHoriz
G 8G H i
Gray8Shrink LinefitHough Rgb3x3Average RgbAvgGray
R bCli Gray16LinComb
Gray16Threshold
Gray32Div
Gray32Gray8
Gray8GaussHoriz Gray8GaussSmoothVert Gray8Gray32
Gray8Hist
RgbClip RgbCrop RgbDimMask RgbHorizGaussSmooth
g RgbHsv RgbMaskedAbsDiff RgbMaxContrast2Gray RgbMaxDiff
Gray82Gray32
Gray8Abs
Gray8HorizSum Gray8HorizVar
RgbMaxDiff RgbMeanStdDev
Trang 16Communications between phone and server
HTTP Response (e.g., Identification)
Apache PHP MATLAB / C
Trang 17HTTP file upload
Trang 18Virtual campus tour guide
Landmark recognition
http://www.youtube.com/watch?v=Kh35mMPWKdA
Trang 19Real-time object tracking
Trang 20CD/DVD/Book cover recognition
Trang 21Spring 2008 Project:
CD Cover Recognition
Trang 22Retrieving music for recognized images
HTTP Response (e.g., Identification)
Network
Sample MP3 files
from the web can be
sent to the phone
Trang 23Playing music files on the phone
Context appContext = getApplicationContext();
MediaPlayer player = MediaPlayer.create(appContext, uri);
Uri uri = Uri.parse(“http://somesite.com/repository/sample.mp3”);
MediaPlayer player MediaPlayer.create(appContext, uri);
player.start();
player.pause();
l kT (2000) //
player.seekTo(2000); // msec
Trang 24Retrieving videos for recognized frames
HTTP Response (e.g., Identification)
Network
Sample video files
from the web can be
streamed to the phone
Trang 25Playing videos on the phone
Context appContext = getApplicationContext();
VideoView player = new VideoView(appContext);
l tVid P th(“htt // it / it / l 4”)
player.setVideoPath(“http://somesite.com/repository/sample.mp4”);
player.start();
player.pause();
Trang 26 Android-related office hours
After the 5 homework assignments are completed
H ld i th SCIEN l b d i l ti W d d
Held in the SCIEN lab during regular time on Wednesday
Reference book
Meier, Professional Android 2 Application Development
Meier, Professional Android 2 Application Development