1. Trang chủ
  2. » Giáo án - Bài giảng

mobile image processing part2

24 667 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Mobile Image Processing – Part 2
Tác giả Bernd Girod, David Chen
Người hướng dẫn EE368
Trường học Stanford University
Chuyên ngành Mobile Image Processing
Thể loại Bài tập lớn
Năm xuất bản 2025
Thành phố Stanford
Định dạng
Số trang 24
Dung lượng 2,54 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Mobile image processing – Part 2„ Mobile application development on Android „ Project 1: “Hello Image”, reading/writing/modifying images „ Project 2: “Viewfinder EE368”, processing viewf

Trang 1

Mobile image processing – Part 2

„ Mobile application development on Android

„ Project 1: “Hello Image”, reading/writing/modifying images

„ Project 2: “Viewfinder EE368”, processing viewfinder frames

„ Project 3: “CVCamera”, utilizing OpenCV functions

„ Mobile application examples

Trang 2

Recognizing video at a glance

(1) User snaps a photo of screen.

(2) Our system identifies video and

(3) User resumes video on the phone.

Trang 3

Recognizing video at a glance

Trang 4

Mobile device versus personal computer

Screen size 4.6 in × 2.4 in 25 in × 16 in

Permanent storage 133 MB internal

8 GB external flash 500 GB disk

Internet access Typically 3G or

WiFi at hotspots WiFi or wired Ethernet Telephony Core feature Supplementary feature

embedded External webcam

Trang 5

“Viewfinder EE368” project

„ Goals of this project

z Learn how to access frames from the viewfinder

z Learn how to modify camera parameters

z Learn how to augment the viewfinder frames

„ Step-by-step instructions available in Tutorial #1:

z http://ee368.stanford.edu/Android

Trang 6

Android manifest file

<intent-filter>

<action android:name=" android.intent.action.MAIN " />

<category android:name=" android.intent.category.LAUNCHER " />

</intent-filter>

</activity>

</application>

<uses-sdk android:minSdkVersion=“ 7 " />

<uses-permission android:name=" android.permission.CAMERA "/>

Set the proper hardware permissions

Landscape mode without title bar

Main Activity

Trang 7

Class hierarchy for “Viewfinder EE368”

Viewfinder EE368 (Activity)

Preview (View)

Draw on Top (View)

Manage two views and manage program

open/close

Handle incoming viewfinder frames and adjust camera parameters

Augment viewfinder frames with a new layer of information

on top

Trang 8

Viewfinder class: full screen mode

Viewfinder EE368

Icon and title bars visible Icon and title bars hidden

public void onCreate(Bundle savedInstanceState) {

getWindow().setFlags(

WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );

requestWindowFeature(Window.FEATURE_NO_TITLE);

Trang 9

Class hierarchy for “Viewfinder EE368”

Viewfinder EE368 (Activity)

Preview (View)

Draw on Top (View)

Manage two views and supervise program

open/close

Handle incoming viewfinder frames and adjust camera parameters

Augment viewfinder frames with a new layer of information

on top

Trang 10

Timeline of events on the mobile device

Trang 11

Preview class: frames go down two paths

Preview (View)

Viewfinder frames

Display on phone screen

Forward to custom callback function

Trang 12

Preview class: set camera parameters

Preview (View)

Camera.Parameters parameters = myCamera.getParameters();

parameters.setPreviewSize( 640 , 480 );

parameters.setPreviewFrameRate( 15 );

parameters.setSceneMode(Camera.Parameters.SCENE_MODE_NIGHT); parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); myCamera.setParameters(parameters);

Trang 13

Class hierarchy for “Viewfinder EE368”

Viewfinder EE368 (Activity)

Preview (View)

Draw on Top (View)

Manage two views and manage program

open/close

Handle incoming viewfinder frames and adjust camera parameters

Augment viewfinder frames with a new layer of information

on top

Trang 14

DrawOnTop class: YCbCr to RGB conversion

84

276 256

41 516 256

08 298

58

135 256

12 208 256

29 100 256

08 298

921

222 256

58 408 256

08 298

⋅ +

=

Cb

Y B

Cr Cb

Y G

Cr

Y R

Trang 15

DrawOnTop class: create some paint brushes

myPaintRed = new Paint();

myPaintRed.setStyle(Paint.Style.FILL); myPaintRed.setColor( Color.RED );

myPaintRed.setTextSize(25);

myPaintGreen = new Paint();

myPaintGreen.setStyle(Paint.Style.FILL); myPaintGreen.setColor( Color.GREEN );

myPaintGreen.setTextSize(25);

myPaintBlue = new Paint();

myPaintBlue.setStyle(Paint.Style.FILL); myPaintBlue.setColor( Color.BLUE );

myPaintBlue.setTextSize(25);

Trang 16

DrawOnTop class: draw histogram bars

Bin 0 Bin 1 Bin 2 Bin 3 Bin 4

// Draw red rectangle

Rect rect = new Rect(left x, top y,

right x, bottom y); myCanvas.drawRect(rect, myPaintRed);

Trang 17

Viewfinder EE368 demo

http://ee368.stanford.edu/Android

Trang 18

Real-time debugging using DDMS (1)

Trang 19

Real-time debugging using DDMS (2)

Trang 20

Taking a screenshot of the phone (1)

0123456789ABC

Trang 21

Taking a screenshot of the phone (2)

Trang 22

Class Project: Mobile Image Completion

H Wang and A Lin, Spring 2010

Trang 23

Class Project: Mobile HDR Imaging

J Mathe and T Wong, Spring 2010

Trang 24

Mobile image processing – Part 2

„ Mobile application development on Android

„ Project 1: “Hello Image”, reading/writing/modifying images

„ Project 2: “Viewfinder EE368”, processing viewfinder frames

„ Project 3: “CVCamera”, utilizing OpenCV functions

„ Mobile application examples

Ngày đăng: 28/04/2014, 15:39

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN